From 7e507825bb701bba2534671c52d9f6e7b663617d Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Tue, 3 Dec 2024 21:28:00 -0500 Subject: [PATCH 1/7] Remove existing cargokit directory to re-add as subtree --- CHANGELOG.md | 4 +- README.md | 2 +- analysis_options.yaml | 2 +- cargokit/.github/workflows/check_and_lint.yml | 26 - .../workflows/test_example_plugin_build.yml | 82 ---- cargokit/.gitignore | 4 - cargokit/LICENSE | 39 -- cargokit/README | 8 - cargokit/build_pod.sh | 58 --- cargokit/build_tool/README.md | 2 - cargokit/build_tool/analysis_options.yaml | 31 -- cargokit/build_tool/bin/build_tool.dart | 5 - cargokit/build_tool/lib/build_tool.dart | 5 - .../lib/src/android_environment.dart | 192 -------- .../lib/src/artifacts_provider.dart | 263 ---------- cargokit/build_tool/lib/src/build_cmake.dart | 37 -- cargokit/build_tool/lib/src/build_gradle.dart | 46 -- cargokit/build_tool/lib/src/build_pod.dart | 86 ---- cargokit/build_tool/lib/src/build_tool.dart | 268 ----------- cargokit/build_tool/lib/src/builder.dart | 195 -------- cargokit/build_tool/lib/src/cargo.dart | 45 -- cargokit/build_tool/lib/src/crate_hash.dart | 121 ----- cargokit/build_tool/lib/src/environment.dart | 65 --- cargokit/build_tool/lib/src/logging.dart | 49 -- cargokit/build_tool/lib/src/options.dart | 309 ------------ .../lib/src/precompile_binaries.dart | 199 -------- cargokit/build_tool/lib/src/rustup.dart | 133 ----- cargokit/build_tool/lib/src/target.dart | 137 ------ cargokit/build_tool/lib/src/util.dart | 169 ------- .../build_tool/lib/src/verify_binaries.dart | 81 ---- cargokit/build_tool/pubspec.lock | 453 ------------------ cargokit/build_tool/pubspec.yaml | 30 -- cargokit/build_tool/test/builder_test.dart | 28 -- cargokit/build_tool/test/cargo_test.dart | 28 -- cargokit/build_tool/test/options_test.dart | 75 --- cargokit/build_tool/test/rustup_test.dart | 66 --- cargokit/cmake/cargokit.cmake | 99 ---- cargokit/cmake/resolve_symlinks.ps1 | 27 -- cargokit/docs/architecture.md | 104 ---- cargokit/docs/precompiled_binaries.md | 95 ---- cargokit/gradle/plugin.gradle | 172 ------- cargokit/run_build_tool.cmd | 91 ---- cargokit/run_build_tool.sh | 94 ---- .../integration_test /full_cycle_test.dart | 63 --- example/integration_test /multi_sig_test.dart | 167 +++++++ example/lib/main.dart | 4 +- example/lib/multi_sig_wallet.dart | 97 ---- .../lib/{simple_wallet.dart => wallet.dart} | 8 +- example/macos/Podfile.lock | 2 +- example/pubspec.lock | 26 +- ios/Classes/frb_generated.h | 4 +- ios/bdk_flutter.podspec | 2 +- lib/bdk_flutter.dart | 77 +-- lib/src/generated/api/blockchain.dart | 5 +- lib/src/generated/api/wallet.dart | 4 +- lib/src/generated/frb_generated.dart | 20 +- lib/src/generated/frb_generated.io.dart | 8 +- lib/src/root.dart | 277 ++++++----- macos/Classes/frb_generated.h | 4 +- macos/bdk_flutter.podspec | 2 +- pubspec.lock | 30 +- pubspec.yaml | 15 +- rust/Cargo.lock | 2 +- rust/Cargo.toml | 11 +- rust/src/api/blockchain.rs | 4 +- rust/src/api/wallet.rs | 4 +- rust/src/frb_generated.io.rs | 8 +- rust/src/frb_generated.rs | 12 +- test/bdk_flutter_test.mocks.dart | 333 +++++++------ 69 files changed, 620 insertions(+), 4594 deletions(-) delete mode 100644 cargokit/.github/workflows/check_and_lint.yml delete mode 100644 cargokit/.github/workflows/test_example_plugin_build.yml delete mode 100644 cargokit/.gitignore delete mode 100644 cargokit/LICENSE delete mode 100644 cargokit/README delete mode 100755 cargokit/build_pod.sh delete mode 100644 cargokit/build_tool/README.md delete mode 100644 cargokit/build_tool/analysis_options.yaml delete mode 100644 cargokit/build_tool/bin/build_tool.dart delete mode 100644 cargokit/build_tool/lib/build_tool.dart delete mode 100644 cargokit/build_tool/lib/src/android_environment.dart delete mode 100644 cargokit/build_tool/lib/src/artifacts_provider.dart delete mode 100644 cargokit/build_tool/lib/src/build_cmake.dart delete mode 100644 cargokit/build_tool/lib/src/build_gradle.dart delete mode 100644 cargokit/build_tool/lib/src/build_pod.dart delete mode 100644 cargokit/build_tool/lib/src/build_tool.dart delete mode 100644 cargokit/build_tool/lib/src/builder.dart delete mode 100644 cargokit/build_tool/lib/src/cargo.dart delete mode 100644 cargokit/build_tool/lib/src/crate_hash.dart delete mode 100644 cargokit/build_tool/lib/src/environment.dart delete mode 100644 cargokit/build_tool/lib/src/logging.dart delete mode 100644 cargokit/build_tool/lib/src/options.dart delete mode 100644 cargokit/build_tool/lib/src/precompile_binaries.dart delete mode 100644 cargokit/build_tool/lib/src/rustup.dart delete mode 100644 cargokit/build_tool/lib/src/target.dart delete mode 100644 cargokit/build_tool/lib/src/util.dart delete mode 100644 cargokit/build_tool/lib/src/verify_binaries.dart delete mode 100644 cargokit/build_tool/pubspec.lock delete mode 100644 cargokit/build_tool/pubspec.yaml delete mode 100644 cargokit/build_tool/test/builder_test.dart delete mode 100644 cargokit/build_tool/test/cargo_test.dart delete mode 100644 cargokit/build_tool/test/options_test.dart delete mode 100644 cargokit/build_tool/test/rustup_test.dart delete mode 100644 cargokit/cmake/cargokit.cmake delete mode 100644 cargokit/cmake/resolve_symlinks.ps1 delete mode 100644 cargokit/docs/architecture.md delete mode 100644 cargokit/docs/precompiled_binaries.md delete mode 100644 cargokit/gradle/plugin.gradle delete mode 100644 cargokit/run_build_tool.cmd delete mode 100755 cargokit/run_build_tool.sh delete mode 100644 example/integration_test /full_cycle_test.dart create mode 100644 example/integration_test /multi_sig_test.dart delete mode 100644 example/lib/multi_sig_wallet.dart rename example/lib/{simple_wallet.dart => wallet.dart} (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54038dc6..77d8f273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.31.3] + ## [0.31.2] Updated `flutter_rust_bridge` to `2.0.0`. #### APIs added @@ -174,4 +176,4 @@ Updated API to match bdk-ffi - Create Transaction - Sign Transaction - Broadcast Transaction -- Quick Send +- Quick Send \ No newline at end of file diff --git a/README.md b/README.md index 0852f50e..8e596aad 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.31.2 + bdk_flutter: ^0.31.3 ``` ### Examples diff --git a/analysis_options.yaml b/analysis_options.yaml index c2b7743f..a40d945a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:lints/recommended.yaml +include: package:lints/core.yaml # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options diff --git a/cargokit/.github/workflows/check_and_lint.yml b/cargokit/.github/workflows/check_and_lint.yml deleted file mode 100644 index adec80e1..00000000 --- a/cargokit/.github/workflows/check_and_lint.yml +++ /dev/null @@ -1,26 +0,0 @@ -on: - pull_request: - push: - branches: - - main - -name: Check and Lint - -jobs: - Flutter: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 #v2.7.0 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d #1.6.0 - - name: Pub Get - run: dart pub get --no-precompile - working-directory: build_tool - - name: Dart Format - run: dart format . --output=none --set-exit-if-changed - working-directory: build_tool - - name: Analyze - run: dart analyze - working-directory: build_tool - - name: Test - run: dart test - working-directory: build_tool diff --git a/cargokit/.github/workflows/test_example_plugin_build.yml b/cargokit/.github/workflows/test_example_plugin_build.yml deleted file mode 100644 index bf36e862..00000000 --- a/cargokit/.github/workflows/test_example_plugin_build.yml +++ /dev/null @@ -1,82 +0,0 @@ -on: - pull_request: - push: - branches: - - main - -name: Test Example Plugin - -jobs: - Build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - - macOS-latest - - windows-latest - build_mode: - - debug - - profile - - release - env: - EXAMPLE_DIR: "a b/hello_rust_ffi_plugin/example" - CARGOKIT_VERBOSE: 1 - steps: - - name: Extract branch name - shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT - id: extract_branch - - name: Setup Repository - shell: bash - run: | - mkdir "a b" # Space is intentional - cd "a b" - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - # "advanced" branch has extra iOS flavor and uses rust nightly for release builds - git clone -b advanced https://github.com/irondash/hello_rust_ffi_plugin - cd hello_rust_ffi_plugin - git subtree pull --prefix cargokit https://github.com/${{ github.event.pull_request.head.repo.full_name || github.repository }} ${{ steps.extract_branch.outputs.branch }} --squash - - uses: subosito/flutter-action@cc97e1648fff6ca5cc647fa67f47e70f7895510b # 2.11.0 - with: - channel: "stable" - - name: Install GTK - if: (matrix.os == 'ubuntu-latest') - run: sudo apt-get update && sudo apt-get install libgtk-3-dev - - name: Install ninja-build - if: (matrix.os == 'ubuntu-latest') - run: sudo apt-get update && sudo apt-get install ninja-build - - name: Build Linux (${{ matrix.build_mode }}) - if: matrix.os == 'ubuntu-latest' - shell: bash - working-directory: ${{ env.EXAMPLE_DIR }} - run: flutter build linux --${{ matrix.build_mode }} -v - - name: Build macOS (${{ matrix.build_mode }}) - if: matrix.os == 'macos-latest' - shell: bash - working-directory: ${{ env.EXAMPLE_DIR }} - run: flutter build macos --${{ matrix.build_mode }} -v - - name: Build iOS (${{ matrix.build_mode }}) - if: matrix.os == 'macos-latest' - shell: bash - working-directory: ${{ env.EXAMPLE_DIR }} - run: flutter build ios --${{ matrix.build_mode }} --no-codesign -v - - name: Build iOS (${{ matrix.build_mode }}) - flavor1 - if: matrix.os == 'macos-latest' - shell: bash - working-directory: ${{ env.EXAMPLE_DIR }} - run: flutter build ios --flavor flavor1 --${{ matrix.build_mode }} --no-codesign -v - - name: Build Windows (${{ matrix.build_mode }}) - if: matrix.os == 'windows-latest' - shell: bash - working-directory: ${{ env.EXAMPLE_DIR }} - run: flutter build windows --${{ matrix.build_mode }} -v - - name: Build Android (${{ matrix.build_mode }}) - shell: bash - working-directory: ${{ env.EXAMPLE_DIR }} - run: | - export JAVA_HOME=$JAVA_HOME_11_X64 - flutter build apk --${{ matrix.build_mode }} -v - diff --git a/cargokit/.gitignore b/cargokit/.gitignore deleted file mode 100644 index cf7bb868..00000000 --- a/cargokit/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -target -.dart_tool -*.iml -!pubspec.lock diff --git a/cargokit/LICENSE b/cargokit/LICENSE deleted file mode 100644 index 54a7d589..00000000 --- a/cargokit/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2022 Matej Knopp - -================================================================================ - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -================================================================================ - -APACHE LICENSE, VERSION 2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - diff --git a/cargokit/README b/cargokit/README deleted file mode 100644 index 8ae4a073..00000000 --- a/cargokit/README +++ /dev/null @@ -1,8 +0,0 @@ -Experimental repository to provide glue for seamlessly integrating cargo build -with flutter plugins and packages. - -See https://matejknopp.com/post/flutter_plugin_in_rust_with_no_prebuilt_binaries/ -for a tutorial on how to use Cargokit. - -Example plugin available at https://github.com/irondash/hello_rust_ffi_plugin. - diff --git a/cargokit/build_pod.sh b/cargokit/build_pod.sh deleted file mode 100755 index ed0e0d98..00000000 --- a/cargokit/build_pod.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -set -e - -BASEDIR=$(dirname "$0") - -# Workaround for https://github.com/dart-lang/pub/issues/4010 -BASEDIR=$(cd "$BASEDIR" ; pwd -P) - -# Remove XCode SDK from path. Otherwise this breaks tool compilation when building iOS project -NEW_PATH=`echo $PATH | tr ":" "\n" | grep -v "Contents/Developer/" | tr "\n" ":"` - -export PATH=${NEW_PATH%?} # remove trailing : - -env - -# Platform name (macosx, iphoneos, iphonesimulator) -export CARGOKIT_DARWIN_PLATFORM_NAME=$PLATFORM_NAME - -# Arctive architectures (arm64, armv7, x86_64), space separated. -export CARGOKIT_DARWIN_ARCHS=$ARCHS - -# Current build configuration (Debug, Release) -export CARGOKIT_CONFIGURATION=$CONFIGURATION - -# Path to directory containing Cargo.toml. -export CARGOKIT_MANIFEST_DIR=$PODS_TARGET_SRCROOT/$1 - -# Temporary directory for build artifacts. -export CARGOKIT_TARGET_TEMP_DIR=$TARGET_TEMP_DIR - -# Output directory for final artifacts. -export CARGOKIT_OUTPUT_DIR=$PODS_CONFIGURATION_BUILD_DIR/$PRODUCT_NAME - -# Directory to store built tool artifacts. -export CARGOKIT_TOOL_TEMP_DIR=$TARGET_TEMP_DIR/build_tool - -# Directory inside root project. Not necessarily the top level directory of root project. -export CARGOKIT_ROOT_PROJECT_DIR=$SRCROOT - -FLUTTER_EXPORT_BUILD_ENVIRONMENT=( - "$PODS_ROOT/../Flutter/ephemeral/flutter_export_environment.sh" # macOS - "$PODS_ROOT/../Flutter/flutter_export_environment.sh" # iOS -) - -for path in "${FLUTTER_EXPORT_BUILD_ENVIRONMENT[@]}" -do - if [[ -f "$path" ]]; then - source "$path" - fi -done - -sh "$BASEDIR/run_build_tool.sh" build-pod "$@" - -# Make a symlink from built framework to phony file, which will be used as input to -# build script. This should force rebuild (podspec currently doesn't support alwaysOutOfDate -# attribute on custom build phase) -ln -fs "$OBJROOT/XCBuildData/build.db" "${BUILT_PRODUCTS_DIR}/cargokit_phony" -ln -fs "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}" "${BUILT_PRODUCTS_DIR}/cargokit_phony_out" diff --git a/cargokit/build_tool/README.md b/cargokit/build_tool/README.md deleted file mode 100644 index 3816eca3..00000000 --- a/cargokit/build_tool/README.md +++ /dev/null @@ -1,2 +0,0 @@ -A sample command-line application with an entrypoint in `bin/`, library code -in `lib/`, and example unit test in `test/`. diff --git a/cargokit/build_tool/analysis_options.yaml b/cargokit/build_tool/analysis_options.yaml deleted file mode 100644 index a1aad5b3..00000000 --- a/cargokit/build_tool/analysis_options.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. - -include: package:lints/recommended.yaml - -# Uncomment the following section to specify additional rules. - -linter: - rules: - - prefer_relative_imports - - directives_ordering - -# analyzer: -# exclude: -# - path/to/excluded/files/** - -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options diff --git a/cargokit/build_tool/bin/build_tool.dart b/cargokit/build_tool/bin/build_tool.dart deleted file mode 100644 index f27ec75c..00000000 --- a/cargokit/build_tool/bin/build_tool.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:build_tool/build_tool.dart' as build_tool; - -void main(List arguments) { - build_tool.runMain(arguments); -} diff --git a/cargokit/build_tool/lib/build_tool.dart b/cargokit/build_tool/lib/build_tool.dart deleted file mode 100644 index b329c01a..00000000 --- a/cargokit/build_tool/lib/build_tool.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'src/build_tool.dart' as build_tool; - -Future runMain(List args) async { - return build_tool.runMain(args); -} diff --git a/cargokit/build_tool/lib/src/android_environment.dart b/cargokit/build_tool/lib/src/android_environment.dart deleted file mode 100644 index 9342964b..00000000 --- a/cargokit/build_tool/lib/src/android_environment.dart +++ /dev/null @@ -1,192 +0,0 @@ -import 'dart:io'; -import 'dart:isolate'; -import 'dart:math' as math; - -import 'package:collection/collection.dart'; -import 'package:path/path.dart' as path; -import 'package:version/version.dart'; - -import 'target.dart'; -import 'util.dart'; - -class AndroidEnvironment { - AndroidEnvironment({ - required this.sdkPath, - required this.ndkVersion, - required this.minSdkVersion, - required this.targetTempDir, - required this.target, - }); - - static void clangLinkerWrapper(List args) { - final clang = Platform.environment['_CARGOKIT_NDK_LINK_CLANG']; - if (clang == null) { - throw Exception( - "cargo-ndk rustc linker: didn't find _CARGOKIT_NDK_LINK_CLANG env var"); - } - final target = Platform.environment['_CARGOKIT_NDK_LINK_TARGET']; - if (target == null) { - throw Exception( - "cargo-ndk rustc linker: didn't find _CARGOKIT_NDK_LINK_TARGET env var"); - } - - runCommand(clang, [ - target, - ...args, - ]); - } - - /// Full path to Android SDK. - final String sdkPath; - - /// Full version of Android NDK. - final String ndkVersion; - - /// Minimum supported SDK version. - final int minSdkVersion; - - /// Target directory for build artifacts. - final String targetTempDir; - - /// Target being built. - final Target target; - - bool ndkIsInstalled() { - final ndkPath = path.join(sdkPath, 'ndk', ndkVersion); - final ndkPackageXml = File(path.join(ndkPath, 'package.xml')); - return ndkPackageXml.existsSync(); - } - - void installNdk({ - required String javaHome, - }) { - final sdkManagerExtension = Platform.isWindows ? '.bat' : ''; - final sdkManager = path.join( - sdkPath, - 'cmdline-tools', - 'latest', - 'bin', - 'sdkmanager$sdkManagerExtension', - ); - - log.info('Installing NDK $ndkVersion'); - runCommand(sdkManager, [ - '--install', - 'ndk;$ndkVersion', - ], environment: { - 'JAVA_HOME': javaHome, - }); - } - - Future> buildEnvironment() async { - final hostArch = Platform.isMacOS - ? "darwin-x86_64" - : (Platform.isLinux ? "linux-x86_64" : "windows-x86_64"); - - final ndkPath = path.join(sdkPath, 'ndk', ndkVersion); - final toolchainPath = path.join( - ndkPath, - 'toolchains', - 'llvm', - 'prebuilt', - hostArch, - 'bin', - ); - - final minSdkVersion = - math.max(target.androidMinSdkVersion!, this.minSdkVersion); - - final exe = Platform.isWindows ? '.exe' : ''; - - final arKey = 'AR_${target.rust}'; - final arValue = ['${target.rust}-ar', 'llvm-ar', 'llvm-ar.exe'] - .map((e) => path.join(toolchainPath, e)) - .firstWhereOrNull((element) => File(element).existsSync()); - if (arValue == null) { - throw Exception('Failed to find ar for $target in $toolchainPath'); - } - - final targetArg = '--target=${target.rust}$minSdkVersion'; - - final ccKey = 'CC_${target.rust}'; - final ccValue = path.join(toolchainPath, 'clang$exe'); - final cfFlagsKey = 'CFLAGS_${target.rust}'; - final cFlagsValue = targetArg; - - final cxxKey = 'CXX_${target.rust}'; - final cxxValue = path.join(toolchainPath, 'clang++$exe'); - final cxxFlagsKey = 'CXXFLAGS_${target.rust}'; - final cxxFlagsValue = targetArg; - - final linkerKey = - 'cargo_target_${target.rust.replaceAll('-', '_')}_linker'.toUpperCase(); - - final ranlibKey = 'RANLIB_${target.rust}'; - final ranlibValue = path.join(toolchainPath, 'llvm-ranlib$exe'); - - final ndkVersionParsed = Version.parse(ndkVersion); - final rustFlagsKey = 'CARGO_ENCODED_RUSTFLAGS'; - final rustFlagsValue = _libGccWorkaround(targetTempDir, ndkVersionParsed); - - final runRustTool = - Platform.isWindows ? 'run_build_tool.cmd' : 'run_build_tool.sh'; - - final packagePath = (await Isolate.resolvePackageUri( - Uri.parse('package:build_tool/buildtool.dart')))! - .toFilePath(); - final selfPath = path.canonicalize(path.join( - packagePath, - '..', - '..', - '..', - runRustTool, - )); - - // Make sure that run_build_tool is working properly even initially launched directly - // through dart run. - final toolTempDir = - Platform.environment['CARGOKIT_TOOL_TEMP_DIR'] ?? targetTempDir; - - return { - arKey: arValue, - ccKey: ccValue, - cfFlagsKey: cFlagsValue, - cxxKey: cxxValue, - cxxFlagsKey: cxxFlagsValue, - ranlibKey: ranlibValue, - rustFlagsKey: rustFlagsValue, - linkerKey: selfPath, - // Recognized by main() so we know when we're acting as a wrapper - '_CARGOKIT_NDK_LINK_TARGET': targetArg, - '_CARGOKIT_NDK_LINK_CLANG': ccValue, - 'CARGOKIT_TOOL_TEMP_DIR': toolTempDir, - }; - } - - // Workaround for libgcc missing in NDK23, inspired by cargo-ndk - String _libGccWorkaround(String buildDir, Version ndkVersion) { - final workaroundDir = path.join( - buildDir, - 'cargokit', - 'libgcc_workaround', - '${ndkVersion.major}', - ); - Directory(workaroundDir).createSync(recursive: true); - if (ndkVersion.major >= 23) { - File(path.join(workaroundDir, 'libgcc.a')) - .writeAsStringSync('INPUT(-lunwind)'); - } else { - // Other way around, untested, forward libgcc.a from libunwind once Rust - // gets updated for NDK23+. - File(path.join(workaroundDir, 'libunwind.a')) - .writeAsStringSync('INPUT(-lgcc)'); - } - - var rustFlags = Platform.environment['CARGO_ENCODED_RUSTFLAGS'] ?? ''; - if (rustFlags.isNotEmpty) { - rustFlags = '$rustFlags\x1f'; - } - rustFlags = '$rustFlags-L\x1f$workaroundDir'; - return rustFlags; - } -} diff --git a/cargokit/build_tool/lib/src/artifacts_provider.dart b/cargokit/build_tool/lib/src/artifacts_provider.dart deleted file mode 100644 index ef655a9e..00000000 --- a/cargokit/build_tool/lib/src/artifacts_provider.dart +++ /dev/null @@ -1,263 +0,0 @@ -import 'dart:io'; - -import 'package:ed25519_edwards/ed25519_edwards.dart'; -import 'package:http/http.dart'; -import 'package:logging/logging.dart'; -import 'package:path/path.dart' as path; - -import 'builder.dart'; -import 'crate_hash.dart'; -import 'options.dart'; -import 'precompile_binaries.dart'; -import 'rustup.dart'; -import 'target.dart'; - -class Artifact { - /// File system location of the artifact. - final String path; - - /// Actual file name that the artifact should have in destination folder. - final String finalFileName; - - AritifactType get type { - if (finalFileName.endsWith('.dll') || - finalFileName.endsWith('.dll.lib') || - finalFileName.endsWith('.pdb') || - finalFileName.endsWith('.so') || - finalFileName.endsWith('.dylib')) { - return AritifactType.dylib; - } else if (finalFileName.endsWith('.lib') || finalFileName.endsWith('.a')) { - return AritifactType.staticlib; - } else { - throw Exception('Unknown artifact type for $finalFileName'); - } - } - - Artifact({ - required this.path, - required this.finalFileName, - }); -} - -final _log = Logger('artifacts_provider'); - -class ArtifactProvider { - ArtifactProvider({ - required this.environment, - required this.userOptions, - }); - - final BuildEnvironment environment; - final CargokitUserOptions userOptions; - - Future>> getArtifacts(List targets) async { - final result = await _getPrecompiledArtifacts(targets); - - final pendingTargets = List.of(targets); - pendingTargets.removeWhere((element) => result.containsKey(element)); - - if (pendingTargets.isEmpty) { - return result; - } - - final rustup = Rustup(); - for (final target in targets) { - final builder = RustBuilder(target: target, environment: environment); - builder.prepare(rustup); - _log.info('Building ${environment.crateInfo.packageName} for $target'); - final targetDir = await builder.build(); - // For local build accept both static and dynamic libraries. - final artifactNames = { - ...getArtifactNames( - target: target, - libraryName: environment.crateInfo.packageName, - aritifactType: AritifactType.dylib, - remote: false, - ), - ...getArtifactNames( - target: target, - libraryName: environment.crateInfo.packageName, - aritifactType: AritifactType.staticlib, - remote: false, - ) - }; - final artifacts = artifactNames - .map((artifactName) => Artifact( - path: path.join(targetDir, artifactName), - finalFileName: artifactName, - )) - .where((element) => File(element.path).existsSync()) - .toList(); - result[target] = artifacts; - } - return result; - } - - Future>> _getPrecompiledArtifacts( - List targets) async { - if (userOptions.usePrecompiledBinaries == false) { - _log.info('Precompiled binaries are disabled'); - return {}; - } - if (environment.crateOptions.precompiledBinaries == null) { - _log.fine('Precompiled binaries not enabled for this crate'); - return {}; - } - - final start = Stopwatch()..start(); - final crateHash = CrateHash.compute(environment.manifestDir, - tempStorage: environment.targetTempDir); - _log.fine( - 'Computed crate hash $crateHash in ${start.elapsedMilliseconds}ms'); - - final downloadedArtifactsDir = - path.join(environment.targetTempDir, 'precompiled', crateHash); - Directory(downloadedArtifactsDir).createSync(recursive: true); - - final res = >{}; - - for (final target in targets) { - final requiredArtifacts = getArtifactNames( - target: target, - libraryName: environment.crateInfo.packageName, - remote: true, - ); - final artifactsForTarget = []; - - for (final artifact in requiredArtifacts) { - final fileName = PrecompileBinaries.fileName(target, artifact); - final downloadedPath = path.join(downloadedArtifactsDir, fileName); - if (!File(downloadedPath).existsSync()) { - final signatureFileName = - PrecompileBinaries.signatureFileName(target, artifact); - await _tryDownloadArtifacts( - crateHash: crateHash, - fileName: fileName, - signatureFileName: signatureFileName, - finalPath: downloadedPath, - ); - } - if (File(downloadedPath).existsSync()) { - artifactsForTarget.add(Artifact( - path: downloadedPath, - finalFileName: artifact, - )); - } else { - break; - } - } - - // Only provide complete set of artifacts. - if (artifactsForTarget.length == requiredArtifacts.length) { - _log.fine('Found precompiled artifacts for $target'); - res[target] = artifactsForTarget; - } - } - - return res; - } - - static Future _get(Uri url, {Map? headers}) async { - int attempt = 0; - const maxAttempts = 10; - while (true) { - try { - return await get(url, headers: headers); - } on SocketException catch (e) { - // Try to detect reset by peer error and retry. - if (attempt++ < maxAttempts && - (e.osError?.errorCode == 54 || e.osError?.errorCode == 10054)) { - _log.severe( - 'Failed to download $url: $e, attempt $attempt of $maxAttempts, will retry...'); - await Future.delayed(Duration(seconds: 1)); - continue; - } else { - rethrow; - } - } - } - } - - Future _tryDownloadArtifacts({ - required String crateHash, - required String fileName, - required String signatureFileName, - required String finalPath, - }) async { - final precompiledBinaries = environment.crateOptions.precompiledBinaries!; - final prefix = precompiledBinaries.uriPrefix; - final url = Uri.parse('$prefix$crateHash/$fileName'); - final signatureUrl = Uri.parse('$prefix$crateHash/$signatureFileName'); - _log.fine('Downloading signature from $signatureUrl'); - final signature = await _get(signatureUrl); - if (signature.statusCode == 404) { - _log.warning( - 'Precompiled binaries not available for crate hash $crateHash ($fileName)'); - return; - } - if (signature.statusCode != 200) { - _log.severe( - 'Failed to download signature $signatureUrl: status ${signature.statusCode}'); - return; - } - _log.fine('Downloading binary from $url'); - final res = await _get(url); - if (res.statusCode != 200) { - _log.severe('Failed to download binary $url: status ${res.statusCode}'); - return; - } - if (verify( - precompiledBinaries.publicKey, res.bodyBytes, signature.bodyBytes)) { - File(finalPath).writeAsBytesSync(res.bodyBytes); - } else { - _log.shout('Signature verification failed! Ignoring binary.'); - } - } -} - -enum AritifactType { - staticlib, - dylib, -} - -AritifactType artifactTypeForTarget(Target target) { - if (target.darwinPlatform != null) { - return AritifactType.staticlib; - } else { - return AritifactType.dylib; - } -} - -List getArtifactNames({ - required Target target, - required String libraryName, - required bool remote, - AritifactType? aritifactType, -}) { - aritifactType ??= artifactTypeForTarget(target); - if (target.darwinArch != null) { - if (aritifactType == AritifactType.staticlib) { - return ['lib$libraryName.a']; - } else { - return ['lib$libraryName.dylib']; - } - } else if (target.rust.contains('-windows-')) { - if (aritifactType == AritifactType.staticlib) { - return ['$libraryName.lib']; - } else { - return [ - '$libraryName.dll', - '$libraryName.dll.lib', - if (!remote) '$libraryName.pdb' - ]; - } - } else if (target.rust.contains('-linux-')) { - if (aritifactType == AritifactType.staticlib) { - return ['lib$libraryName.a']; - } else { - return ['lib$libraryName.so']; - } - } else { - throw Exception("Unsupported target: ${target.rust}"); - } -} diff --git a/cargokit/build_tool/lib/src/build_cmake.dart b/cargokit/build_tool/lib/src/build_cmake.dart deleted file mode 100644 index 9154371e..00000000 --- a/cargokit/build_tool/lib/src/build_cmake.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'dart:io'; - -import 'package:path/path.dart' as path; - -import 'artifacts_provider.dart'; -import 'builder.dart'; -import 'environment.dart'; -import 'options.dart'; -import 'target.dart'; - -class BuildCMake { - final CargokitUserOptions userOptions; - - BuildCMake({required this.userOptions}); - - Future build() async { - final targetPlatform = Environment.targetPlatform; - final target = Target.forFlutterName(Environment.targetPlatform); - if (target == null) { - throw Exception("Unknown target platform: $targetPlatform"); - } - - final environment = BuildEnvironment.fromEnvironment(isAndroid: false); - final provider = - ArtifactProvider(environment: environment, userOptions: userOptions); - final artifacts = await provider.getArtifacts([target]); - - final libs = artifacts[target]!; - - for (final lib in libs) { - if (lib.type == AritifactType.dylib) { - File(lib.path) - .copySync(path.join(Environment.outputDir, lib.finalFileName)); - } - } - } -} diff --git a/cargokit/build_tool/lib/src/build_gradle.dart b/cargokit/build_tool/lib/src/build_gradle.dart deleted file mode 100644 index 469c8b2d..00000000 --- a/cargokit/build_tool/lib/src/build_gradle.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'dart:io'; - -import 'package:logging/logging.dart'; -import 'package:path/path.dart' as path; - -import 'artifacts_provider.dart'; -import 'builder.dart'; -import 'environment.dart'; -import 'options.dart'; -import 'target.dart'; - -final log = Logger('build_gradle'); - -class BuildGradle { - BuildGradle({required this.userOptions}); - - final CargokitUserOptions userOptions; - - Future build() async { - final targets = Environment.targetPlatforms.map((arch) { - final target = Target.forFlutterName(arch); - if (target == null) { - throw Exception( - "Unknown darwin target or platform: $arch, ${Environment.darwinPlatformName}"); - } - return target; - }).toList(); - - final environment = BuildEnvironment.fromEnvironment(isAndroid: true); - final provider = - ArtifactProvider(environment: environment, userOptions: userOptions); - final artifacts = await provider.getArtifacts(targets); - - for (final target in targets) { - final libs = artifacts[target]!; - final outputDir = path.join(Environment.outputDir, target.android!); - Directory(outputDir).createSync(recursive: true); - - for (final lib in libs) { - if (lib.type == AritifactType.dylib) { - File(lib.path).copySync(path.join(outputDir, lib.finalFileName)); - } - } - } - } -} diff --git a/cargokit/build_tool/lib/src/build_pod.dart b/cargokit/build_tool/lib/src/build_pod.dart deleted file mode 100644 index f01401e1..00000000 --- a/cargokit/build_tool/lib/src/build_pod.dart +++ /dev/null @@ -1,86 +0,0 @@ -import 'dart:io'; - -import 'package:path/path.dart' as path; - -import 'artifacts_provider.dart'; -import 'builder.dart'; -import 'environment.dart'; -import 'options.dart'; -import 'target.dart'; -import 'util.dart'; - -class BuildPod { - BuildPod({required this.userOptions}); - - final CargokitUserOptions userOptions; - - Future build() async { - final targets = Environment.darwinArchs.map((arch) { - final target = Target.forDarwin( - platformName: Environment.darwinPlatformName, darwinAarch: arch); - if (target == null) { - throw Exception( - "Unknown darwin target or platform: $arch, ${Environment.darwinPlatformName}"); - } - return target; - }).toList(); - - final environment = BuildEnvironment.fromEnvironment(isAndroid: false); - final provider = - ArtifactProvider(environment: environment, userOptions: userOptions); - final artifacts = await provider.getArtifacts(targets); - - void performLipo(String targetFile, Iterable sourceFiles) { - runCommand("lipo", [ - '-create', - ...sourceFiles, - '-output', - targetFile, - ]); - } - - final outputDir = Environment.outputDir; - - Directory(outputDir).createSync(recursive: true); - - final staticLibs = artifacts.values - .expand((element) => element) - .where((element) => element.type == AritifactType.staticlib) - .toList(); - final dynamicLibs = artifacts.values - .expand((element) => element) - .where((element) => element.type == AritifactType.dylib) - .toList(); - - final libName = environment.crateInfo.packageName; - - // If there is static lib, use it and link it with pod - if (staticLibs.isNotEmpty) { - final finalTargetFile = path.join(outputDir, "lib$libName.a"); - performLipo(finalTargetFile, staticLibs.map((e) => e.path)); - } else { - // Otherwise try to replace bundle dylib with our dylib - final bundlePaths = [ - '$libName.framework/Versions/A/$libName', - '$libName.framework/$libName', - ]; - - for (final bundlePath in bundlePaths) { - final targetFile = path.join(outputDir, bundlePath); - if (File(targetFile).existsSync()) { - performLipo(targetFile, dynamicLibs.map((e) => e.path)); - - // Replace absolute id with @rpath one so that it works properly - // when moved to Frameworks. - runCommand("install_name_tool", [ - '-id', - '@rpath/$bundlePath', - targetFile, - ]); - return; - } - } - throw Exception('Unable to find bundle for dynamic library'); - } - } -} diff --git a/cargokit/build_tool/lib/src/build_tool.dart b/cargokit/build_tool/lib/src/build_tool.dart deleted file mode 100644 index 1d9462af..00000000 --- a/cargokit/build_tool/lib/src/build_tool.dart +++ /dev/null @@ -1,268 +0,0 @@ -import 'dart:io'; - -import 'package:args/command_runner.dart'; -import 'package:ed25519_edwards/ed25519_edwards.dart'; -import 'package:github/github.dart'; -import 'package:hex/hex.dart'; -import 'package:logging/logging.dart'; - -import 'android_environment.dart'; -import 'build_cmake.dart'; -import 'build_gradle.dart'; -import 'build_pod.dart'; -import 'logging.dart'; -import 'options.dart'; -import 'precompile_binaries.dart'; -import 'target.dart'; -import 'util.dart'; -import 'verify_binaries.dart'; - -final log = Logger('build_tool'); - -abstract class BuildCommand extends Command { - Future runBuildCommand(CargokitUserOptions options); - - @override - Future run() async { - final options = CargokitUserOptions.load(); - - if (options.verboseLogging || - Platform.environment['CARGOKIT_VERBOSE'] == '1') { - enableVerboseLogging(); - } - - await runBuildCommand(options); - } -} - -class BuildPodCommand extends BuildCommand { - @override - final name = 'build-pod'; - - @override - final description = 'Build cocoa pod library'; - - @override - Future runBuildCommand(CargokitUserOptions options) async { - final build = BuildPod(userOptions: options); - await build.build(); - } -} - -class BuildGradleCommand extends BuildCommand { - @override - final name = 'build-gradle'; - - @override - final description = 'Build android library'; - - @override - Future runBuildCommand(CargokitUserOptions options) async { - final build = BuildGradle(userOptions: options); - await build.build(); - } -} - -class BuildCMakeCommand extends BuildCommand { - @override - final name = 'build-cmake'; - - @override - final description = 'Build CMake library'; - - @override - Future runBuildCommand(CargokitUserOptions options) async { - final build = BuildCMake(userOptions: options); - await build.build(); - } -} - -class GenKeyCommand extends Command { - @override - final name = 'gen-key'; - - @override - final description = 'Generate key pair for signing precompiled binaries'; - - @override - void run() { - final kp = generateKey(); - final private = HEX.encode(kp.privateKey.bytes); - final public = HEX.encode(kp.publicKey.bytes); - print("Private Key: $private"); - print("Public Key: $public"); - } -} - -class PrecompileBinariesCommand extends Command { - PrecompileBinariesCommand() { - argParser - ..addOption( - 'repository', - mandatory: true, - help: 'Github repository slug in format owner/name', - ) - ..addOption( - 'manifest-dir', - mandatory: true, - help: 'Directory containing Cargo.toml', - ) - ..addMultiOption('target', - help: 'Rust target triple of artifact to build.\n' - 'Can be specified multiple times or omitted in which case\n' - 'all targets for current platform will be built.') - ..addOption( - 'android-sdk-location', - help: 'Location of Android SDK (if available)', - ) - ..addOption( - 'android-ndk-version', - help: 'Android NDK version (if available)', - ) - ..addOption( - 'android-min-sdk-version', - help: 'Android minimum rquired version (if available)', - ) - ..addOption( - 'temp-dir', - help: 'Directory to store temporary build artifacts', - ) - ..addFlag( - "verbose", - abbr: "v", - defaultsTo: false, - help: "Enable verbose logging", - ); - } - - @override - final name = 'precompile-binaries'; - - @override - final description = 'Prebuild and upload binaries\n' - 'Private key must be passed through PRIVATE_KEY environment variable. ' - 'Use gen_key through generate priave key.\n' - 'Github token must be passed as GITHUB_TOKEN environment variable.\n'; - - @override - Future run() async { - final verbose = argResults!['verbose'] as bool; - if (verbose) { - enableVerboseLogging(); - } - - final privateKeyString = Platform.environment['PRIVATE_KEY']; - if (privateKeyString == null) { - throw ArgumentError('Missing PRIVATE_KEY environment variable'); - } - final githubToken = Platform.environment['GITHUB_TOKEN']; - if (githubToken == null) { - throw ArgumentError('Missing GITHUB_TOKEN environment variable'); - } - final privateKey = HEX.decode(privateKeyString); - if (privateKey.length != 64) { - throw ArgumentError('Private key must be 64 bytes long'); - } - final manifestDir = argResults!['manifest-dir'] as String; - if (!Directory(manifestDir).existsSync()) { - throw ArgumentError('Manifest directory does not exist: $manifestDir'); - } - String? androidMinSdkVersionString = - argResults!['android-min-sdk-version'] as String?; - int? androidMinSdkVersion; - if (androidMinSdkVersionString != null) { - androidMinSdkVersion = int.tryParse(androidMinSdkVersionString); - if (androidMinSdkVersion == null) { - throw ArgumentError( - 'Invalid android-min-sdk-version: $androidMinSdkVersionString'); - } - } - final targetStrigns = argResults!['target'] as List; - final targets = targetStrigns.map((target) { - final res = Target.forRustTriple(target); - if (res == null) { - throw ArgumentError('Invalid target: $target'); - } - return res; - }).toList(growable: false); - final precompileBinaries = PrecompileBinaries( - privateKey: PrivateKey(privateKey), - githubToken: githubToken, - manifestDir: manifestDir, - repositorySlug: RepositorySlug.full(argResults!['repository'] as String), - targets: targets, - androidSdkLocation: argResults!['android-sdk-location'] as String?, - androidNdkVersion: argResults!['android-ndk-version'] as String?, - androidMinSdkVersion: androidMinSdkVersion, - tempDir: argResults!['temp-dir'] as String?, - ); - - await precompileBinaries.run(); - } -} - -class VerifyBinariesCommand extends Command { - VerifyBinariesCommand() { - argParser.addOption( - 'manifest-dir', - mandatory: true, - help: 'Directory containing Cargo.toml', - ); - } - - @override - final name = "verify-binaries"; - - @override - final description = 'Verifies published binaries\n' - 'Checks whether there is a binary published for each targets\n' - 'and checks the signature.'; - - @override - Future run() async { - final manifestDir = argResults!['manifest-dir'] as String; - final verifyBinaries = VerifyBinaries( - manifestDir: manifestDir, - ); - await verifyBinaries.run(); - } -} - -Future runMain(List args) async { - try { - // Init logging before options are loaded - initLogging(); - - if (Platform.environment['_CARGOKIT_NDK_LINK_TARGET'] != null) { - return AndroidEnvironment.clangLinkerWrapper(args); - } - - final runner = CommandRunner('build_tool', 'Cargokit built_tool') - ..addCommand(BuildPodCommand()) - ..addCommand(BuildGradleCommand()) - ..addCommand(BuildCMakeCommand()) - ..addCommand(GenKeyCommand()) - ..addCommand(PrecompileBinariesCommand()) - ..addCommand(VerifyBinariesCommand()); - - await runner.run(args); - } on ArgumentError catch (e) { - stderr.writeln(e.toString()); - exit(1); - } catch (e, s) { - log.severe(kDoubleSeparator); - log.severe('Cargokit BuildTool failed with error:'); - log.severe(kSeparator); - log.severe(e); - // This tells user to install Rust, there's no need to pollute the log with - // stack trace. - if (e is! RustupNotFoundException) { - log.severe(kSeparator); - log.severe(s); - log.severe(kSeparator); - log.severe('BuildTool arguments: $args'); - } - log.severe(kDoubleSeparator); - exit(1); - } -} diff --git a/cargokit/build_tool/lib/src/builder.dart b/cargokit/build_tool/lib/src/builder.dart deleted file mode 100644 index 570a5375..00000000 --- a/cargokit/build_tool/lib/src/builder.dart +++ /dev/null @@ -1,195 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:logging/logging.dart'; -import 'package:path/path.dart' as path; - -import 'android_environment.dart'; -import 'cargo.dart'; -import 'environment.dart'; -import 'options.dart'; -import 'rustup.dart'; -import 'target.dart'; -import 'util.dart'; - -final _log = Logger('builder'); - -enum BuildConfiguration { - debug, - release, - profile, -} - -extension on BuildConfiguration { - bool get isDebug => this == BuildConfiguration.debug; - String get rustName => switch (this) { - BuildConfiguration.debug => 'debug', - BuildConfiguration.release => 'release', - BuildConfiguration.profile => 'release', - }; -} - -class BuildException implements Exception { - final String message; - - BuildException(this.message); - - @override - String toString() { - return 'BuildException: $message'; - } -} - -class BuildEnvironment { - final BuildConfiguration configuration; - final CargokitCrateOptions crateOptions; - final String targetTempDir; - final String manifestDir; - final CrateInfo crateInfo; - - final bool isAndroid; - final String? androidSdkPath; - final String? androidNdkVersion; - final int? androidMinSdkVersion; - final String? javaHome; - - BuildEnvironment({ - required this.configuration, - required this.crateOptions, - required this.targetTempDir, - required this.manifestDir, - required this.crateInfo, - required this.isAndroid, - this.androidSdkPath, - this.androidNdkVersion, - this.androidMinSdkVersion, - this.javaHome, - }); - - static BuildConfiguration parseBuildConfiguration(String value) { - // XCode configuration adds the flavor to configuration name. - final firstSegment = value.split('-').first; - final buildConfiguration = BuildConfiguration.values.firstWhereOrNull( - (e) => e.name == firstSegment, - ); - if (buildConfiguration == null) { - _log.warning('Unknown build configuraiton $value, will assume release'); - return BuildConfiguration.release; - } - return buildConfiguration; - } - - static BuildEnvironment fromEnvironment({ - required bool isAndroid, - }) { - final buildConfiguration = - parseBuildConfiguration(Environment.configuration); - final manifestDir = Environment.manifestDir; - final crateOptions = CargokitCrateOptions.load( - manifestDir: manifestDir, - ); - final crateInfo = CrateInfo.load(manifestDir); - return BuildEnvironment( - configuration: buildConfiguration, - crateOptions: crateOptions, - targetTempDir: Environment.targetTempDir, - manifestDir: manifestDir, - crateInfo: crateInfo, - isAndroid: isAndroid, - androidSdkPath: isAndroid ? Environment.sdkPath : null, - androidNdkVersion: isAndroid ? Environment.ndkVersion : null, - androidMinSdkVersion: - isAndroid ? int.parse(Environment.minSdkVersion) : null, - javaHome: isAndroid ? Environment.javaHome : null, - ); - } -} - -class RustBuilder { - final Target target; - final BuildEnvironment environment; - - RustBuilder({ - required this.target, - required this.environment, - }); - - void prepare( - Rustup rustup, - ) { - final toolchain = _toolchain; - if (rustup.installedTargets(toolchain) == null) { - rustup.installToolchain(toolchain); - } - if (toolchain == 'nightly') { - rustup.installRustSrcForNightly(); - } - if (!rustup.installedTargets(toolchain)!.contains(target.rust)) { - rustup.installTarget(target.rust, toolchain: toolchain); - } - } - - CargoBuildOptions? get _buildOptions => - environment.crateOptions.cargo[environment.configuration]; - - String get _toolchain => _buildOptions?.toolchain.name ?? 'stable'; - - /// Returns the path of directory containing build artifacts. - Future build() async { - final extraArgs = _buildOptions?.flags ?? []; - final manifestPath = path.join(environment.manifestDir, 'Cargo.toml'); - runCommand( - 'rustup', - [ - 'run', - _toolchain, - 'cargo', - 'build', - ...extraArgs, - '--manifest-path', - manifestPath, - '-p', - environment.crateInfo.packageName, - if (!environment.configuration.isDebug) '--release', - '--target', - target.rust, - '--target-dir', - environment.targetTempDir, - ], - environment: await _buildEnvironment(), - ); - return path.join( - environment.targetTempDir, - target.rust, - environment.configuration.rustName, - ); - } - - Future> _buildEnvironment() async { - if (target.android == null) { - return {}; - } else { - final sdkPath = environment.androidSdkPath; - final ndkVersion = environment.androidNdkVersion; - final minSdkVersion = environment.androidMinSdkVersion; - if (sdkPath == null) { - throw BuildException('androidSdkPath is not set'); - } - if (ndkVersion == null) { - throw BuildException('androidNdkVersion is not set'); - } - if (minSdkVersion == null) { - throw BuildException('androidMinSdkVersion is not set'); - } - final env = AndroidEnvironment( - sdkPath: sdkPath, - ndkVersion: ndkVersion, - minSdkVersion: minSdkVersion, - targetTempDir: environment.targetTempDir, - target: target, - ); - if (!env.ndkIsInstalled() && environment.javaHome != null) { - env.installNdk(javaHome: environment.javaHome!); - } - return env.buildEnvironment(); - } - } -} diff --git a/cargokit/build_tool/lib/src/cargo.dart b/cargokit/build_tool/lib/src/cargo.dart deleted file mode 100644 index 0d4483ff..00000000 --- a/cargokit/build_tool/lib/src/cargo.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'dart:io'; - -import 'package:path/path.dart' as path; -import 'package:toml/toml.dart'; - -class ManifestException { - ManifestException(this.message, {required this.fileName}); - - final String? fileName; - final String message; - - @override - String toString() { - if (fileName != null) { - return 'Failed to parse package manifest at $fileName: $message'; - } else { - return 'Failed to parse package manifest: $message'; - } - } -} - -class CrateInfo { - CrateInfo({required this.packageName}); - - final String packageName; - - static CrateInfo parseManifest(String manifest, {final String? fileName}) { - final toml = TomlDocument.parse(manifest); - final package = toml.toMap()['package']; - if (package == null) { - throw ManifestException('Missing package section', fileName: fileName); - } - final name = package['name']; - if (name == null) { - throw ManifestException('Missing package name', fileName: fileName); - } - return CrateInfo(packageName: name); - } - - static CrateInfo load(String manifestDir) { - final manifestFile = File(path.join(manifestDir, 'Cargo.toml')); - final manifest = manifestFile.readAsStringSync(); - return parseManifest(manifest, fileName: manifestFile.path); - } -} diff --git a/cargokit/build_tool/lib/src/crate_hash.dart b/cargokit/build_tool/lib/src/crate_hash.dart deleted file mode 100644 index e58c37ff..00000000 --- a/cargokit/build_tool/lib/src/crate_hash.dart +++ /dev/null @@ -1,121 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; -import 'dart:typed_data'; - -import 'package:collection/collection.dart'; -import 'package:convert/convert.dart'; -import 'package:crypto/crypto.dart'; -import 'package:path/path.dart' as path; - -class CrateHash { - /// Computes a hash uniquely identifying crate content. This takes into account - /// content all all .rs files inside the src directory, as well as Cargo.toml, - /// Cargo.lock, build.rs and cargokit.yaml. - /// - /// If [tempStorage] is provided, computed hash is stored in a file in that directory - /// and reused on subsequent calls if the crate content hasn't changed. - static String compute(String manifestDir, {String? tempStorage}) { - return CrateHash._( - manifestDir: manifestDir, - tempStorage: tempStorage, - )._compute(); - } - - CrateHash._({ - required this.manifestDir, - required this.tempStorage, - }); - - String _compute() { - final files = getFiles(); - final tempStorage = this.tempStorage; - if (tempStorage != null) { - final quickHash = _computeQuickHash(files); - final quickHashFolder = Directory(path.join(tempStorage, 'crate_hash')); - quickHashFolder.createSync(recursive: true); - final quickHashFile = File(path.join(quickHashFolder.path, quickHash)); - if (quickHashFile.existsSync()) { - return quickHashFile.readAsStringSync(); - } - final hash = _computeHash(files); - quickHashFile.writeAsStringSync(hash); - return hash; - } else { - return _computeHash(files); - } - } - - /// Computes a quick hash based on files stat (without reading contents). This - /// is used to cache the real hash, which is slower to compute since it involves - /// reading every single file. - String _computeQuickHash(List files) { - final output = AccumulatorSink(); - final input = sha256.startChunkedConversion(output); - - final data = ByteData(8); - for (final file in files) { - input.add(utf8.encode(file.path)); - final stat = file.statSync(); - data.setUint64(0, stat.size); - input.add(data.buffer.asUint8List()); - data.setUint64(0, stat.modified.millisecondsSinceEpoch); - input.add(data.buffer.asUint8List()); - } - - input.close(); - return base64Url.encode(output.events.single.bytes); - } - - String _computeHash(List files) { - final output = AccumulatorSink(); - final input = sha256.startChunkedConversion(output); - - void addTextFile(File file) { - // text Files are hashed by lines in case we're dealing with github checkout - // that auto-converts line endings. - final splitter = LineSplitter(); - if (file.existsSync()) { - final data = file.readAsStringSync(); - final lines = splitter.convert(data); - for (final line in lines) { - input.add(utf8.encode(line)); - } - } - } - - for (final file in files) { - addTextFile(file); - } - - input.close(); - final res = output.events.single; - - // Truncate to 128bits. - final hash = res.bytes.sublist(0, 16); - return hex.encode(hash); - } - - List getFiles() { - final src = Directory(path.join(manifestDir, 'src')); - final files = src - .listSync(recursive: true, followLinks: false) - .whereType() - .toList(); - files.sortBy((element) => element.path); - void addFile(String relative) { - final file = File(path.join(manifestDir, relative)); - if (file.existsSync()) { - files.add(file); - } - } - - addFile('Cargo.toml'); - addFile('Cargo.lock'); - addFile('build.rs'); - addFile('cargokit.yaml'); - return files; - } - - final String manifestDir; - final String? tempStorage; -} diff --git a/cargokit/build_tool/lib/src/environment.dart b/cargokit/build_tool/lib/src/environment.dart deleted file mode 100644 index 1d267edb..00000000 --- a/cargokit/build_tool/lib/src/environment.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'dart:io'; - -extension on String { - String resolveSymlink() => File(this).resolveSymbolicLinksSync(); -} - -class Environment { - /// Current build configuration (debug or release). - static String get configuration => - _getEnv("CARGOKIT_CONFIGURATION").toLowerCase(); - - static bool get isDebug => configuration == 'debug'; - static bool get isRelease => configuration == 'release'; - - /// Temporary directory where Rust build artifacts are placed. - static String get targetTempDir => _getEnv("CARGOKIT_TARGET_TEMP_DIR"); - - /// Final output directory where the build artifacts are placed. - static String get outputDir => _getEnvPath('CARGOKIT_OUTPUT_DIR'); - - /// Path to the crate manifest (containing Cargo.toml). - static String get manifestDir => _getEnvPath('CARGOKIT_MANIFEST_DIR'); - - /// Directory inside root project. Not necessarily root folder. Symlinks are - /// not resolved on purpose. - static String get rootProjectDir => _getEnv('CARGOKIT_ROOT_PROJECT_DIR'); - - // Pod - - /// Platform name (macosx, iphoneos, iphonesimulator). - static String get darwinPlatformName => - _getEnv("CARGOKIT_DARWIN_PLATFORM_NAME"); - - /// List of architectures to build for (arm64, armv7, x86_64). - static List get darwinArchs => - _getEnv("CARGOKIT_DARWIN_ARCHS").split(' '); - - // Gradle - static String get minSdkVersion => _getEnv("CARGOKIT_MIN_SDK_VERSION"); - static String get ndkVersion => _getEnv("CARGOKIT_NDK_VERSION"); - static String get sdkPath => _getEnvPath("CARGOKIT_SDK_DIR"); - static String get javaHome => _getEnvPath("CARGOKIT_JAVA_HOME"); - static List get targetPlatforms => - _getEnv("CARGOKIT_TARGET_PLATFORMS").split(','); - - // CMAKE - static String get targetPlatform => _getEnv("CARGOKIT_TARGET_PLATFORM"); - - static String _getEnv(String key) { - final res = Platform.environment[key]; - if (res == null) { - throw Exception("Missing environment variable $key"); - } - return res; - } - - static String _getEnvPath(String key) { - final res = _getEnv(key); - if (Directory(res).existsSync()) { - return res.resolveSymlink(); - } else { - return res; - } - } -} diff --git a/cargokit/build_tool/lib/src/logging.dart b/cargokit/build_tool/lib/src/logging.dart deleted file mode 100644 index 06392b99..00000000 --- a/cargokit/build_tool/lib/src/logging.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'dart:io'; - -import 'package:logging/logging.dart'; - -const String kSeparator = "--"; -const String kDoubleSeparator = "=="; - -bool _lastMessageWasSeparator = false; - -void _log(LogRecord rec) { - final prefix = '${rec.level.name}: '; - final out = rec.level == Level.SEVERE ? stderr : stdout; - if (rec.message == kSeparator) { - if (!_lastMessageWasSeparator) { - out.write(prefix); - out.writeln('-' * 80); - _lastMessageWasSeparator = true; - } - return; - } else if (rec.message == kDoubleSeparator) { - out.write(prefix); - out.writeln('=' * 80); - _lastMessageWasSeparator = true; - return; - } - out.write(prefix); - out.writeln(rec.message); - _lastMessageWasSeparator = false; -} - -void initLogging() { - Logger.root.level = Level.INFO; - Logger.root.onRecord.listen((LogRecord rec) { - final lines = rec.message.split('\n'); - for (final line in lines) { - if (line.isNotEmpty || lines.length == 1 || line != lines.last) { - _log(LogRecord( - rec.level, - line, - rec.loggerName, - )); - } - } - }); -} - -void enableVerboseLogging() { - Logger.root.level = Level.ALL; -} diff --git a/cargokit/build_tool/lib/src/options.dart b/cargokit/build_tool/lib/src/options.dart deleted file mode 100644 index b2c0f7a8..00000000 --- a/cargokit/build_tool/lib/src/options.dart +++ /dev/null @@ -1,309 +0,0 @@ -import 'dart:io'; - -import 'package:collection/collection.dart'; -import 'package:ed25519_edwards/ed25519_edwards.dart'; -import 'package:hex/hex.dart'; -import 'package:logging/logging.dart'; -import 'package:path/path.dart' as path; -import 'package:source_span/source_span.dart'; -import 'package:yaml/yaml.dart'; - -import 'builder.dart'; -import 'environment.dart'; -import 'rustup.dart'; - -final _log = Logger('options'); - -/// A class for exceptions that have source span information attached. -class SourceSpanException implements Exception { - // This is a getter so that subclasses can override it. - /// A message describing the exception. - String get message => _message; - final String _message; - - // This is a getter so that subclasses can override it. - /// The span associated with this exception. - /// - /// This may be `null` if the source location can't be determined. - SourceSpan? get span => _span; - final SourceSpan? _span; - - SourceSpanException(this._message, this._span); - - /// Returns a string representation of `this`. - /// - /// [color] may either be a [String], a [bool], or `null`. If it's a string, - /// it indicates an ANSI terminal color escape that should be used to - /// highlight the span's text. If it's `true`, it indicates that the text - /// should be highlighted using the default color. If it's `false` or `null`, - /// it indicates that the text shouldn't be highlighted. - @override - String toString({Object? color}) { - if (span == null) return message; - return 'Error on ${span!.message(message, color: color)}'; - } -} - -enum Toolchain { - stable, - beta, - nightly, -} - -class CargoBuildOptions { - final Toolchain toolchain; - final List flags; - - CargoBuildOptions({ - required this.toolchain, - required this.flags, - }); - - static Toolchain _toolchainFromNode(YamlNode node) { - if (node case YamlScalar(value: String name)) { - final toolchain = - Toolchain.values.firstWhereOrNull((element) => element.name == name); - if (toolchain != null) { - return toolchain; - } - } - throw SourceSpanException( - 'Unknown toolchain. Must be one of ${Toolchain.values.map((e) => e.name)}.', - node.span); - } - - static CargoBuildOptions parse(YamlNode node) { - if (node is! YamlMap) { - throw SourceSpanException('Cargo options must be a map', node.span); - } - Toolchain toolchain = Toolchain.stable; - List flags = []; - for (final MapEntry(:key, :value) in node.nodes.entries) { - if (key case YamlScalar(value: 'toolchain')) { - toolchain = _toolchainFromNode(value); - } else if (key case YamlScalar(value: 'extra_flags')) { - if (value case YamlList(nodes: List list)) { - if (list.every((element) { - if (element case YamlScalar(value: String _)) { - return true; - } - return false; - })) { - flags = list.map((e) => e.value as String).toList(); - continue; - } - } - throw SourceSpanException( - 'Extra flags must be a list of strings', value.span); - } else { - throw SourceSpanException( - 'Unknown cargo option type. Must be "toolchain" or "extra_flags".', - key.span); - } - } - return CargoBuildOptions(toolchain: toolchain, flags: flags); - } -} - -extension on YamlMap { - /// Map that extracts keys so that we can do map case check on them. - Map get valueMap => - nodes.map((key, value) => MapEntry(key.value, value)); -} - -class PrecompiledBinaries { - final String uriPrefix; - final PublicKey publicKey; - - PrecompiledBinaries({ - required this.uriPrefix, - required this.publicKey, - }); - - static PublicKey _publicKeyFromHex(String key, SourceSpan? span) { - final bytes = HEX.decode(key); - if (bytes.length != 32) { - throw SourceSpanException( - 'Invalid public key. Must be 32 bytes long.', span); - } - return PublicKey(bytes); - } - - static PrecompiledBinaries parse(YamlNode node) { - if (node case YamlMap(valueMap: Map map)) { - if (map - case { - 'url_prefix': YamlNode urlPrefixNode, - 'public_key': YamlNode publicKeyNode, - }) { - final urlPrefix = switch (urlPrefixNode) { - YamlScalar(value: String urlPrefix) => urlPrefix, - _ => throw SourceSpanException( - 'Invalid URL prefix value.', urlPrefixNode.span), - }; - final publicKey = switch (publicKeyNode) { - YamlScalar(value: String publicKey) => - _publicKeyFromHex(publicKey, publicKeyNode.span), - _ => throw SourceSpanException( - 'Invalid public key value.', publicKeyNode.span), - }; - return PrecompiledBinaries( - uriPrefix: urlPrefix, - publicKey: publicKey, - ); - } - } - throw SourceSpanException( - 'Invalid precompiled binaries value. ' - 'Expected Map with "url_prefix" and "public_key".', - node.span); - } -} - -/// Cargokit options specified for Rust crate. -class CargokitCrateOptions { - CargokitCrateOptions({ - this.cargo = const {}, - this.precompiledBinaries, - }); - - final Map cargo; - final PrecompiledBinaries? precompiledBinaries; - - static CargokitCrateOptions parse(YamlNode node) { - if (node is! YamlMap) { - throw SourceSpanException('Cargokit options must be a map', node.span); - } - final options = {}; - PrecompiledBinaries? precompiledBinaries; - - for (final entry in node.nodes.entries) { - if (entry - case MapEntry( - key: YamlScalar(value: 'cargo'), - value: YamlNode node, - )) { - if (node is! YamlMap) { - throw SourceSpanException('Cargo options must be a map', node.span); - } - for (final MapEntry(:YamlNode key, :value) in node.nodes.entries) { - if (key case YamlScalar(value: String name)) { - final configuration = BuildConfiguration.values - .firstWhereOrNull((element) => element.name == name); - if (configuration != null) { - options[configuration] = CargoBuildOptions.parse(value); - continue; - } - } - throw SourceSpanException( - 'Unknown build configuration. Must be one of ${BuildConfiguration.values.map((e) => e.name)}.', - key.span); - } - } else if (entry.key case YamlScalar(value: 'precompiled_binaries')) { - precompiledBinaries = PrecompiledBinaries.parse(entry.value); - } else { - throw SourceSpanException( - 'Unknown cargokit option type. Must be "cargo" or "precompiled_binaries".', - entry.key.span); - } - } - return CargokitCrateOptions( - cargo: options, - precompiledBinaries: precompiledBinaries, - ); - } - - static CargokitCrateOptions load({ - required String manifestDir, - }) { - final uri = Uri.file(path.join(manifestDir, "cargokit.yaml")); - final file = File.fromUri(uri); - if (file.existsSync()) { - final contents = loadYamlNode(file.readAsStringSync(), sourceUrl: uri); - return parse(contents); - } else { - return CargokitCrateOptions(); - } - } -} - -class CargokitUserOptions { - // When Rustup is installed always build locally unless user opts into - // using precompiled binaries. - static bool defaultUsePrecompiledBinaries() { - return Rustup.executablePath() == null; - } - - CargokitUserOptions({ - required this.usePrecompiledBinaries, - required this.verboseLogging, - }); - - CargokitUserOptions._() - : usePrecompiledBinaries = defaultUsePrecompiledBinaries(), - verboseLogging = false; - - static CargokitUserOptions parse(YamlNode node) { - if (node is! YamlMap) { - throw SourceSpanException('Cargokit options must be a map', node.span); - } - bool usePrecompiledBinaries = defaultUsePrecompiledBinaries(); - bool verboseLogging = false; - - for (final entry in node.nodes.entries) { - if (entry.key case YamlScalar(value: 'use_precompiled_binaries')) { - if (entry.value case YamlScalar(value: bool value)) { - usePrecompiledBinaries = value; - continue; - } - throw SourceSpanException( - 'Invalid value for "use_precompiled_binaries". Must be a boolean.', - entry.value.span); - } else if (entry.key case YamlScalar(value: 'verbose_logging')) { - if (entry.value case YamlScalar(value: bool value)) { - verboseLogging = value; - continue; - } - throw SourceSpanException( - 'Invalid value for "verbose_logging". Must be a boolean.', - entry.value.span); - } else { - throw SourceSpanException( - 'Unknown cargokit option type. Must be "use_precompiled_binaries" or "verbose_logging".', - entry.key.span); - } - } - return CargokitUserOptions( - usePrecompiledBinaries: usePrecompiledBinaries, - verboseLogging: verboseLogging, - ); - } - - static CargokitUserOptions load() { - String fileName = "cargokit_options.yaml"; - var userProjectDir = Directory(Environment.rootProjectDir); - - while (userProjectDir.parent.path != userProjectDir.path) { - final configFile = File(path.join(userProjectDir.path, fileName)); - if (configFile.existsSync()) { - final contents = loadYamlNode( - configFile.readAsStringSync(), - sourceUrl: configFile.uri, - ); - final res = parse(contents); - if (res.verboseLogging) { - _log.info('Found user options file at ${configFile.path}'); - } - return res; - } - userProjectDir = userProjectDir.parent; - } - return CargokitUserOptions( - usePrecompiledBinaries: true, - verboseLogging: false, - ); - } - - final bool usePrecompiledBinaries; - final bool verboseLogging; -} diff --git a/cargokit/build_tool/lib/src/precompile_binaries.dart b/cargokit/build_tool/lib/src/precompile_binaries.dart deleted file mode 100644 index 39ffafc4..00000000 --- a/cargokit/build_tool/lib/src/precompile_binaries.dart +++ /dev/null @@ -1,199 +0,0 @@ -import 'dart:io'; - -import 'package:ed25519_edwards/ed25519_edwards.dart'; -import 'package:github/github.dart'; -import 'package:logging/logging.dart'; -import 'package:path/path.dart' as path; - -import 'artifacts_provider.dart'; -import 'builder.dart'; -import 'cargo.dart'; -import 'crate_hash.dart'; -import 'options.dart'; -import 'rustup.dart'; -import 'target.dart'; - -final _log = Logger('precompile_binaries'); - -class PrecompileBinaries { - PrecompileBinaries({ - required this.privateKey, - required this.githubToken, - required this.repositorySlug, - required this.manifestDir, - required this.targets, - this.androidSdkLocation, - this.androidNdkVersion, - this.androidMinSdkVersion, - this.tempDir, - }); - - final PrivateKey privateKey; - final String githubToken; - final RepositorySlug repositorySlug; - final String manifestDir; - final List targets; - final String? androidSdkLocation; - final String? androidNdkVersion; - final int? androidMinSdkVersion; - final String? tempDir; - - static String fileName(Target target, String name) { - return '${target.rust}_$name'; - } - - static String signatureFileName(Target target, String name) { - return '${target.rust}_$name.sig'; - } - - Future run() async { - final crateInfo = CrateInfo.load(manifestDir); - - final targets = List.of(this.targets); - if (targets.isEmpty) { - targets.addAll([ - ...Target.buildableTargets(), - if (androidSdkLocation != null) ...Target.androidTargets(), - ]); - } - - _log.info('Precompiling binaries for $targets'); - - final hash = CrateHash.compute(manifestDir); - _log.info('Computed crate hash: $hash'); - - final String tagName = 'precompiled_$hash'; - - final github = GitHub(auth: Authentication.withToken(githubToken)); - final repo = github.repositories; - final release = await _getOrCreateRelease( - repo: repo, - tagName: tagName, - packageName: crateInfo.packageName, - hash: hash, - ); - - final tempDir = this.tempDir != null - ? Directory(this.tempDir!) - : Directory.systemTemp.createTempSync('precompiled_'); - - tempDir.createSync(recursive: true); - - final crateOptions = CargokitCrateOptions.load( - manifestDir: manifestDir, - ); - - final buildEnvironment = BuildEnvironment( - configuration: BuildConfiguration.release, - crateOptions: crateOptions, - targetTempDir: tempDir.path, - manifestDir: manifestDir, - crateInfo: crateInfo, - isAndroid: androidSdkLocation != null, - androidSdkPath: androidSdkLocation, - androidNdkVersion: androidNdkVersion, - androidMinSdkVersion: androidMinSdkVersion, - ); - - final rustup = Rustup(); - - for (final target in targets) { - final artifactNames = getArtifactNames( - target: target, - libraryName: crateInfo.packageName, - remote: true, - ); - - if (artifactNames.every((name) { - final fileName = PrecompileBinaries.fileName(target, name); - return (release.assets ?? []).any((e) => e.name == fileName); - })) { - _log.info("All artifacts for $target already exist - skipping"); - continue; - } - - _log.info('Building for $target'); - - final builder = - RustBuilder(target: target, environment: buildEnvironment); - builder.prepare(rustup); - final res = await builder.build(); - - final assets = []; - for (final name in artifactNames) { - final file = File(path.join(res, name)); - if (!file.existsSync()) { - throw Exception('Missing artifact: ${file.path}'); - } - - final data = file.readAsBytesSync(); - final create = CreateReleaseAsset( - name: PrecompileBinaries.fileName(target, name), - contentType: "application/octet-stream", - assetData: data, - ); - final signature = sign(privateKey, data); - final signatureCreate = CreateReleaseAsset( - name: signatureFileName(target, name), - contentType: "application/octet-stream", - assetData: signature, - ); - bool verified = verify(public(privateKey), data, signature); - if (!verified) { - throw Exception('Signature verification failed'); - } - assets.add(create); - assets.add(signatureCreate); - } - _log.info('Uploading assets: ${assets.map((e) => e.name)}'); - for (final asset in assets) { - // This seems to be failing on CI so do it one by one - int retryCount = 0; - while (true) { - try { - await repo.uploadReleaseAssets(release, [asset]); - break; - } on Exception catch (e) { - if (retryCount == 10) { - rethrow; - } - ++retryCount; - _log.shout( - 'Upload failed (attempt $retryCount, will retry): ${e.toString()}'); - await Future.delayed(Duration(seconds: 2)); - } - } - } - } - - _log.info('Cleaning up'); - tempDir.deleteSync(recursive: true); - } - - Future _getOrCreateRelease({ - required RepositoriesService repo, - required String tagName, - required String packageName, - required String hash, - }) async { - Release release; - try { - _log.info('Fetching release $tagName'); - release = await repo.getReleaseByTagName(repositorySlug, tagName); - } on ReleaseNotFound { - _log.info('Release not found - creating release $tagName'); - release = await repo.createRelease( - repositorySlug, - CreateRelease.from( - tagName: tagName, - name: 'Precompiled binaries ${hash.substring(0, 8)}', - targetCommitish: null, - isDraft: false, - isPrerelease: false, - body: 'Precompiled binaries for crate $packageName, ' - 'crate hash $hash.', - )); - } - return release; - } -} diff --git a/cargokit/build_tool/lib/src/rustup.dart b/cargokit/build_tool/lib/src/rustup.dart deleted file mode 100644 index f284179a..00000000 --- a/cargokit/build_tool/lib/src/rustup.dart +++ /dev/null @@ -1,133 +0,0 @@ -import 'dart:io'; - -import 'package:collection/collection.dart'; -import 'package:path/path.dart' as path; - -import 'util.dart'; - -class _Toolchain { - _Toolchain( - this.name, - this.targets, - ); - - final String name; - final List targets; -} - -class Rustup { - List? installedTargets(String toolchain) { - final targets = _installedTargets(toolchain); - return targets != null ? List.unmodifiable(targets) : null; - } - - void installToolchain(String toolchain) { - log.info("Installing Rust toolchain: $toolchain"); - runCommand("rustup", ['toolchain', 'install', toolchain]); - _installedToolchains - .add(_Toolchain(toolchain, _getInstalledTargets(toolchain))); - } - - void installTarget( - String target, { - required String toolchain, - }) { - log.info("Installing Rust target: $target"); - runCommand("rustup", [ - 'target', - 'add', - '--toolchain', - toolchain, - target, - ]); - _installedTargets(toolchain)?.add(target); - } - - final List<_Toolchain> _installedToolchains; - - Rustup() : _installedToolchains = _getInstalledToolchains(); - - List? _installedTargets(String toolchain) => _installedToolchains - .firstWhereOrNull( - (e) => e.name == toolchain || e.name.startsWith('$toolchain-')) - ?.targets; - - static List<_Toolchain> _getInstalledToolchains() { - String extractToolchainName(String line) { - // ignore (default) after toolchain name - final parts = line.split(' '); - return parts[0]; - } - - final res = runCommand("rustup", ['toolchain', 'list']); - - // To list all non-custom toolchains, we need to filter out lines that - // don't start with "stable", "beta", or "nightly". - Pattern nonCustom = RegExp(r"^(stable|beta|nightly)"); - final lines = res.stdout - .toString() - .split('\n') - .where((e) => e.isNotEmpty && e.startsWith(nonCustom)) - .map(extractToolchainName) - .toList(growable: true); - - return lines - .map( - (name) => _Toolchain( - name, - _getInstalledTargets(name), - ), - ) - .toList(growable: true); - } - - static List _getInstalledTargets(String toolchain) { - final res = runCommand("rustup", [ - 'target', - 'list', - '--toolchain', - toolchain, - '--installed', - ]); - final lines = res.stdout - .toString() - .split('\n') - .where((e) => e.isNotEmpty) - .toList(growable: true); - return lines; - } - - bool _didInstallRustSrcForNightly = false; - - void installRustSrcForNightly() { - if (_didInstallRustSrcForNightly) { - return; - } - // Useful for -Z build-std - runCommand( - "rustup", - ['component', 'add', 'rust-src', '--toolchain', 'nightly'], - ); - _didInstallRustSrcForNightly = true; - } - - static String? executablePath() { - final envPath = Platform.environment['PATH']; - final envPathSeparator = Platform.isWindows ? ';' : ':'; - final home = Platform.isWindows - ? Platform.environment['USERPROFILE'] - : Platform.environment['HOME']; - final paths = [ - if (home != null) path.join(home, '.cargo', 'bin'), - if (envPath != null) ...envPath.split(envPathSeparator), - ]; - for (final p in paths) { - final rustup = Platform.isWindows ? 'rustup.exe' : 'rustup'; - final rustupPath = path.join(p, rustup); - if (File(rustupPath).existsSync()) { - return rustupPath; - } - } - return null; - } -} diff --git a/cargokit/build_tool/lib/src/target.dart b/cargokit/build_tool/lib/src/target.dart deleted file mode 100644 index 9287b23c..00000000 --- a/cargokit/build_tool/lib/src/target.dart +++ /dev/null @@ -1,137 +0,0 @@ -import 'dart:io'; - -import 'package:collection/collection.dart'; - -import 'util.dart'; - -class Target { - Target({ - required this.rust, - this.flutter, - this.android, - this.androidMinSdkVersion, - this.darwinPlatform, - this.darwinArch, - }); - - static final all = [ - Target( - rust: 'armv7-linux-androideabi', - flutter: 'android-arm', - android: 'armeabi-v7a', - androidMinSdkVersion: 16, - ), - Target( - rust: 'aarch64-linux-android', - flutter: 'android-arm64', - android: 'arm64-v8a', - androidMinSdkVersion: 21, - ), - Target( - rust: 'i686-linux-android', - flutter: 'android-x86', - android: 'x86', - androidMinSdkVersion: 16, - ), - Target( - rust: 'x86_64-linux-android', - flutter: 'android-x64', - android: 'x86_64', - androidMinSdkVersion: 21, - ), - Target( - rust: 'x86_64-pc-windows-msvc', - flutter: 'windows-x64', - ), - Target( - rust: 'x86_64-unknown-linux-gnu', - flutter: 'linux-x64', - ), - Target( - rust: 'aarch64-unknown-linux-gnu', - flutter: 'linux-arm64', - ), - Target( - rust: 'x86_64-apple-darwin', - darwinPlatform: 'macosx', - darwinArch: 'x86_64', - ), - Target( - rust: 'aarch64-apple-darwin', - darwinPlatform: 'macosx', - darwinArch: 'arm64', - ), - Target( - rust: 'aarch64-apple-ios', - darwinPlatform: 'iphoneos', - darwinArch: 'arm64', - ), - Target( - rust: 'aarch64-apple-ios-sim', - darwinPlatform: 'iphonesimulator', - darwinArch: 'arm64', - ), - Target( - rust: 'x86_64-apple-ios', - darwinPlatform: 'iphonesimulator', - darwinArch: 'x86_64', - ), - ]; - - static Target? forFlutterName(String flutterName) { - return all.firstWhereOrNull((element) => element.flutter == flutterName); - } - - static Target? forDarwin({ - required String platformName, - required String darwinAarch, - }) { - return all.firstWhereOrNull((element) => // - element.darwinPlatform == platformName && - element.darwinArch == darwinAarch); - } - - static Target? forRustTriple(String triple) { - return all.firstWhereOrNull((element) => element.rust == triple); - } - - static List androidTargets() { - return all - .where((element) => element.android != null) - .toList(growable: false); - } - - /// Returns buildable targets on current host platform ignoring Android targets. - static List buildableTargets() { - if (Platform.isLinux) { - // Right now we don't support cross-compiling on Linux. So we just return - // the host target. - final arch = runCommand('arch', []).stdout as String; - if (arch.trim() == 'aarch64') { - return [Target.forRustTriple('aarch64-unknown-linux-gnu')!]; - } else { - return [Target.forRustTriple('x86_64-unknown-linux-gnu')!]; - } - } - return all.where((target) { - if (Platform.isWindows) { - return target.rust.contains('-windows-'); - } else if (Platform.isMacOS) { - return target.darwinPlatform != null; - } - return false; - }).toList(growable: false); - } - - @override - String toString() { - return rust; - } - - final String? flutter; - final String rust; - final String? android; - final int? androidMinSdkVersion; - final String? darwinPlatform; - final String? darwinArch; -} diff --git a/cargokit/build_tool/lib/src/util.dart b/cargokit/build_tool/lib/src/util.dart deleted file mode 100644 index d8e30196..00000000 --- a/cargokit/build_tool/lib/src/util.dart +++ /dev/null @@ -1,169 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:logging/logging.dart'; -import 'package:path/path.dart' as path; - -import 'logging.dart'; -import 'rustup.dart'; - -final log = Logger("process"); - -class CommandFailedException implements Exception { - final String executable; - final List arguments; - final ProcessResult result; - - CommandFailedException({ - required this.executable, - required this.arguments, - required this.result, - }); - - @override - String toString() { - final stdout = result.stdout.toString().trim(); - final stderr = result.stderr.toString().trim(); - return [ - "External Command: $executable ${arguments.map((e) => '"$e"').join(' ')}", - "Returned Exit Code: ${result.exitCode}", - kSeparator, - "STDOUT:", - if (stdout.isNotEmpty) stdout, - kSeparator, - "STDERR:", - if (stderr.isNotEmpty) stderr, - ].join('\n'); - } -} - -class TestRunCommandArgs { - final String executable; - final List arguments; - final String? workingDirectory; - final Map? environment; - final bool includeParentEnvironment; - final bool runInShell; - final Encoding? stdoutEncoding; - final Encoding? stderrEncoding; - - TestRunCommandArgs({ - required this.executable, - required this.arguments, - this.workingDirectory, - this.environment, - this.includeParentEnvironment = true, - this.runInShell = false, - this.stdoutEncoding, - this.stderrEncoding, - }); -} - -class TestRunCommandResult { - TestRunCommandResult({ - this.pid = 1, - this.exitCode = 0, - this.stdout = '', - this.stderr = '', - }); - - final int pid; - final int exitCode; - final String stdout; - final String stderr; -} - -TestRunCommandResult Function(TestRunCommandArgs args)? testRunCommandOverride; - -ProcessResult runCommand( - String executable, - List arguments, { - String? workingDirectory, - Map? environment, - bool includeParentEnvironment = true, - bool runInShell = false, - Encoding? stdoutEncoding = systemEncoding, - Encoding? stderrEncoding = systemEncoding, -}) { - if (testRunCommandOverride != null) { - final result = testRunCommandOverride!(TestRunCommandArgs( - executable: executable, - arguments: arguments, - workingDirectory: workingDirectory, - environment: environment, - includeParentEnvironment: includeParentEnvironment, - runInShell: runInShell, - stdoutEncoding: stdoutEncoding, - stderrEncoding: stderrEncoding, - )); - return ProcessResult( - result.pid, - result.exitCode, - result.stdout, - result.stderr, - ); - } - log.finer('Running command $executable ${arguments.join(' ')}'); - final res = Process.runSync( - _resolveExecutable(executable), - arguments, - workingDirectory: workingDirectory, - environment: environment, - includeParentEnvironment: includeParentEnvironment, - runInShell: runInShell, - stderrEncoding: stderrEncoding, - stdoutEncoding: stdoutEncoding, - ); - if (res.exitCode != 0) { - throw CommandFailedException( - executable: executable, - arguments: arguments, - result: res, - ); - } else { - return res; - } -} - -class RustupNotFoundException implements Exception { - @override - String toString() { - return [ - ' ', - 'rustup not found in PATH.', - ' ', - 'Maybe you need to install Rust? It only takes a minute:', - ' ', - if (Platform.isWindows) 'https://www.rust-lang.org/tools/install', - if (hasHomebrewRustInPath()) ...[ - '\$ brew unlink rust # Unlink homebrew Rust from PATH', - ], - if (!Platform.isWindows) - "\$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh", - ' ', - ].join('\n'); - } - - static bool hasHomebrewRustInPath() { - if (!Platform.isMacOS) { - return false; - } - final envPath = Platform.environment['PATH'] ?? ''; - final paths = envPath.split(':'); - return paths.any((p) { - return p.contains('homebrew') && File(path.join(p, 'rustc')).existsSync(); - }); - } -} - -String _resolveExecutable(String executable) { - if (executable == 'rustup') { - final resolved = Rustup.executablePath(); - if (resolved != null) { - return resolved; - } - throw RustupNotFoundException(); - } else { - return executable; - } -} diff --git a/cargokit/build_tool/lib/src/verify_binaries.dart b/cargokit/build_tool/lib/src/verify_binaries.dart deleted file mode 100644 index 0094c644..00000000 --- a/cargokit/build_tool/lib/src/verify_binaries.dart +++ /dev/null @@ -1,81 +0,0 @@ -import 'dart:io'; - -import 'package:ed25519_edwards/ed25519_edwards.dart'; -import 'package:http/http.dart'; - -import 'artifacts_provider.dart'; -import 'cargo.dart'; -import 'crate_hash.dart'; -import 'options.dart'; -import 'precompile_binaries.dart'; -import 'target.dart'; - -class VerifyBinaries { - VerifyBinaries({ - required this.manifestDir, - }); - - final String manifestDir; - - Future run() async { - final crateInfo = CrateInfo.load(manifestDir); - - final config = CargokitCrateOptions.load(manifestDir: manifestDir); - final precompiledBinaries = config.precompiledBinaries; - if (precompiledBinaries == null) { - stdout.writeln('Crate does not support precompiled binaries.'); - } else { - final crateHash = CrateHash.compute(manifestDir); - stdout.writeln('Crate hash: $crateHash'); - - for (final target in Target.all) { - final message = 'Checking ${target.rust}...'; - stdout.write(message.padRight(40)); - stdout.flush(); - - final artifacts = getArtifactNames( - target: target, - libraryName: crateInfo.packageName, - remote: true, - ); - - final prefix = precompiledBinaries.uriPrefix; - - bool ok = true; - - for (final artifact in artifacts) { - final fileName = PrecompileBinaries.fileName(target, artifact); - final signatureFileName = - PrecompileBinaries.signatureFileName(target, artifact); - - final url = Uri.parse('$prefix$crateHash/$fileName'); - final signatureUrl = - Uri.parse('$prefix$crateHash/$signatureFileName'); - - final signature = await get(signatureUrl); - if (signature.statusCode != 200) { - stdout.writeln('MISSING'); - ok = false; - break; - } - final asset = await get(url); - if (asset.statusCode != 200) { - stdout.writeln('MISSING'); - ok = false; - break; - } - - if (!verify(precompiledBinaries.publicKey, asset.bodyBytes, - signature.bodyBytes)) { - stdout.writeln('INVALID SIGNATURE'); - ok = false; - } - } - - if (ok) { - stdout.writeln('OK'); - } - } - } - } -} diff --git a/cargokit/build_tool/pubspec.lock b/cargokit/build_tool/pubspec.lock deleted file mode 100644 index 343bdd36..00000000 --- a/cargokit/build_tool/pubspec.lock +++ /dev/null @@ -1,453 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 - url: "https://pub.dev" - source: hosted - version: "64.0.0" - adaptive_number: - dependency: transitive - description: - name: adaptive_number - sha256: "3a567544e9b5c9c803006f51140ad544aedc79604fd4f3f2c1380003f97c1d77" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" - url: "https://pub.dev" - source: hosted - version: "6.2.0" - args: - dependency: "direct main" - description: - name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 - url: "https://pub.dev" - source: hosted - version: "2.4.2" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - collection: - dependency: "direct main" - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: "direct main" - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - coverage: - dependency: transitive - description: - name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" - url: "https://pub.dev" - source: hosted - version: "1.6.3" - crypto: - dependency: "direct main" - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - ed25519_edwards: - dependency: "direct main" - description: - name: ed25519_edwards - sha256: "6ce0112d131327ec6d42beede1e5dfd526069b18ad45dcf654f15074ad9276cd" - url: "https://pub.dev" - source: hosted - version: "0.3.1" - file: - dependency: transitive - description: - name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" - url: "https://pub.dev" - source: hosted - version: "6.1.4" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" - url: "https://pub.dev" - source: hosted - version: "3.2.0" - github: - dependency: "direct main" - description: - name: github - sha256: "9966bc13bf612342e916b0a343e95e5f046c88f602a14476440e9b75d2295411" - url: "https://pub.dev" - source: hosted - version: "9.17.0" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - hex: - dependency: "direct main" - description: - name: hex - sha256: "4e7cd54e4b59ba026432a6be2dd9d96e4c5205725194997193bf871703b82c4a" - url: "https://pub.dev" - source: hosted - version: "0.2.0" - http: - dependency: "direct main" - description: - name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - io: - dependency: transitive - description: - name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 - url: "https://pub.dev" - source: hosted - version: "4.8.1" - lints: - dependency: "direct dev" - description: - name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - logging: - dependency: "direct main" - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" - meta: - dependency: transitive - description: - name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - mime: - dependency: transitive - description: - name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e - url: "https://pub.dev" - source: hosted - version: "1.0.4" - node_preamble: - dependency: transitive - description: - name: node_preamble - sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" - url: "https://pub.dev" - source: hosted - version: "2.0.2" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - path: - dependency: "direct main" - description: - name: path - sha256: "2ad4cddff7f5cc0e2d13069f2a3f7a73ca18f66abd6f5ecf215219cdb3638edb" - url: "https://pub.dev" - source: hosted - version: "1.8.0" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 - url: "https://pub.dev" - source: hosted - version: "5.4.0" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e - url: "https://pub.dev" - source: hosted - version: "1.1.2" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - source_maps: - dependency: transitive - description: - name: source_maps - sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" - url: "https://pub.dev" - source: hosted - version: "0.10.12" - source_span: - dependency: "direct main" - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test: - dependency: "direct dev" - description: - name: test - sha256: "9b0dd8e36af4a5b1569029949d50a52cb2a2a2fdaa20cebb96e6603b9ae241f9" - url: "https://pub.dev" - source: hosted - version: "1.24.6" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - test_core: - dependency: transitive - description: - name: test_core - sha256: "4bef837e56375537055fdbbbf6dd458b1859881f4c7e6da936158f77d61ab265" - url: "https://pub.dev" - source: hosted - version: "0.5.6" - toml: - dependency: "direct main" - description: - name: toml - sha256: "157c5dca5160fced243f3ce984117f729c788bb5e475504f3dbcda881accee44" - url: "https://pub.dev" - source: hosted - version: "0.14.0" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - version: - dependency: "direct main" - description: - name: version - sha256: "2307e23a45b43f96469eeab946208ed63293e8afca9c28cd8b5241ff31c55f55" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "0fae432c85c4ea880b33b497d32824b97795b04cdaa74d270219572a1f50268d" - url: "https://pub.dev" - source: hosted - version: "11.9.0" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b - url: "https://pub.dev" - source: hosted - version: "2.4.0" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - yaml: - dependency: "direct main" - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" -sdks: - dart: ">=3.0.0 <4.0.0" diff --git a/cargokit/build_tool/pubspec.yaml b/cargokit/build_tool/pubspec.yaml deleted file mode 100644 index e01aa0ae..00000000 --- a/cargokit/build_tool/pubspec.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: build_tool -description: Cargokit build_tool. Facilitates the build of Rust crate during Flutter application build. -publish_to: none -version: 1.0.0 - -environment: - sdk: ">=3.0.0 <4.0.0" - -# Add regular dependencies here. -dependencies: - # these are pinned on purpose because the bundle_tool_runner doesn't have - # pubspec.lock. See run_build_tool.sh - logging: 1.2.0 - path: 1.8.0 - version: 3.0.0 - collection: 1.18.0 - ed25519_edwards: 0.3.1 - hex: 0.2.0 - yaml: 3.1.2 - source_span: 1.10.0 - github: 9.17.0 - args: 2.4.2 - crypto: 3.0.3 - convert: 3.1.1 - http: 1.1.0 - toml: 0.14.0 - -dev_dependencies: - lints: ^2.1.0 - test: ^1.24.0 diff --git a/cargokit/build_tool/test/builder_test.dart b/cargokit/build_tool/test/builder_test.dart deleted file mode 100644 index e92852e5..00000000 --- a/cargokit/build_tool/test/builder_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:build_tool/src/builder.dart'; -import 'package:test/test.dart'; - -void main() { - test('parseBuildConfiguration', () { - var b = BuildEnvironment.parseBuildConfiguration('debug'); - expect(b, BuildConfiguration.debug); - - b = BuildEnvironment.parseBuildConfiguration('profile'); - expect(b, BuildConfiguration.profile); - - b = BuildEnvironment.parseBuildConfiguration('release'); - expect(b, BuildConfiguration.release); - - b = BuildEnvironment.parseBuildConfiguration('debug-dev'); - expect(b, BuildConfiguration.debug); - - b = BuildEnvironment.parseBuildConfiguration('profile'); - expect(b, BuildConfiguration.profile); - - b = BuildEnvironment.parseBuildConfiguration('profile-prod'); - expect(b, BuildConfiguration.profile); - - // fallback to release - b = BuildEnvironment.parseBuildConfiguration('unknown'); - expect(b, BuildConfiguration.release); - }); -} diff --git a/cargokit/build_tool/test/cargo_test.dart b/cargokit/build_tool/test/cargo_test.dart deleted file mode 100644 index 00afe29f..00000000 --- a/cargokit/build_tool/test/cargo_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:build_tool/src/cargo.dart'; -import 'package:test/test.dart'; - -final _cargoToml = """ -[workspace] - -[profile.release] -lto = true -panic = "abort" -opt-level = "z" -# strip = "symbols" - -[package] -name = "super_native_extensions" -version = "0.1.0" -edition = "2021" -resolver = "2" - -[lib] -crate-type = ["cdylib", "staticlib"] -"""; - -void main() { - test('parseCargoToml', () { - final info = CrateInfo.parseManifest(_cargoToml); - expect(info.packageName, 'super_native_extensions'); - }); -} diff --git a/cargokit/build_tool/test/options_test.dart b/cargokit/build_tool/test/options_test.dart deleted file mode 100644 index 25a85b6a..00000000 --- a/cargokit/build_tool/test/options_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'package:build_tool/src/builder.dart'; -import 'package:build_tool/src/options.dart'; -import 'package:hex/hex.dart'; -import 'package:test/test.dart'; -import 'package:yaml/yaml.dart'; - -void main() { - test('parseCargoBuildOptions', () { - final yaml = """ -toolchain: nightly -extra_flags: - - -Z - # Comment here - - build-std=panic_abort,std -"""; - final node = loadYamlNode(yaml); - final options = CargoBuildOptions.parse(node); - expect(options.toolchain, Toolchain.nightly); - expect(options.flags, ['-Z', 'build-std=panic_abort,std']); - }); - - test('parsePrecompiledBinaries', () { - final yaml = """ -url_prefix: https://url-prefix -public_key: a4c3433798eb2c36edf2b94dbb4dd899d57496ca373a8982d8a792410b7f6445 -"""; - final precompiledBinaries = PrecompiledBinaries.parse(loadYamlNode(yaml)); - final key = HEX.decode( - 'a4c3433798eb2c36edf2b94dbb4dd899d57496ca373a8982d8a792410b7f6445'); - expect(precompiledBinaries.uriPrefix, 'https://url-prefix'); - expect(precompiledBinaries.publicKey.bytes, key); - }); - - test('parseCargokitOptions', () { - const yaml = ''' -cargo: - # For smalles binaries rebuilt the standard library with panic=abort - debug: - toolchain: nightly - extra_flags: - - -Z - # Comment here - - build-std=panic_abort,std - release: - toolchain: beta - -precompiled_binaries: - url_prefix: https://url-prefix - public_key: a4c3433798eb2c36edf2b94dbb4dd899d57496ca373a8982d8a792410b7f6445 -'''; - final options = CargokitCrateOptions.parse(loadYamlNode(yaml)); - expect(options.precompiledBinaries?.uriPrefix, 'https://url-prefix'); - final key = HEX.decode( - 'a4c3433798eb2c36edf2b94dbb4dd899d57496ca373a8982d8a792410b7f6445'); - expect(options.precompiledBinaries?.publicKey.bytes, key); - - final debugOptions = options.cargo[BuildConfiguration.debug]!; - expect(debugOptions.toolchain, Toolchain.nightly); - expect(debugOptions.flags, ['-Z', 'build-std=panic_abort,std']); - - final releaseOptions = options.cargo[BuildConfiguration.release]!; - expect(releaseOptions.toolchain, Toolchain.beta); - expect(releaseOptions.flags, []); - }); - - test('parseCargokitUserOptions', () { - const yaml = ''' -use_precompiled_binaries: false -verbose_logging: true -'''; - final options = CargokitUserOptions.parse(loadYamlNode(yaml)); - expect(options.usePrecompiledBinaries, false); - expect(options.verboseLogging, true); - }); -} diff --git a/cargokit/build_tool/test/rustup_test.dart b/cargokit/build_tool/test/rustup_test.dart deleted file mode 100644 index af95303c..00000000 --- a/cargokit/build_tool/test/rustup_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:build_tool/src/rustup.dart'; -import 'package:build_tool/src/util.dart'; -import 'package:test/test.dart'; - -void main() { - test('rustup with no toolchains', () { - bool didListToolchains = false; - bool didInstallStable = false; - bool didListTargets = false; - testRunCommandOverride = (args) { - expect(args.executable, 'rustup'); - switch (args.arguments) { - case ['toolchain', 'list']: - didListToolchains = true; - return TestRunCommandResult(stdout: 'no installed toolchains\n'); - case ['toolchain', 'install', 'stable']: - didInstallStable = true; - return TestRunCommandResult(); - case ['target', 'list', '--toolchain', 'stable', '--installed']: - didListTargets = true; - return TestRunCommandResult( - stdout: 'x86_64-unknown-linux-gnu\nx86_64-apple-darwin\n'); - default: - throw Exception('Unexpected call: ${args.arguments}'); - } - }; - final rustup = Rustup(); - rustup.installToolchain('stable'); - expect(didInstallStable, true); - expect(didListToolchains, true); - expect(didListTargets, true); - expect(rustup.installedTargets('stable'), [ - 'x86_64-unknown-linux-gnu', - 'x86_64-apple-darwin', - ]); - testRunCommandOverride = null; - }); - - test('rustup with esp toolchain', () { - final targetsQueried = []; - testRunCommandOverride = (args) { - expect(args.executable, 'rustup'); - switch (args.arguments) { - case ['toolchain', 'list']: - return TestRunCommandResult( - stdout: 'stable-aarch64-apple-darwin (default)\n' - 'nightly-aarch64-apple-darwin\n' - 'esp\n'); - case ['target', 'list', '--toolchain', String toolchain, '--installed']: - targetsQueried.add(toolchain); - return TestRunCommandResult(stdout: '$toolchain:target\n'); - default: - throw Exception('Unexpected call: ${args.arguments}'); - } - }; - final rustup = Rustup(); - expect(targetsQueried, [ - 'stable-aarch64-apple-darwin', - 'nightly-aarch64-apple-darwin', - ]); - expect(rustup.installedTargets('stable'), - ['stable-aarch64-apple-darwin:target']); - expect(rustup.installedTargets('nightly'), - ['nightly-aarch64-apple-darwin:target']); - }); -} diff --git a/cargokit/cmake/cargokit.cmake b/cargokit/cmake/cargokit.cmake deleted file mode 100644 index ddd05df9..00000000 --- a/cargokit/cmake/cargokit.cmake +++ /dev/null @@ -1,99 +0,0 @@ -SET(cargokit_cmake_root "${CMAKE_CURRENT_LIST_DIR}/..") - -# Workaround for https://github.com/dart-lang/pub/issues/4010 -get_filename_component(cargokit_cmake_root "${cargokit_cmake_root}" REALPATH) - -if(WIN32) - # REALPATH does not properly resolve symlinks on windows :-/ - execute_process(COMMAND powershell -ExecutionPolicy Bypass -File "${CMAKE_CURRENT_LIST_DIR}/resolve_symlinks.ps1" "${cargokit_cmake_root}" OUTPUT_VARIABLE cargokit_cmake_root OUTPUT_STRIP_TRAILING_WHITESPACE) -endif() - -# Arguments -# - target: CMAKE target to which rust library is linked -# - manifest_dir: relative path from current folder to directory containing cargo manifest -# - lib_name: cargo package name -# - any_symbol_name: name of any exported symbol from the library. -# used on windows to force linking with library. -function(apply_cargokit target manifest_dir lib_name any_symbol_name) - - set(CARGOKIT_LIB_NAME "${lib_name}") - set(CARGOKIT_LIB_FULL_NAME "${CMAKE_SHARED_MODULE_PREFIX}${CARGOKIT_LIB_NAME}${CMAKE_SHARED_MODULE_SUFFIX}") - if (CMAKE_CONFIGURATION_TYPES) - set(CARGOKIT_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/$") - set(OUTPUT_LIB "${CMAKE_CURRENT_BINARY_DIR}/$/${CARGOKIT_LIB_FULL_NAME}") - else() - set(CARGOKIT_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}") - set(OUTPUT_LIB "${CMAKE_CURRENT_BINARY_DIR}/${CARGOKIT_LIB_FULL_NAME}") - endif() - set(CARGOKIT_TEMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/cargokit_build") - - if (FLUTTER_TARGET_PLATFORM) - set(CARGOKIT_TARGET_PLATFORM "${FLUTTER_TARGET_PLATFORM}") - else() - set(CARGOKIT_TARGET_PLATFORM "windows-x64") - endif() - - set(CARGOKIT_ENV - "CARGOKIT_CMAKE=${CMAKE_COMMAND}" - "CARGOKIT_CONFIGURATION=$" - "CARGOKIT_MANIFEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${manifest_dir}" - "CARGOKIT_TARGET_TEMP_DIR=${CARGOKIT_TEMP_DIR}" - "CARGOKIT_OUTPUT_DIR=${CARGOKIT_OUTPUT_DIR}" - "CARGOKIT_TARGET_PLATFORM=${CARGOKIT_TARGET_PLATFORM}" - "CARGOKIT_TOOL_TEMP_DIR=${CARGOKIT_TEMP_DIR}/tool" - "CARGOKIT_ROOT_PROJECT_DIR=${CMAKE_SOURCE_DIR}" - ) - - if (WIN32) - set(SCRIPT_EXTENSION ".cmd") - set(IMPORT_LIB_EXTENSION ".lib") - else() - set(SCRIPT_EXTENSION ".sh") - set(IMPORT_LIB_EXTENSION "") - execute_process(COMMAND chmod +x "${cargokit_cmake_root}/run_build_tool${SCRIPT_EXTENSION}") - endif() - - # Using generators in custom command is only supported in CMake 3.20+ - if (CMAKE_CONFIGURATION_TYPES AND ${CMAKE_VERSION} VERSION_LESS "3.20.0") - foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES) - add_custom_command( - OUTPUT - "${CMAKE_CURRENT_BINARY_DIR}/${CONFIG}/${CARGOKIT_LIB_FULL_NAME}" - "${CMAKE_CURRENT_BINARY_DIR}/_phony_" - COMMAND ${CMAKE_COMMAND} -E env ${CARGOKIT_ENV} - "${cargokit_cmake_root}/run_build_tool${SCRIPT_EXTENSION}" build-cmake - VERBATIM - ) - endforeach() - else() - add_custom_command( - OUTPUT - ${OUTPUT_LIB} - "${CMAKE_CURRENT_BINARY_DIR}/_phony_" - COMMAND ${CMAKE_COMMAND} -E env ${CARGOKIT_ENV} - "${cargokit_cmake_root}/run_build_tool${SCRIPT_EXTENSION}" build-cmake - VERBATIM - ) - endif() - - - set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/_phony_" PROPERTIES SYMBOLIC TRUE) - - if (TARGET ${target}) - # If we have actual cmake target provided create target and make existing - # target depend on it - add_custom_target("${target}_cargokit" DEPENDS ${OUTPUT_LIB}) - add_dependencies("${target}" "${target}_cargokit") - target_link_libraries("${target}" PRIVATE "${OUTPUT_LIB}${IMPORT_LIB_EXTENSION}") - if(WIN32) - target_link_options(${target} PRIVATE "/INCLUDE:${any_symbol_name}") - endif() - else() - # Otherwise (FFI) just use ALL to force building always - add_custom_target("${target}_cargokit" ALL DEPENDS ${OUTPUT_LIB}) - endif() - - # Allow adding the output library to plugin bundled libraries - set("${target}_cargokit_lib" ${OUTPUT_LIB} PARENT_SCOPE) - -endfunction() diff --git a/cargokit/cmake/resolve_symlinks.ps1 b/cargokit/cmake/resolve_symlinks.ps1 deleted file mode 100644 index 3d10d283..00000000 --- a/cargokit/cmake/resolve_symlinks.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -function Resolve-Symlinks { - [CmdletBinding()] - [OutputType([string])] - param( - [Parameter(Position = 0, Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] - [string] $Path - ) - - [string] $separator = '/' - [string[]] $parts = $Path.Split($separator) - - [string] $realPath = '' - foreach ($part in $parts) { - if ($realPath -and !$realPath.EndsWith($separator)) { - $realPath += $separator - } - $realPath += $part - $item = Get-Item $realPath - if ($item.Target) { - $realPath = $item.Target.Replace('\', '/') - } - } - $realPath -} - -$path=Resolve-Symlinks -Path $args[0] -Write-Host $path diff --git a/cargokit/docs/architecture.md b/cargokit/docs/architecture.md deleted file mode 100644 index d9bcf4e2..00000000 --- a/cargokit/docs/architecture.md +++ /dev/null @@ -1,104 +0,0 @@ -# Cargokit Architecture - -Note: This is mostly relevant for plugins authors that want to see a bit under the hood rather then just following a tutorial. - -In ideal conditions the end-developer using the plugin should not even be aware of Cargokit existence. - -## Integration - -Cargokit is meant to be included in Flutter plugin (or application) that contains the Rust crate to be built during the Flutter build process. - -Cargokit can be either incuded as git submodule or git subtree (required for plugins - as pub does not support submodules for git dependencies). - -For a step by step tutorial on integrating Cargokit with a Flutter plugin see https://matejknopp.com/post/flutter_plugin_in_rust_with_no_prebuilt_binaries/. - -## build_tool - -Build tool is the core of cargokit. It is a Dart command line package that facilitates the build of Rust crate. It is invoked during the Flutter build process to build (or download) Rust artifacts, but it can be also used as a standalone tool. - -It handles the following commands: - -### build-cmake - -This is invoked from `cargokit.cmake` and it is used to build the Rust crate into a dynamic library on Linux and Windows (which use CMake as build system). - -The command takes no additional arguments, everything is controlled during environment variables set by `cargokit.cmake`. - -### build-gradle - -This is invoked from `plugin.gradle` and it is used to build the Rust crate into a dynamic library on Android. The command takes no additional arguments, everything is controlled during environment variables set by `plugin.gradle`. - -The build_tool installs NDK if needed, configures the Rust environment for cross compilation and then invokes `cargo build` with appropriate arguments and environment variables. - -The build-tool also acts a linker driver. - -### build-pod - -This is invoked from plugin's podspec `script_phase` through `build_pod.sh`. Bundle tool will build the Rust crate into a static library that gets linked into the plugin Framework. In this case must have `:execution_position` set to `:before_compile`. - -Cargokit will build binaries for all active architectures from XCode build and lipo them togherer. - -When using Cargokit to integrate Rust code with an application (not a plugin) you can also configure the `Cargo.toml` to just build a dynamic library. When Cargokit finds that the crate only built a dylib and no static lib, it will attempt to replace the Cocoapod framework binary with the dylib. In this case the script `:execution_position` must be set to `:after_compile`. This is *not* recommended for plugins and it's quite experimental. - -### gen-key, precompile-binaries, verify-binaries - -These are used as when providing precompiled binaries for Plugin. See [precompiled_binaries.md](precompiled_binaries.md) for more information. - -## Launching the build_tool during build. - -During Flutter build, the build tool can not be launched directly using `dart run`. Rather it is launched through `run_build_tool.sh` and `run_build_tool.cmd`. Because the `build_tool` is shipped as part of plugin, we generally don't want to write into the plugin directory during build, which would happen if the `build_tool` was simply invoked through `dart run` (For example the `.dart_tool/package_config.json` file would get written inside the `build_tool` directory). - -Instead the `run_build_tool` script creates a minimal Dart command line package in the build directory and references the `build_tool` as package. That way the `.dart_tool/package_config.json` file is created in the temporary build folder and not in the plugin itself. The script also precompiles the Dart code to speed up subsequent invocations. - -## Configuring Cargokit - -### Configuration for the Rust crate - -Cargokit can be configured through a `cargokit.yaml` file, which can be used to control the build of the Rust package and is placed into the Rust crate next to `Cargo.toml`. - -Here is an example `cargokit.yaml` with comments: -```yaml -cargo: - debug: # Configuration of cargo execution during debug builds - toolchain: stable # default - release: # Configuration of cargo execution for release builds - toolchain: nightly # rustup will be invoked with nightly toolchain - extra_flags: # extra arguments passed to cargo build - - -Z - - build-std=panic_abort,std - -# If crate ships with precompiled binaries, they can be configured here. -precompiled_binaries: - # Uri prefix used when downloading precompiled binaries. - url_prefix: https://github.com/superlistapp/super_native_extensions/releases/download/precompiled_ - - # Public key for verifying downloaded precompiled binaries. - public_key: 3a257ef1c7d72d84225ac4658d24812ada50a7a7a8a2138c2a91353389fdc514 -``` - -### Configuration for the application consuming the plugin - -A `cargokit_options.yaml` file can also be placed by developer using plugin to the root of the application package. In which case the file can be used to specify following options: - -```yaml -# Enables verbose logging of Cargokit during build -verbose_logging: true - -# Opts out of using precompiled binaries. If crate has configured -# and deployed precompiled binaries, these will be by default used whenever Rustup -# is not installed. With `use_precompiled_binaries` set to false, the build will -# instead be aborted prompting user to install Rustup. -use_precompiled_binaries: false -``` - -## Detecting Rustup - -When the plugin doesn't come with precompiled libraries (or user opt-out), `build_tool` will need to invoke Rustup during build to ensure that required Rust targets and toolchain are installed for current build and to build the Rust crate. - -Cargokit will attempt to detect Rustup in the default Rustup installation location (`~/.cargo/rustup`) as well as in PATH. This is done so that if user install Rustup but doesn't properly configure PATH, Cargokit will still work. - -If `build_tool` doesn't find Rustup, it will about the build with a message showing instructions to install Rustup specific to current platform. - -On macOS it will also detect a homebrew Rust installation in PATH and will prompt user to call `brew unlink rust` first to remove homebrew Rust installation from PATH, because it may interfere with Rustup. - -Homebrew Rust installation can not be used by Cargokit, because it can only build for host platform. Cargokit needs to be able to cross compile the Rust crate for iOS and Android and thus needs full Rustup installation. diff --git a/cargokit/docs/precompiled_binaries.md b/cargokit/docs/precompiled_binaries.md deleted file mode 100644 index 2026e867..00000000 --- a/cargokit/docs/precompiled_binaries.md +++ /dev/null @@ -1,95 +0,0 @@ -# Precompiled Binaries - -Because Cargokit builds the Rust crate during Flutter build, it is inherently -dependend on the Rust toolchain being installed on the developer's machine. - -To decrease the friction, it is possible for Cargokit to use precompiled binaries instead. - -This is how the process of using precompiled binaries looks from the perspective of the build on developer machine: - -1. Cargokit checks if there is `cargokit_options.yaml` file in the root folder of target application. If there is one, it will be checked for `use_precompiled_binaries` options to see if user opted out of using precompiled binaries. In which case Cargokit will insist on building from source. Cargokit will also build from source if the configuration file is absent, but user has Rustup installed. - -2. Cargokit checks if there is `cargokit.yaml` file placed in the Rust crate. If there is one, it will be checked for `precompiled_binaries` section to see if crate supports precompiled binaries. The configuration section must contain a public key and URL prefix. - -3. Cargokit computes a `crate-hash`. This is a SHA256 hash value computed from all Rust files inside crate, `Cargo.toml`, `Cargo.lock` and `cargokit.yaml`. This uniquely identifies the crate and it is used to find the correct precompiled binaries. - -4. Cargokit will attempt to download the precompiled binaries for target platform and `crate_hash` combination and a signature file for each downloaded binary. If download succeeds, the binary content will be verified against the signature and public key included in `cargokit.yaml` (which is part of Rust crate and thus part of published Flutter package). - -5. If the verification succeeds, the precompiled binaries will be used. Otherwise the binary will be discarded and Cargokit will insist on building from source. - -## Providing precompiled binaries - -Note that this assumes that precompiled binaries will be generated during github actions and deployed as github releases. - -### Use `build_tool` to generate a key-pair: - -``` -dart run build_tool gen-key -``` - -This will print the private key and public key. Store the private key securely. It needs to be provided as a secret to github action. - -The public key should be included in `cargokit.yaml` file in the Rust crate. - -### Provide a `cargokit.yaml` file in the Rust crate - -The file must be placed alongside Cargo.toml. - -```yaml -precompiled_binaries: - # Uri prefix used when downloading precompiled binaries. - url_prefix: https://github.com///releases/download/precompiled_ - - # Public key for verifying downloaded precompiled binaries. - public_key: -``` - -### Configure a github action to build and upload precompiled binaries. - -The github action should be run at every commit to main branch (and possibly other branches). - -The action needs two secrets - private key for signing binaries and GitHub token for uploading binaries as releases. Here is example action that precompiles and uploads binaries for all supported targets. - -```yaml -on: - push: - branches: [ main ] - -name: Precompile Binaries - -jobs: - Precompile: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - - macOS-latest - - windows-latest - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1 - - name: Install GTK - if: (matrix.os == 'ubuntu-latest') - run: sudo apt-get update && sudo apt-get install libgtk-3-dev - - name: Precompile - if: (matrix.os == 'macOS-latest') || (matrix.os == 'windows-latest') - run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=superlistapp/super_native_extensions - working-directory: super_native_extensions/cargokit/build_tool - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} - PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }} - - name: Precompile (with Android) - if: (matrix.os == 'ubuntu-latest') - run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=superlistapp/super_native_extensions --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 - working-directory: super_native_extensions/cargokit/build_tool - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} - PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }} -``` - -By default the `built_tool precompile-binaries` commands build and uploads the binaries for all targets buildable from current host. This can be overriden using the `--target ` argument. - -Android binaries will be built when `--android-sdk-location` and `--android-ndk-version` arguments are provided. - diff --git a/cargokit/gradle/plugin.gradle b/cargokit/gradle/plugin.gradle deleted file mode 100644 index 12c49f11..00000000 --- a/cargokit/gradle/plugin.gradle +++ /dev/null @@ -1,172 +0,0 @@ -import java.nio.file.Paths -import org.apache.tools.ant.taskdefs.condition.Os - -CargoKitPlugin.file = buildscript.sourceFile - -apply plugin: CargoKitPlugin - -class CargoKitExtension { - String manifestDir; // Relative path to folder containing Cargo.toml - String libname; // Library name within Cargo.toml. Must be a cdylib -} - -abstract class CargoKitBuildTask extends DefaultTask { - - @Input - String buildMode - - @Input - String buildDir - - @Input - String outputDir - - @Input - String ndkVersion - - @Input - String sdkDirectory - - @Input - int compileSdkVersion; - - @Input - int minSdkVersion; - - @Input - String pluginFile - - @Input - List targetPlatforms - - @TaskAction - def build() { - if (project.cargokit.manifestDir == null) { - throw new GradleException("Property 'manifestDir' must be set on cargokit extension"); - } - - if (project.cargokit.libname == null) { - throw new GradleException("Property 'libname' must be set on cargokit extension"); - } - - def executableName = Os.isFamily(Os.FAMILY_WINDOWS) ? "run_build_tool.cmd" : "run_build_tool.sh" - def path = Paths.get(new File(pluginFile).parent, "..", executableName); - - def manifestDir = Paths.get(project.buildscript.sourceFile.parent, project.cargokit.manifestDir) - - def rootProjectDir = project.rootProject.projectDir - - if (!Os.isFamily(Os.FAMILY_WINDOWS)) { - project.exec { - commandLine 'chmod', '+x', path - } - } - - project.exec { - executable path - args "build-gradle" - environment "CARGOKIT_ROOT_PROJECT_DIR", rootProjectDir - environment "CARGOKIT_TOOL_TEMP_DIR", "${buildDir}/build_tool" - environment "CARGOKIT_MANIFEST_DIR", manifestDir - environment "CARGOKIT_CONFIGURATION", buildMode - environment "CARGOKIT_TARGET_TEMP_DIR", buildDir - environment "CARGOKIT_OUTPUT_DIR", outputDir - environment "CARGOKIT_NDK_VERSION", ndkVersion - environment "CARGOKIT_SDK_DIR", sdkDirectory - environment "CARGOKIT_COMPILE_SDK_VERSION", compileSdkVersion - environment "CARGOKIT_MIN_SDK_VERSION", minSdkVersion - environment "CARGOKIT_TARGET_PLATFORMS", targetPlatforms.join(",") - environment "CARGOKIT_JAVA_HOME", System.properties['java.home'] - } - } -} - -class CargoKitPlugin implements Plugin { - - static String file; - - private Plugin findFlutterPlugin(Project rootProject) { - _findFlutterPlugin(rootProject.childProjects) - } - - private Plugin _findFlutterPlugin(Map projects) { - for (project in projects) { - for (plugin in project.value.getPlugins()) { - if (plugin.class.name == "FlutterPlugin") { - return plugin; - } - } - def plugin = _findFlutterPlugin(project.value.childProjects); - if (plugin != null) { - return plugin; - } - } - return null; - } - - @Override - void apply(Project project) { - def plugin = findFlutterPlugin(project.rootProject); - - project.extensions.create("cargokit", CargoKitExtension) - - if (plugin == null) { - print("Flutter plugin not found, CargoKit plugin will not be applied.") - return; - } - - def cargoBuildDir = "${project.buildDir}/build" - - plugin.project.android.applicationVariants.all { variant -> - - final buildType = variant.buildType.name - - def cargoOutputDir = "${project.buildDir}/jniLibs/${buildType}"; - def jniLibs = project.android.sourceSets.maybeCreate(buildType).jniLibs; - jniLibs.srcDir(new File(cargoOutputDir)) - - def platforms = plugin.getTargetPlatforms().collect() - - // Same thing addFlutterDependencies does in flutter.gradle - if (buildType == "debug") { - platforms.add("android-x86") - platforms.add("android-x64") - } - - // The task name depends on plugin properties, which are not available - // at this point - project.getGradle().afterProject { - def taskName = "cargokitCargoBuild${project.cargokit.libname.capitalize()}${buildType.capitalize()}"; - - if (project.tasks.findByName(taskName)) { - return - } - - if (plugin.project.android.ndkVersion == null) { - throw new GradleException("Please set 'android.ndkVersion' in 'app/build.gradle'.") - } - - def task = project.tasks.create(taskName, CargoKitBuildTask.class) { - buildMode = variant.buildType.name - buildDir = cargoBuildDir - outputDir = cargoOutputDir - ndkVersion = plugin.project.android.ndkVersion - sdkDirectory = plugin.project.android.sdkDirectory - minSdkVersion = plugin.project.android.defaultConfig.minSdkVersion.apiLevel as int - compileSdkVersion = plugin.project.android.compileSdkVersion.substring(8) as int - targetPlatforms = platforms - pluginFile = CargoKitPlugin.file - } - def onTask = { newTask -> - if (newTask.name == "merge${buildType.capitalize()}NativeLibs") { - newTask.dependsOn task - // Fix gradle 7.4.2 not picking up JNI library changes - newTask.outputs.upToDateWhen { false } - } - } - project.tasks.each onTask - project.tasks.whenTaskAdded onTask - } - } - } -} diff --git a/cargokit/run_build_tool.cmd b/cargokit/run_build_tool.cmd deleted file mode 100644 index c45d0aa8..00000000 --- a/cargokit/run_build_tool.cmd +++ /dev/null @@ -1,91 +0,0 @@ -@echo off -setlocal - -setlocal ENABLEDELAYEDEXPANSION - -SET BASEDIR=%~dp0 - -if not exist "%CARGOKIT_TOOL_TEMP_DIR%" ( - mkdir "%CARGOKIT_TOOL_TEMP_DIR%" -) -cd /D "%CARGOKIT_TOOL_TEMP_DIR%" - -SET BUILD_TOOL_PKG_DIR=%BASEDIR%build_tool -SET DART=%FLUTTER_ROOT%\bin\cache\dart-sdk\bin\dart - -set BUILD_TOOL_PKG_DIR_POSIX=%BUILD_TOOL_PKG_DIR:\=/% - -( - echo name: build_tool_runner - echo version: 1.0.0 - echo publish_to: none - echo. - echo environment: - echo sdk: '^>=3.0.0 ^<4.0.0' - echo. - echo dependencies: - echo build_tool: - echo path: %BUILD_TOOL_PKG_DIR_POSIX% -) >pubspec.yaml - -if not exist bin ( - mkdir bin -) - -( - echo import 'package:build_tool/build_tool.dart' as build_tool; - echo void main^(List^ args^) ^{ - echo build_tool.runMain^(args^); - echo ^} -) >bin\build_tool_runner.dart - -SET PRECOMPILED=bin\build_tool_runner.dill - -REM To detect changes in package we compare output of DIR /s (recursive) -set PREV_PACKAGE_INFO=.dart_tool\package_info.prev -set CUR_PACKAGE_INFO=.dart_tool\package_info.cur - -DIR "%BUILD_TOOL_PKG_DIR%" /s > "%CUR_PACKAGE_INFO%_orig" - -REM Last line in dir output is free space on harddrive. That is bound to -REM change between invocation so we need to remove it -( - Set "Line=" - For /F "UseBackQ Delims=" %%A In ("%CUR_PACKAGE_INFO%_orig") Do ( - SetLocal EnableDelayedExpansion - If Defined Line Echo !Line! - EndLocal - Set "Line=%%A") -) >"%CUR_PACKAGE_INFO%" -DEL "%CUR_PACKAGE_INFO%_orig" - -REM Compare current directory listing with previous -FC /B "%CUR_PACKAGE_INFO%" "%PREV_PACKAGE_INFO%" > nul 2>&1 - -If %ERRORLEVEL% neq 0 ( - REM Changed - copy current to previous and remove precompiled kernel - if exist "%PREV_PACKAGE_INFO%" ( - DEL "%PREV_PACKAGE_INFO%" - ) - MOVE /Y "%CUR_PACKAGE_INFO%" "%PREV_PACKAGE_INFO%" - if exist "%PRECOMPILED%" ( - DEL "%PRECOMPILED%" - ) -) - -REM There is no CUR_PACKAGE_INFO it was renamed in previous step to %PREV_PACKAGE_INFO% -REM which means we need to do pub get and precompile -if not exist "%PRECOMPILED%" ( - echo Running pub get in "%cd%" - "%DART%" pub get --no-precompile - "%DART%" compile kernel bin/build_tool_runner.dart -) - -"%DART%" "%PRECOMPILED%" %* - -REM 253 means invalid snapshot version. -If %ERRORLEVEL% equ 253 ( - "%DART%" pub get --no-precompile - "%DART%" compile kernel bin/build_tool_runner.dart - "%DART%" "%PRECOMPILED%" %* -) diff --git a/cargokit/run_build_tool.sh b/cargokit/run_build_tool.sh deleted file mode 100755 index 6e594a23..00000000 --- a/cargokit/run_build_tool.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env bash - -set -e - -BASEDIR=$(dirname "$0") - -mkdir -p "$CARGOKIT_TOOL_TEMP_DIR" - -cd "$CARGOKIT_TOOL_TEMP_DIR" - -# Write a very simple bin package in temp folder that depends on build_tool package -# from Cargokit. This is done to ensure that we don't pollute Cargokit folder -# with .dart_tool contents. - -BUILD_TOOL_PKG_DIR="$BASEDIR/build_tool" - -if [[ -z $FLUTTER_ROOT ]]; then # not defined - DART=dart -else - DART="$FLUTTER_ROOT/bin/cache/dart-sdk/bin/dart" -fi - -cat << EOF > "pubspec.yaml" -name: build_tool_runner -version: 1.0.0 -publish_to: none - -environment: - sdk: '>=3.0.0 <4.0.0' - -dependencies: - build_tool: - path: "$BUILD_TOOL_PKG_DIR" -EOF - -mkdir -p "bin" - -cat << EOF > "bin/build_tool_runner.dart" -import 'package:build_tool/build_tool.dart' as build_tool; -void main(List args) { - build_tool.runMain(args); -} -EOF - -# Create alias for `shasum` if it does not exist and `sha1sum` exists -if ! [ -x "$(command -v shasum)" ] && [ -x "$(command -v sha1sum)" ]; then - shopt -s expand_aliases - alias shasum="sha1sum" -fi - -# Dart run will not cache any package that has a path dependency, which -# is the case for our build_tool_runner. So instead we precompile the package -# ourselves. -# To invalidate the cached kernel we use the hash of ls -LR of the build_tool -# package directory. This should be good enough, as the build_tool package -# itself is not meant to have any path dependencies. - -if [[ "$OSTYPE" == "darwin"* ]]; then - PACKAGE_HASH=$(ls -lTR "$BUILD_TOOL_PKG_DIR" | shasum) -else - PACKAGE_HASH=$(ls -lR --full-time "$BUILD_TOOL_PKG_DIR" | shasum) -fi - -PACKAGE_HASH_FILE=".package_hash" - -if [ -f "$PACKAGE_HASH_FILE" ]; then - EXISTING_HASH=$(cat "$PACKAGE_HASH_FILE") - if [ "$PACKAGE_HASH" != "$EXISTING_HASH" ]; then - rm "$PACKAGE_HASH_FILE" - fi -fi - -# Run pub get if needed. -if [ ! -f "$PACKAGE_HASH_FILE" ]; then - "$DART" pub get --no-precompile - "$DART" compile kernel bin/build_tool_runner.dart - echo "$PACKAGE_HASH" > "$PACKAGE_HASH_FILE" -fi - -set +e - -"$DART" bin/build_tool_runner.dill "$@" - -exit_code=$? - -# 253 means invalid snapshot version. -if [ $exit_code == 253 ]; then - "$DART" pub get --no-precompile - "$DART" compile kernel bin/build_tool_runner.dart - "$DART" bin/build_tool_runner.dill "$@" - exit_code=$? -fi - -exit $exit_code diff --git a/example/integration_test /full_cycle_test.dart b/example/integration_test /full_cycle_test.dart deleted file mode 100644 index 867af912..00000000 --- a/example/integration_test /full_cycle_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'dart:typed_data'; - -import 'package:bdk_flutter/bdk_flutter.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - group('Descriptor & Wallet', () { - setUp(() async {}); - testWidgets('generating psbt using a muti-sig wallet', (_) async { - final externalDescriptor = await Descriptor.create( - descriptor: - "wsh(thresh(2,pk(tpubD6NzVbkrYhZ4XJBfEJ6gt9DiVdfWJijsQTCE3jtXByW3Tk6AVGQ3vL1NNxg3SjB7QkJAuutACCQjrXD8zdZSM1ZmBENszCqy49ECEHmD6rf/0/*),sj:and_v(v:pk(tpubD6NzVbkrYhZ4YfAr3jCBRk4SpqB9L1Hh442y83njwfMaker7EqZd7fHMqyTWrfRYJ1e5t2ue6BYjW5i5yQnmwqbzY1a3kfqNxog1AFcD1aE/0/*),n:older(6)),snj:and_v(v:pk(tprv8ZgxMBicQKsPeitVUz3s6cfyCECovNP7t82FaKPa4UKqV1kssWcXgLkMDjzDbgG9GWoza4pL7z727QitfzkiwX99E1Has3T3a1MKHvYWmQZ/0/*),after(630000))))", - network: Network.signet); - final internalDescriptor = await Descriptor.create( - descriptor: - "wsh(thresh(2,pk(tpubD6NzVbkrYhZ4XJBfEJ6gt9DiVdfWJijsQTCE3jtXByW3Tk6AVGQ3vL1NNxg3SjB7QkJAuutACCQjrXD8zdZSM1ZmBENszCqy49ECEHmD6rf/1/*),sj:and_v(v:pk(tpubD6NzVbkrYhZ4YfAr3jCBRk4SpqB9L1Hh442y83njwfMaker7EqZd7fHMqyTWrfRYJ1e5t2ue6BYjW5i5yQnmwqbzY1a3kfqNxog1AFcD1aE/1/*),n:older(6)),snj:and_v(v:pk(tprv8ZgxMBicQKsPeitVUz3s6cfyCECovNP7t82FaKPa4UKqV1kssWcXgLkMDjzDbgG9GWoza4pL7z727QitfzkiwX99E1Has3T3a1MKHvYWmQZ/1/*),after(630000))))", - network: Network.signet); - - final wallet = await Wallet.create( - descriptor: externalDescriptor, - changeDescriptor: internalDescriptor, - network: Network.signet, - databaseConfig: const DatabaseConfig.memory()); - final blockchain = await Blockchain.createMutinynet(); - wallet.sync(blockchain: blockchain); - debugPrint("Wallet balance: ${wallet.getBalance().total}"); - final toAddress = wallet - .getAddress(addressIndex: const AddressIndex.increase()) - .address; - debugPrint("Wallet address: ${toAddress.toString()}"); - final externalWalletPolicy = wallet.policies(KeychainKind.externalChain); - final ineternalWalletPolicy = wallet.policies(KeychainKind.internalChain); - if (externalWalletPolicy != null && ineternalWalletPolicy != null) { - // Construct external and internal policy paths - final extPath = { - ineternalWalletPolicy.id(): Uint32List.fromList([0, 1]) - }; - debugPrint("External Policy path: $extPath\n"); - - final intPath = { - ineternalWalletPolicy.id(): Uint32List.fromList([0, 1]) - }; - debugPrint("Internal Policy Path: $intPath\n"); - - // Build the transaction - final txBuilder = TxBuilder() - .addRecipient( - toAddress.scriptPubkey(), - BigInt.from(1000), - ) - .doNotSpendChange() - .policyPath(KeychainKind.internalChain, intPath) - .policyPath(KeychainKind.externalChain, extPath); - - final (psbt, _) = await txBuilder.finish(wallet); - debugPrint("Transaction serialized: ${psbt.toString()}\n"); - } - }); - }); -} diff --git a/example/integration_test /multi_sig_test.dart b/example/integration_test /multi_sig_test.dart new file mode 100644 index 00000000..d3ad408b --- /dev/null +++ b/example/integration_test /multi_sig_test.dart @@ -0,0 +1,167 @@ +import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +/// Derives extended descriptor keys (secret and public) based on the provided +/// hardened and unhardened derivation paths and mnemonic. +Future<(DescriptorSecretKey, DescriptorPublicKey)> deriveDescriptorKeys( + DerivationPath hardenedPath, + DerivationPath unHardenedPath, + Mnemonic mnemonic, +) async { + // Create the root secret key from the mnemonic + final secretKey = await DescriptorSecretKey.create( + mnemonic: mnemonic, network: Network.signet); + + // Derive the key at the hardened path + final derivedSecretKey = await secretKey.derive(hardenedPath); + + // Extend the derived secret key further using the unhardened path + final derivedExtendedSecretKey = + await derivedSecretKey.extend(unHardenedPath); + + // Convert the derived secret key to its public counterpart + final publicKey = derivedSecretKey.toPublic(); + + // Extend the public key using the same unhardened path + final derivedExtendedPublicKey = await publicKey.extend(path: unHardenedPath); + + return (derivedExtendedSecretKey, derivedExtendedPublicKey); +} + +/// Constructs a wallet descriptor using timelock conditions and public keys. +String createWalletDescriptor( + String primaryReceivingSecret, // Alice's descriptor derived from m/0 + String secondaryReceivingPublic, // Bob's public key derived from m/0 + int primaryTimelock, // Alice's timelock + int secondaryTimelock, // Bob's timelock + String primaryChangePublic, // Alice's public key derived from m/1 + String secondaryChangePublic, // Bob's public key derived from m/1 +) { + // Define the multi-sig condition based on timelock priority + String multi = (primaryTimelock < secondaryTimelock) + ? 'multi(2,$primaryReceivingSecret,$secondaryReceivingPublic)' + : 'multi(2,$secondaryReceivingPublic,$primaryReceivingSecret)'; + + // Define the timelock conditions for Bob and Alice + String timelockBob = + 'and_v(v:older($secondaryTimelock),pk($secondaryChangePublic))'; + String timelockAlice = + 'and_v(v:older($primaryTimelock),pk($primaryChangePublic))'; + + // Combine the timelock conditions + String timelockCondition = (primaryTimelock < secondaryTimelock) + ? 'or_i($timelockAlice,$timelockBob)' + : 'or_i($timelockBob,$timelockAlice)'; + + // Return the final wallet descriptor + return 'wsh(or_d($multi,$timelockCondition))'; +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('Time-locked multi-sig wallet synchronization', () { + setUp(() async { + // Setup for test group + }); + + test("Alice and Bob should have the same initial address and balance", + () async { + // Define mnemonics for Alice and Bob + final alice = await Mnemonic.fromString( + 'thumb member wage display inherit music elevator need side setup tube panther broom giant auction banner split potato'); + final bob = await Mnemonic.fromString( + 'tired shine hat tired hover timber reward bridge verb aerobic safe economy'); + + // Define timelocks for Alice and Bob + const aliceTimelock = 25; + const bobTimeLock = 35; + + // Define derivation paths + final hardenedDerivationPath = + await DerivationPath.create(path: "m/84h/1h/0h"); + final receivingDerivationPath = await DerivationPath.create(path: "m/0"); + final changeDerivationPath = await DerivationPath.create(path: "m/1"); + + // Derive keys for Alice + final (aliceReceivingSecretKey, aliceReceivingPublicKey) = + await deriveDescriptorKeys( + hardenedDerivationPath, receivingDerivationPath, alice); + final (aliceChangeSecretKey, aliceChangePublicKey) = + await deriveDescriptorKeys( + hardenedDerivationPath, changeDerivationPath, alice); + + // Derive keys for Bob + final (bobReceivingSecretKey, bobReceivingPublicKey) = + await deriveDescriptorKeys( + hardenedDerivationPath, receivingDerivationPath, bob); + final (bobChangeSecretKey, bobChangePublicKey) = + await deriveDescriptorKeys( + hardenedDerivationPath, changeDerivationPath, bob); + + // Create wallet descriptors for Alice and Bob + final aliceDescriptor = createWalletDescriptor( + aliceReceivingSecretKey.toString(), + bobReceivingPublicKey.toString(), + aliceTimelock, + bobTimeLock, + aliceChangePublicKey.toString(), + bobChangePublicKey.toString()); + final bobDescriptor = createWalletDescriptor( + bobReceivingSecretKey.toString(), + aliceReceivingPublicKey.toString(), + bobTimeLock, + aliceTimelock, + bobChangePublicKey.toString(), + aliceChangePublicKey.toString()); + + // Debug print descriptors + debugPrint("Alice's descriptor: $aliceDescriptor"); + debugPrint("Bob's descriptor: $bobDescriptor"); + + // Create wallets + final aliceWallet = await Wallet.create( + descriptor: await Descriptor.create( + descriptor: aliceDescriptor, network: Network.signet), + network: Network.signet, + databaseConfig: const DatabaseConfig.memory()); + final bobWallet = await Wallet.create( + descriptor: await Descriptor.create( + descriptor: bobDescriptor, network: Network.signet), + network: Network.signet, + databaseConfig: const DatabaseConfig.memory()); + + // Get initial addresses + final aliceAddress = aliceWallet + .getAddress(addressIndex: const AddressIndex.peek(index: 0)) + .address + .toString(); + final bobAddress = bobWallet + .getAddress(addressIndex: const AddressIndex.peek(index: 0)) + .address + .toString(); + assert(aliceAddress == bobAddress, "Addresses should match"); + + debugPrint("Alice's receiving address: $aliceAddress"); + debugPrint("Bob's receiving address: $bobAddress"); + + // Sync wallets + final blockchain = await Blockchain.createMutinynet(); + debugPrint("Syncing Bob's wallet..."); + await bobWallet.sync(blockchain: blockchain); + debugPrint("Syncing Alice's wallet..."); + await aliceWallet.sync(blockchain: blockchain); + debugPrint("Synchronization complete"); + + // Check balances + final bobBalance = bobWallet.getBalance().total.toInt(); + final aliceBalance = aliceWallet.getBalance().total.toInt(); + assert(bobBalance == aliceBalance, "Balances should match"); + + debugPrint("Alice's balance: $aliceBalance"); + debugPrint("Bob's balance: $bobBalance"); + }); + }); +} diff --git a/example/lib/main.dart b/example/lib/main.dart index 4f12fa02..3b7e0e3b 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,6 +1,6 @@ -import 'package:bdk_flutter_example/simple_wallet.dart'; +import 'package:bdk_flutter_example/wallet.dart'; import 'package:flutter/material.dart'; void main() { - runApp(const SimpleWallet()); + runApp(const ExampleWallet()); } diff --git a/example/lib/multi_sig_wallet.dart b/example/lib/multi_sig_wallet.dart deleted file mode 100644 index 44f78346..00000000 --- a/example/lib/multi_sig_wallet.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:bdk_flutter/bdk_flutter.dart'; -import 'package:flutter/foundation.dart'; - -class MultiSigWallet { - Future> init2Of3Descriptors(List mnemonics) async { - final List descriptorInfos = []; - for (var e in mnemonics) { - final secret = await DescriptorSecretKey.create( - network: Network.testnet, mnemonic: e); - final public = secret.toPublic(); - descriptorInfos.add(DescriptorKeyInfo(secret, public)); - } - final alice = - "wsh(sortedmulti(2,${descriptorInfos[0].xprv},${descriptorInfos[1].xpub},${descriptorInfos[2].xpub}))"; - final bob = - "wsh(sortedmulti(2,${descriptorInfos[1].xprv},${descriptorInfos[2].xpub},${descriptorInfos[0].xpub}))"; - final dave = - "wsh(sortedmulti(2,${descriptorInfos[2].xprv},${descriptorInfos[0].xpub},${descriptorInfos[1].xpub}))"; - final List descriptors = []; - final parsedDes = [alice, bob, dave]; - for (var e in parsedDes) { - final res = - await Descriptor.create(descriptor: e, network: Network.testnet); - descriptors.add(res); - } - return descriptors; - } - - Future> createDescriptors() async { - final alice = await Mnemonic.fromString( - 'thumb member wage display inherit music elevator need side setup tube panther broom giant auction banner split potato'); - final bob = await Mnemonic.fromString( - 'tired shine hat tired hover timber reward bridge verb aerobic safe economy'); - final dave = await Mnemonic.fromString( - 'lawsuit upper gospel minimum cinnamon common boss wage benefit betray ribbon hour'); - final descriptors = await init2Of3Descriptors([alice, bob, dave]); - return descriptors; - } - - Future> init20f3Wallets() async { - final descriptors = await createDescriptors(); - final alice = await Wallet.create( - descriptor: descriptors[0], - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory()); - final bob = await Wallet.create( - descriptor: descriptors[1], - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory()); - final dave = await Wallet.create( - descriptor: descriptors[2], - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory()); - return [alice, bob, dave]; - } - - sendBitcoin(Blockchain blockchain, Wallet wallet, Wallet bobWallet, - String addressStr) async { - try { - final txBuilder = TxBuilder(); - final address = - await Address.fromString(s: addressStr, network: wallet.network()); - final script = address.scriptPubkey(); - final feeRate = await blockchain.estimateFee(target: BigInt.from(25)); - final (psbt, _) = await txBuilder - .addRecipient(script, BigInt.from(1200)) - .feeRate(feeRate.satPerVb) - .finish(wallet); - await wallet.sign( - psbt: psbt, - signOptions: const SignOptions( - trustWitnessUtxo: false, - allowAllSighashes: true, - removePartialSigs: true, - tryFinalize: true, - signWithTapInternalKey: true, - allowGrinding: true)); - final isFinalized = await bobWallet.sign(psbt: psbt); - if (isFinalized) { - final tx = psbt.extractTx(); - await blockchain.broadcast(transaction: tx); - } else { - debugPrint("Psbt not finalized!"); - } - } on FormatException catch (e) { - if (kDebugMode) { - print(e.message); - } - } - } -} - -class DescriptorKeyInfo { - final DescriptorSecretKey xprv; - final DescriptorPublicKey xpub; - DescriptorKeyInfo(this.xprv, this.xpub); -} diff --git a/example/lib/simple_wallet.dart b/example/lib/wallet.dart similarity index 98% rename from example/lib/simple_wallet.dart rename to example/lib/wallet.dart index c0af426e..159e3685 100644 --- a/example/lib/simple_wallet.dart +++ b/example/lib/wallet.dart @@ -4,14 +4,14 @@ import 'package:flutter/material.dart'; import 'bdk_library.dart'; -class SimpleWallet extends StatefulWidget { - const SimpleWallet({super.key}); +class ExampleWallet extends StatefulWidget { + const ExampleWallet({super.key}); @override - State createState() => _SimpleWalletState(); + State createState() => _ExampleWalletState(); } -class _SimpleWalletState extends State { +class _ExampleWalletState extends State { String displayText = ""; BigInt balance = BigInt.zero; late Wallet wallet; diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock index 2d921409..78c676da 100644 --- a/example/macos/Podfile.lock +++ b/example/macos/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - bdk_flutter (0.31.2): + - bdk_flutter (0.31.3): - FlutterMacOS - FlutterMacOS (1.0.0) diff --git a/example/pubspec.lock b/example/pubspec.lock index 2735c848..d3df3614 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -39,7 +39,7 @@ packages: path: ".." relative: true source: path - version: "0.31.2" + version: "0.31.3" boolean_selector: dependency: transitive description: @@ -156,10 +156,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" file: dependency: transitive description: @@ -211,10 +211,10 @@ packages: dependency: transitive description: name: freezed_annotation - sha256: f54946fdb1fa7b01f780841937b1a80783a20b393485f3f6cdf336fd6f4705f2 + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.4" fuchsia_remote_debug_protocol: dependency: transitive description: flutter @@ -374,14 +374,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" stack_trace: dependency: transitive description: @@ -438,14 +430,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" - uuid: - dependency: transitive - description: - name: uuid - sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" - url: "https://pub.dev" - source: hosted - version: "4.4.0" vector_math: dependency: transitive description: diff --git a/ios/Classes/frb_generated.h b/ios/Classes/frb_generated.h index 5c3e0c91..2430b240 100644 --- a/ios/Classes/frb_generated.h +++ b/ios/Classes/frb_generated.h @@ -906,7 +906,7 @@ typedef struct wire_cst_satisfiable_item { } wire_cst_satisfiable_item; void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast(int64_t port_, - struct wire_cst_bdk_blockchain *that, + struct wire_cst_bdk_blockchain *ptr, struct wire_cst_bdk_transaction *transaction); void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create(int64_t port_, @@ -1153,7 +1153,7 @@ void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(int6 bool only_witness_utxo, struct wire_cst_psbt_sig_hash_type *sighash_type); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *that, +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *ptr, struct wire_cst_bdk_script_buf *script); WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions(struct wire_cst_bdk_wallet *that, diff --git a/ios/bdk_flutter.podspec b/ios/bdk_flutter.podspec index 6d40826d..a4dfcd45 100644 --- a/ios/bdk_flutter.podspec +++ b/ios/bdk_flutter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'bdk_flutter' - s.version = "0.31.2" + s.version = "0.31.3" s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' s.description = <<-DESC A new Flutter plugin project. diff --git a/lib/bdk_flutter.dart b/lib/bdk_flutter.dart index 48f3898f..3f8a0457 100644 --- a/lib/bdk_flutter.dart +++ b/lib/bdk_flutter.dart @@ -2,42 +2,49 @@ library bdk_flutter; export './src/generated/api/blockchain.dart' - hide - BdkBlockchain, - BlockchainConfig_Electrum, - BlockchainConfig_Esplora, - Auth_Cookie, - Auth_UserPass, - Auth_None, - BlockchainConfig_Rpc; -export './src/generated/api/descriptor.dart' hide BdkDescriptor; -export './src/generated/api/key.dart' - hide - BdkDerivationPath, - BdkDescriptorPublicKey, - BdkDescriptorSecretKey, - BdkMnemonic; -export './src/generated/api/psbt.dart' hide BdkPsbt; + show + Auth, + BlockchainConfig, + ElectrumConfig, + EsploraConfig, + RpcConfig, + RpcSyncParams; + export './src/generated/api/types.dart' - hide - BdkScriptBuf, - BdkTransaction, - AddressIndex_Reset, - LockTime_Blocks, - LockTime_Seconds, - BdkAddress, - AddressIndex_Peek, - AddressIndex_Increase, - AddressIndex_LastUnused, - Payload_PubkeyHash, - Payload_ScriptHash, - Payload_WitnessProgram, - DatabaseConfig_Sled, - DatabaseConfig_Memory, - RbfValue_RbfDefault, - RbfValue_Value, - DatabaseConfig_Sqlite; + show + AddressIndex, + Balance, + BlockTime, + ChangeSpendPolicy, + Condition, + DatabaseConfig, + FeeRate, + Input, + KeychainKind, + LocalUtxo, + LockTime, + Network, + OutPoint, + Payload, + PkOrF, + PsbtSigHashType, + RbfValue, + Satisfaction, + SatisfiableItem, + SignOptions, + SledDbConfiguration, + SqliteDbConfiguration, + Variant, + WitnessVersion, + WordCount; export './src/generated/api/wallet.dart' hide BdkWallet, finishBumpFeeTxBuilder, txBuilderFinish; export './src/root.dart'; -export 'src/utils/exceptions.dart' hide mapBdkError, BdkFfiException; +export 'src/utils/exceptions.dart' + hide + mapBdkError, + mapAddressError, + mapConsensusError, + mapDescriptorError, + mapHexError, + BdkFfiException; diff --git a/lib/src/generated/api/blockchain.dart b/lib/src/generated/api/blockchain.dart index f4be0008..469d95ee 100644 --- a/lib/src/generated/api/blockchain.dart +++ b/lib/src/generated/api/blockchain.dart @@ -44,9 +44,10 @@ class BdkBlockchain { required this.ptr, }); - Future broadcast({required BdkTransaction transaction}) => + static Future broadcast( + {required BdkBlockchain ptr, required BdkTransaction transaction}) => core.instance.api.crateApiBlockchainBdkBlockchainBroadcast( - that: this, transaction: transaction); + ptr: ptr, transaction: transaction); static Future create( {required BlockchainConfig blockchainConfig}) => diff --git a/lib/src/generated/api/wallet.dart b/lib/src/generated/api/wallet.dart index f5e19dd4..e3a5ff39 100644 --- a/lib/src/generated/api/wallet.dart +++ b/lib/src/generated/api/wallet.dart @@ -112,8 +112,8 @@ class BdkWallet { onlyWitnessUtxo: onlyWitnessUtxo, sighashType: sighashType); - bool isMine({required BdkScriptBuf script}) => core.instance.api - .crateApiWalletBdkWalletIsMine(that: this, script: script); + static bool isMine({required BdkWallet ptr, required BdkScriptBuf script}) => + core.instance.api.crateApiWalletBdkWalletIsMine(ptr: ptr, script: script); /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. List listTransactions({required bool includeRaw}) => diff --git a/lib/src/generated/frb_generated.dart b/lib/src/generated/frb_generated.dart index 0c5ea9d6..8d2b34e9 100644 --- a/lib/src/generated/frb_generated.dart +++ b/lib/src/generated/frb_generated.dart @@ -74,7 +74,7 @@ class core extends BaseEntrypoint { abstract class coreApi extends BaseApi { Future crateApiBlockchainBdkBlockchainBroadcast( - {required BdkBlockchain that, required BdkTransaction transaction}); + {required BdkBlockchain ptr, required BdkTransaction transaction}); Future crateApiBlockchainBdkBlockchainCreate( {required BlockchainConfig blockchainConfig}); @@ -316,7 +316,7 @@ abstract class coreApi extends BaseApi { PsbtSigHashType? sighashType}); bool crateApiWalletBdkWalletIsMine( - {required BdkWallet that, required BdkScriptBuf script}); + {required BdkWallet ptr, required BdkScriptBuf script}); List crateApiWalletBdkWalletListTransactions( {required BdkWallet that, required bool includeRaw}); @@ -467,10 +467,10 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { @override Future crateApiBlockchainBdkBlockchainBroadcast( - {required BdkBlockchain that, required BdkTransaction transaction}) { + {required BdkBlockchain ptr, required BdkTransaction transaction}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); + var arg0 = cst_encode_box_autoadd_bdk_blockchain(ptr); var arg1 = cst_encode_box_autoadd_bdk_transaction(transaction); return wire.wire__crate__api__blockchain__bdk_blockchain_broadcast( port_, arg0, arg1); @@ -480,7 +480,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { decodeErrorData: dco_decode_bdk_error, ), constMeta: kCrateApiBlockchainBdkBlockchainBroadcastConstMeta, - argValues: [that, transaction], + argValues: [ptr, transaction], apiImpl: this, )); } @@ -488,7 +488,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { TaskConstMeta get kCrateApiBlockchainBdkBlockchainBroadcastConstMeta => const TaskConstMeta( debugName: "bdk_blockchain_broadcast", - argNames: ["that", "transaction"], + argNames: ["ptr", "transaction"], ); @override @@ -2488,10 +2488,10 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { @override bool crateApiWalletBdkWalletIsMine( - {required BdkWallet that, required BdkScriptBuf script}) { + {required BdkWallet ptr, required BdkScriptBuf script}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); var arg1 = cst_encode_box_autoadd_bdk_script_buf(script); return wire.wire__crate__api__wallet__bdk_wallet_is_mine(arg0, arg1); }, @@ -2500,7 +2500,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { decodeErrorData: dco_decode_bdk_error, ), constMeta: kCrateApiWalletBdkWalletIsMineConstMeta, - argValues: [that, script], + argValues: [ptr, script], apiImpl: this, )); } @@ -2508,7 +2508,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { TaskConstMeta get kCrateApiWalletBdkWalletIsMineConstMeta => const TaskConstMeta( debugName: "bdk_wallet_is_mine", - argNames: ["that", "script"], + argNames: ["ptr", "script"], ); @override diff --git a/lib/src/generated/frb_generated.io.dart b/lib/src/generated/frb_generated.io.dart index 1fe9f306..2b17a149 100644 --- a/lib/src/generated/frb_generated.io.dart +++ b/lib/src/generated/frb_generated.io.dart @@ -3844,12 +3844,12 @@ class coreWire implements BaseWire { void wire__crate__api__blockchain__bdk_blockchain_broadcast( int port_, - ffi.Pointer that, + ffi.Pointer ptr, ffi.Pointer transaction, ) { return _wire__crate__api__blockchain__bdk_blockchain_broadcast( port_, - that, + ptr, transaction, ); } @@ -5501,11 +5501,11 @@ class coreWire implements BaseWire { ffi.Pointer)>(); WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_is_mine( - ffi.Pointer that, + ffi.Pointer ptr, ffi.Pointer script, ) { return _wire__crate__api__wallet__bdk_wallet_is_mine( - that, + ptr, script, ); } diff --git a/lib/src/root.dart b/lib/src/root.dart index e9a856bb..fe73e4f0 100644 --- a/lib/src/root.dart +++ b/lib/src/root.dart @@ -1,6 +1,4 @@ import 'dart:typed_data'; - -import 'package:bdk_flutter/bdk_flutter.dart'; import 'package:bdk_flutter/src/utils/utils.dart'; import 'generated/api/blockchain.dart'; @@ -8,19 +6,20 @@ import 'generated/api/descriptor.dart'; import 'generated/api/error.dart'; import 'generated/api/key.dart'; import 'generated/api/psbt.dart'; -import 'generated/api/types.dart'; +import 'generated/api/types.dart' as types; import 'generated/api/wallet.dart'; ///A Bitcoin address. -class Address extends BdkAddress { +class Address extends types.BdkAddress { Address._({required super.ptr}); /// [Address] constructor static Future
fromScript( - {required ScriptBuf script, required Network network}) async { + {required ScriptBuf script, required types.Network network}) async { try { await Api.initialize(); - final res = await BdkAddress.fromScript(script: script, network: network); + final res = + await types.BdkAddress.fromScript(script: script, network: network); return Address._(ptr: res.ptr); } on BdkError catch (e) { throw mapBdkError(e); @@ -29,10 +28,11 @@ class Address extends BdkAddress { /// [Address] constructor static Future
fromString( - {required String s, required Network network}) async { + {required String s, required types.Network network}) async { try { await Api.initialize(); - final res = await BdkAddress.fromString(address: s, network: network); + final res = + await types.BdkAddress.fromString(address: s, network: network); return Address._(ptr: res.ptr); } on BdkError catch (e) { throw mapBdkError(e); @@ -42,7 +42,7 @@ class Address extends BdkAddress { ///Generates a script pubkey spending to this address ScriptBuf scriptPubkey() { try { - return ScriptBuf(bytes: BdkAddress.script(ptr: this).bytes); + return ScriptBuf(bytes: types.BdkAddress.script(ptr: this).bytes); } on BdkError catch (e) { throw mapBdkError(e); } @@ -66,7 +66,7 @@ class Address extends BdkAddress { ///When parsing, such addresses are always assumed to be testnet addresses (the same is true for bech32 signet addresses). ///So if one wants to check if an address belongs to a certain network a simple comparison is not enough anymore. Instead this function can be used. @override - bool isValidForNetwork({required Network network}) { + bool isValidForNetwork({required types.Network network}) { try { return super.isValidForNetwork(network: network); } on BdkError catch (e) { @@ -76,7 +76,7 @@ class Address extends BdkAddress { ///The network on which this address is usable. @override - Network network() { + types.Network network() { try { return super.network(); } on BdkError catch (e) { @@ -86,7 +86,7 @@ class Address extends BdkAddress { ///The type of the address. @override - Payload payload() { + types.Payload payload() { try { return super.payload(); } on BdkError catch (e) { @@ -146,7 +146,7 @@ class Blockchain extends BdkBlockchain { ///Estimate the fee rate required to confirm a transaction in a given target of blocks @override - Future estimateFee({required BigInt target, hint}) async { + Future estimateFee({required BigInt target, hint}) async { try { return super.estimateFee(target: target); } on BdkError catch (e) { @@ -155,10 +155,9 @@ class Blockchain extends BdkBlockchain { } ///The function for broadcasting a transaction - @override - Future broadcast({required BdkTransaction transaction, hint}) async { + Future broadcast({required Transaction transaction, hint}) async { try { - return super.broadcast(transaction: transaction); + return BdkBlockchain.broadcast(ptr: this, transaction: transaction); } on BdkError catch (e) { throw mapBdkError(e); } @@ -235,7 +234,17 @@ class BumpFeeTxBuilder { wallet: wallet, nSequence: _nSequence, allowShrinking: _allowShrinking); - return (PartiallySignedTransaction._(ptr: res.$1.ptr), res.$2); + return ( + PartiallySignedTransaction._(ptr: res.$1.ptr), + TransactionDetails( + transaction: (res.$2.transaction?.s == null) + ? null + : Transaction._(s: res.$2.transaction!.s), + txid: res.$2.txid, + received: res.$2.received, + sent: res.$2.sent, + confirmationTime: res.$2.confirmationTime) + ); } on BdkError catch (e) { throw mapBdkError(e); } @@ -269,7 +278,7 @@ class Descriptor extends BdkDescriptor { /// [Descriptor] constructor static Future create( - {required String descriptor, required Network network}) async { + {required String descriptor, required types.Network network}) async { try { await Api.initialize(); final res = await BdkDescriptor.newInstance( @@ -286,8 +295,8 @@ class Descriptor extends BdkDescriptor { /// Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). static Future newBip44( {required DescriptorSecretKey secretKey, - required Network network, - required KeychainKind keychain}) async { + required types.Network network, + required types.KeychainKind keychain}) async { try { await Api.initialize(); final res = await BdkDescriptor.newBip44( @@ -307,8 +316,8 @@ class Descriptor extends BdkDescriptor { static Future newBip44Public( {required DescriptorPublicKey publicKey, required String fingerPrint, - required Network network, - required KeychainKind keychain}) async { + required types.Network network, + required types.KeychainKind keychain}) async { try { await Api.initialize(); final res = await BdkDescriptor.newBip44Public( @@ -328,8 +337,8 @@ class Descriptor extends BdkDescriptor { ///Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). static Future newBip49( {required DescriptorSecretKey secretKey, - required Network network, - required KeychainKind keychain}) async { + required types.Network network, + required types.KeychainKind keychain}) async { try { await Api.initialize(); final res = await BdkDescriptor.newBip49( @@ -349,8 +358,8 @@ class Descriptor extends BdkDescriptor { static Future newBip49Public( {required DescriptorPublicKey publicKey, required String fingerPrint, - required Network network, - required KeychainKind keychain}) async { + required types.Network network, + required types.KeychainKind keychain}) async { try { await Api.initialize(); final res = await BdkDescriptor.newBip49Public( @@ -370,8 +379,8 @@ class Descriptor extends BdkDescriptor { ///Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). static Future newBip84( {required DescriptorSecretKey secretKey, - required Network network, - required KeychainKind keychain}) async { + required types.Network network, + required types.KeychainKind keychain}) async { try { await Api.initialize(); final res = await BdkDescriptor.newBip84( @@ -391,8 +400,8 @@ class Descriptor extends BdkDescriptor { static Future newBip84Public( {required DescriptorPublicKey publicKey, required String fingerPrint, - required Network network, - required KeychainKind keychain}) async { + required types.Network network, + required types.KeychainKind keychain}) async { try { await Api.initialize(); final res = await BdkDescriptor.newBip84Public( @@ -412,8 +421,8 @@ class Descriptor extends BdkDescriptor { /// Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). static Future newBip86( {required DescriptorSecretKey secretKey, - required Network network, - required KeychainKind keychain}) async { + required types.Network network, + required types.KeychainKind keychain}) async { try { await Api.initialize(); final res = await BdkDescriptor.newBip86( @@ -433,8 +442,8 @@ class Descriptor extends BdkDescriptor { static Future newBip86Public( {required DescriptorPublicKey publicKey, required String fingerPrint, - required Network network, - required KeychainKind keychain}) async { + required types.Network network, + required types.KeychainKind keychain}) async { try { await Api.initialize(); final res = await BdkDescriptor.newBip86Public( @@ -537,7 +546,7 @@ class DescriptorSecretKey extends BdkDescriptorSecretKey { /// [DescriptorSecretKey] constructor static Future create( - {required Network network, + {required types.Network network, required Mnemonic mnemonic, String? password}) async { try { @@ -604,7 +613,7 @@ class Mnemonic extends BdkMnemonic { /// Generates [Mnemonic] with given [WordCount] /// /// [Mnemonic] constructor - static Future create(WordCount wordCount) async { + static Future create(types.WordCount wordCount) async { try { await Api.initialize(); final res = await BdkMnemonic.newInstance(wordCount: wordCount); @@ -678,7 +687,7 @@ class PartiallySignedTransaction extends BdkPsbt { ///Return fee rate @override - FeeRate? feeRate({hint}) { + types.FeeRate? feeRate({hint}) { try { return super.feeRate(); } on BdkError catch (e) { @@ -742,7 +751,7 @@ class PartiallySignedTransaction extends BdkPsbt { } } -class Policy extends BdkPolicy { +class Policy extends types.BdkPolicy { Policy._({required super.ptr}); ///Identifier for this policy node @@ -770,37 +779,43 @@ class Policy extends BdkPolicy { ///Type of this policy node @override - SatisfiableItem item() { + types.SatisfiableItem item() { return super.item().when( - ecdsaSignature: (e) => SatisfiableItem.ecdsaSignature(key: e), - schnorrSignature: (e) => SatisfiableItem.ecdsaSignature(key: e), - sha256Preimage: (e) => SatisfiableItem.sha256Preimage(hash: e), - hash256Preimage: (e) => SatisfiableItem.hash256Preimage(hash: e), - ripemd160Preimage: (e) => SatisfiableItem.ripemd160Preimage(hash: e), - hash160Preimage: (e) => SatisfiableItem.hash160Preimage(hash: e), - absoluteTimelock: (e) => SatisfiableItem.absoluteTimelock(value: e), - relativeTimelock: (e) => SatisfiableItem.relativeTimelock(value: e), - multisig: (e, f) => SatisfiableItem.multisig(keys: e, threshold: f), - thresh: (e, f) => SatisfiableItem.thresh( + ecdsaSignature: (e) => types.SatisfiableItem.ecdsaSignature(key: e), + schnorrSignature: (e) => types.SatisfiableItem.ecdsaSignature(key: e), + sha256Preimage: (e) => types.SatisfiableItem.sha256Preimage(hash: e), + hash256Preimage: (e) => + types.SatisfiableItem.hash256Preimage(hash: e), + ripemd160Preimage: (e) => + types.SatisfiableItem.ripemd160Preimage(hash: e), + hash160Preimage: (e) => + types.SatisfiableItem.hash160Preimage(hash: e), + absoluteTimelock: (e) => + types.SatisfiableItem.absoluteTimelock(value: e), + relativeTimelock: (e) => + types.SatisfiableItem.relativeTimelock(value: e), + multisig: (e, f) => + types.SatisfiableItem.multisig(keys: e, threshold: f), + thresh: (e, f) => types.SatisfiableItem.thresh( items: e.map((e) => Policy._(ptr: e.ptr)).toList(), threshold: f), ); } ///How much a given PSBT already satisfies this policy node in terms of signatures @override - Satisfaction satisfaction() { + types.Satisfaction satisfaction() { return super.satisfaction(); } ///How the wallet's descriptor can satisfy this policy node @override - Satisfaction contribution() { + types.Satisfaction contribution() { return super.contribution(); } } ///Bitcoin script. -class ScriptBuf extends BdkScriptBuf { +class ScriptBuf extends types.BdkScriptBuf { /// [ScriptBuf] constructor ScriptBuf({required super.bytes}); @@ -808,7 +823,7 @@ class ScriptBuf extends BdkScriptBuf { static Future empty() async { try { await Api.initialize(); - return ScriptBuf(bytes: BdkScriptBuf.empty().bytes); + return ScriptBuf(bytes: types.BdkScriptBuf.empty().bytes); } on BdkError catch (e) { throw mapBdkError(e); } @@ -818,7 +833,7 @@ class ScriptBuf extends BdkScriptBuf { static Future withCapacity(BigInt capacity) async { try { await Api.initialize(); - final res = await BdkScriptBuf.withCapacity(capacity: capacity); + final res = await types.BdkScriptBuf.withCapacity(capacity: capacity); return ScriptBuf(bytes: res.bytes); } on BdkError catch (e) { throw mapBdkError(e); @@ -829,7 +844,7 @@ class ScriptBuf extends BdkScriptBuf { static Future fromHex(String s) async { try { await Api.initialize(); - final res = await BdkScriptBuf.fromHex(s: s); + final res = await types.BdkScriptBuf.fromHex(s: s); return ScriptBuf(bytes: res.bytes); } on BdkError catch (e) { throw mapBdkError(e); @@ -843,7 +858,7 @@ class ScriptBuf extends BdkScriptBuf { } ///A bitcoin transaction. -class Transaction extends BdkTransaction { +class Transaction extends types.BdkTransaction { Transaction._({required super.s}); /// [Transaction] constructor @@ -854,8 +869,8 @@ class Transaction extends BdkTransaction { }) async { try { await Api.initialize(); - final res = - await BdkTransaction.fromBytes(transactionBytes: transactionBytes); + final res = await types.BdkTransaction.fromBytes( + transactionBytes: transactionBytes); return Transaction._(s: res.s); } on BdkError catch (e) { throw mapBdkError(e); @@ -873,17 +888,18 @@ class Transaction extends BdkTransaction { /// A TxBuilder is created by calling TxBuilder or BumpFeeTxBuilder on a wallet. /// After assigning it, you set options on it until finally calling finish to consume the builder and generate the transaction. class TxBuilder { - final List _recipients = []; - final List _utxos = []; - final List _unSpendable = []; - (OutPoint, Input, BigInt)? _foreignUtxo; + final List _recipients = []; + final List _utxos = []; + final List _unSpendable = []; + (types.OutPoint, types.Input, BigInt)? _foreignUtxo; bool _manuallySelectedOnly = false; double? _feeRate; - ChangeSpendPolicy _changeSpendPolicy = ChangeSpendPolicy.changeAllowed; + types.ChangeSpendPolicy _changeSpendPolicy = + types.ChangeSpendPolicy.changeAllowed; BigInt? _feeAbsolute; bool _drainWallet = false; ScriptBuf? _drainTo; - RbfValue? _rbfValue; + types.RbfValue? _rbfValue; List _data = []; Map? _internalPolicyPath; Map? _externalPolicyPath; @@ -896,15 +912,15 @@ class TxBuilder { ///Add a recipient to the internal list TxBuilder addRecipient(ScriptBuf script, BigInt amount) { - _recipients.add(ScriptAmount(script: script, amount: amount)); + _recipients.add(types.ScriptAmount(script: script, amount: amount)); return this; } ///Add a utxo to the internal list of unspendable utxos /// - /// It’s important to note that the “must-be-spent†utxos added with TxBuilder().addUtxo have priority over this. + /// It's important to note that the "must-be-spent" utxos added with TxBuilder().addUtxo have priority over this. /// See the docs of the two linked methods for more details. - TxBuilder unSpendable(List outpoints) { + TxBuilder unSpendable(List outpoints) { for (var e in outpoints) { _unSpendable.add(e); } @@ -913,8 +929,8 @@ class TxBuilder { ///Add a utxo to the internal list of utxos that must be spent /// - /// These have priority over the “unspendable†utxos, meaning that if a utxo is present both in the “utxos†and the “unspendable†list, it will be spent. - TxBuilder addUtxo(OutPoint outpoint) { + /// These have priority over the "unspendable" utxos, meaning that if a utxo is present both in the "utxos" and the "unspendable" list, it will be spent. + TxBuilder addUtxo(types.OutPoint outpoint) { _utxos.add(outpoint); return this; } @@ -923,8 +939,8 @@ class TxBuilder { /// ///If an error occurs while adding any of the UTXOs then none of them are added and the error is returned. /// - /// These have priority over the “unspendable†utxos, meaning that if a utxo is present both in the “utxos†and the “unspendable†list, it will be spent. - TxBuilder addUtxos(List outpoints) { + /// These have priority over the "unspendable" utxos, meaning that if a utxo is present both in the "utxos" and the "unspendable" list, it will be spent. + TxBuilder addUtxos(List outpoints) { for (var e in outpoints) { _utxos.add(e); } @@ -937,23 +953,23 @@ class TxBuilder { /// outpoint: To add it to the raw transaction. /// psbt_input: To know the value. /// satisfaction_weight: To know how much weight/vbytes the input will add to the transaction for fee calculation. - /// There are several security concerns about adding foreign UTXOs that application developers should consider. First, how do you know the value of the input is correct? If a non_witness_utxo is provided in the psbt_input then this method implicitly verifies the value by checking it against the transaction. If only a witness_utxo is provided then this method doesn’t verify the value but just takes it as a given – it is up to you to check that whoever sent you the input_psbt was not lying! + /// There are several security concerns about adding foreign UTXOs that application developers should consider. First, how do you know the value of the input is correct? If a non_witness_utxo is provided in the psbt_input then this method implicitly verifies the value by checking it against the transaction. If only a witness_utxo is provided then this method doesn't verify the value but just takes it as a given – it is up to you to check that whoever sent you the input_psbt was not lying! /// /// Secondly, you must somehow provide satisfaction_weight of the input. Depending on your application it may be important that this be known precisely.If not, /// a malicious counterparty may fool you into putting in a value that is too low, giving the transaction a lower than expected feerate. They could also fool /// you into putting a value that is too high causing you to pay a fee that is too high. The party who is broadcasting the transaction can of course check the /// real input weight matches the expected weight prior to broadcasting. - TxBuilder addForeignUtxo( - Input psbtInput, OutPoint outPoint, BigInt satisfactionWeight) { + TxBuilder addForeignUtxo(types.Input psbtInput, types.OutPoint outPoint, + BigInt satisfactionWeight) { _foreignUtxo = (outPoint, psbtInput, satisfactionWeight); return this; } ///Do not spend change outputs /// - /// This effectively adds all the change outputs to the “unspendable†list. See TxBuilder().addUtxos + /// This effectively adds all the change outputs to the "unspendable" list. See TxBuilder().addUtxos TxBuilder doNotSpendChange() { - _changeSpendPolicy = ChangeSpendPolicy.changeForbidden; + _changeSpendPolicy = types.ChangeSpendPolicy.changeForbidden; return this; } @@ -980,11 +996,11 @@ class TxBuilder { ///Enable signaling RBF with a specific nSequence value /// - /// This can cause conflicts if the wallet’s descriptors contain an “older†(OP_CSV) operator and the given nsequence is lower than the CSV value. + /// This can cause conflicts if the wallet's descriptors contain an "older" (OP_CSV) operator and the given nsequence is lower than the CSV value. /// ///If the nsequence is higher than 0xFFFFFFFD an error will be thrown, since it would not be a valid nSequence to signal RBF. TxBuilder enableRbfWithSequence(int nSequence) { - _rbfValue = RbfValue.value(nSequence); + _rbfValue = types.RbfValue.value(nSequence); return this; } @@ -992,7 +1008,7 @@ class TxBuilder { /// /// This will use the default nSequence value of 0xFFFFFFFD. TxBuilder enableRbf() { - _rbfValue = RbfValue.rbfDefault(); + _rbfValue = types.RbfValue.rbfDefault(); return this; } @@ -1009,9 +1025,9 @@ class TxBuilder { } ///Replace the recipients already added with a new list - TxBuilder setRecipients(List recipients) { - for (var e in _recipients) { - _recipients.add(e); + TxBuilder setRecipients(List<(ScriptBuf script, BigInt amount)> recipients) { + for (var (s, a) in recipients) { + _recipients.add(types.ScriptAmount(amount: a, script: s)); } return this; } @@ -1026,21 +1042,22 @@ class TxBuilder { ///Add a utxo to the internal list of unspendable utxos /// - /// It’s important to note that the “must-be-spent†utxos added with TxBuilder().addUtxo + /// It's important to note that the "must-be-spent" utxos added with TxBuilder().addUtxo /// have priority over this. See the docs of the two linked methods for more details. - TxBuilder addUnSpendable(OutPoint unSpendable) { + TxBuilder addUnSpendable(types.OutPoint unSpendable) { _unSpendable.add(unSpendable); return this; } ///Set the policy path to use while creating the transaction for a given keychain. ///This method accepts a map where the key is the policy node id (see policy.id()) and the value is the list of the indexes of the items that are intended to be satisfied from the policy node (see SatisfiableItem.Thresh.items). - TxBuilder policyPath(KeychainKind keychain, Map path) { + TxBuilder policyPath( + types.KeychainKind keychain, Map path) { switch (keychain) { - case KeychainKind.externalChain: + case types.KeychainKind.externalChain: _externalPolicyPath = path; break; - case KeychainKind.internalChain: + case types.KeychainKind.internalChain: _internalPolicyPath = path; break; } @@ -1049,9 +1066,9 @@ class TxBuilder { ///Only spend change outputs /// - /// This effectively adds all the non-change outputs to the “unspendable†list. + /// This effectively adds all the non-change outputs to the "unspendable" list. TxBuilder onlySpendChange() { - _changeSpendPolicy = ChangeSpendPolicy.onlyChange; + _changeSpendPolicy = types.ChangeSpendPolicy.onlyChange; return this; } @@ -1082,7 +1099,17 @@ class TxBuilder { data: _data, changePolicy: _changeSpendPolicy); - return (PartiallySignedTransaction._(ptr: res.$1.ptr), res.$2); + return ( + PartiallySignedTransaction._(ptr: res.$1.ptr), + TransactionDetails( + transaction: (res.$2.transaction?.s == null) + ? null + : Transaction._(s: res.$2.transaction!.s), + txid: res.$2.txid, + received: res.$2.received, + sent: res.$2.sent, + confirmationTime: res.$2.confirmationTime) + ); } on BdkError catch (e) { throw mapBdkError(e); } @@ -1104,8 +1131,8 @@ class Wallet extends BdkWallet { static Future create({ required Descriptor descriptor, Descriptor? changeDescriptor, - required Network network, - required DatabaseConfig databaseConfig, + required types.Network network, + required types.DatabaseConfig databaseConfig, }) async { try { await Api.initialize(); @@ -1124,7 +1151,7 @@ class Wallet extends BdkWallet { /// Return a derived address using the external descriptor, see AddressIndex for available address index selection /// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) /// then the same address will always be returned for any AddressIndex. - AddressInfo getAddress({required AddressIndex addressIndex, hint}) { + AddressInfo getAddress({required types.AddressIndex addressIndex, hint}) { try { final res = BdkWallet.getAddress(ptr: this, addressIndex: addressIndex); return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); @@ -1136,7 +1163,7 @@ class Wallet extends BdkWallet { /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates /// on the internal database, which first needs to be Wallet.sync manually. @override - Balance getBalance({hint}) { + types.Balance getBalance({hint}) { try { return super.getBalance(); } on BdkError catch (e) { @@ -1146,7 +1173,7 @@ class Wallet extends BdkWallet { ///Returns the descriptor used to create addresses for a particular keychain. Future getDescriptorForKeychain( - {required KeychainKind keychain, hint}) async { + {required types.KeychainKind keychain, hint}) async { try { final res = BdkWallet.getDescriptorForKeychain(ptr: this, keychain: keychain); @@ -1165,7 +1192,8 @@ class Wallet extends BdkWallet { /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always /// be returned for any [AddressIndex]. - AddressInfo getInternalAddress({required AddressIndex addressIndex, hint}) { + AddressInfo getInternalAddress( + {required types.AddressIndex addressIndex, hint}) { try { final res = BdkWallet.getInternalAddress(ptr: this, addressIndex: addressIndex); @@ -1177,10 +1205,10 @@ class Wallet extends BdkWallet { ///get the corresponding PSBT Input for a LocalUtxo @override - Future getPsbtInput( - {required LocalUtxo utxo, + Future getPsbtInput( + {required types.LocalUtxo utxo, required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType, + types.PsbtSigHashType? sighashType, hint}) async { try { return super.getPsbtInput( @@ -1193,10 +1221,9 @@ class Wallet extends BdkWallet { } /// Return whether or not a script is part of this wallet (either internal or external). - @override - bool isMine({required BdkScriptBuf script, hint}) { + bool isMine({required ScriptBuf script}) { try { - return super.isMine(script: script); + return BdkWallet.isMine(ptr: this, script: script); } on BdkError catch (e) { throw mapBdkError(e); } @@ -1206,7 +1233,17 @@ class Wallet extends BdkWallet { @override List listTransactions({required bool includeRaw, hint}) { try { - return super.listTransactions(includeRaw: includeRaw); + return super + .listTransactions(includeRaw: includeRaw) + .map((e) => TransactionDetails( + transaction: (e.transaction?.s == null) + ? null + : Transaction._(s: e.transaction!.s), + txid: e.txid, + received: e.received, + sent: e.sent, + confirmationTime: e.confirmationTime)) + .toList(); } on BdkError catch (e) { throw mapBdkError(e); } @@ -1216,7 +1253,7 @@ class Wallet extends BdkWallet { /// which first needs to be Wallet.sync manually. /// TODO; Update; create custom LocalUtxo @override - List listUnspent({hint}) { + List listUnspent({hint}) { try { return super.listUnspent(); } on BdkError catch (e) { @@ -1226,7 +1263,7 @@ class Wallet extends BdkWallet { /// Get the Bitcoin network the wallet is using. @override - Network network({hint}) { + types.Network network({hint}) { try { return super.network(); } on BdkError catch (e) { @@ -1243,7 +1280,7 @@ class Wallet extends BdkWallet { /// in this library will. Future sign( {required PartiallySignedTransaction psbt, - SignOptions? signOptions, + types.SignOptions? signOptions, hint}) async { try { final res = @@ -1266,7 +1303,7 @@ class Wallet extends BdkWallet { } ///Return the spending policies for the wallet's descriptor - Policy? policies(KeychainKind keychain) { + Policy? policies(types.KeychainKind keychain) { try { final res = BdkWallet.policies(ptr: this, keychain: keychain); if (res == null) return null; @@ -1304,3 +1341,29 @@ class AddressInfo { AddressInfo(this.index, this.address); } + +class TxIn extends types.TxIn { + TxIn( + {required super.previousOutput, + required ScriptBuf scriptSig, + required super.sequence, + required super.witness}) + : super(scriptSig: scriptSig); +} + +///A transaction output, which defines new coins to be created from old ones. +class TxOut extends types.TxOut { + TxOut({required super.value, required ScriptBuf scriptPubkey}) + : super(scriptPubkey: scriptPubkey); +} + +class TransactionDetails extends types.TransactionDetails { + TransactionDetails( + {Transaction? transaction, + required super.txid, + required super.received, + required super.sent, + super.confirmationTime, + super.fee}) + : super(transaction: transaction); +} diff --git a/macos/Classes/frb_generated.h b/macos/Classes/frb_generated.h index 5c3e0c91..2430b240 100644 --- a/macos/Classes/frb_generated.h +++ b/macos/Classes/frb_generated.h @@ -906,7 +906,7 @@ typedef struct wire_cst_satisfiable_item { } wire_cst_satisfiable_item; void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast(int64_t port_, - struct wire_cst_bdk_blockchain *that, + struct wire_cst_bdk_blockchain *ptr, struct wire_cst_bdk_transaction *transaction); void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create(int64_t port_, @@ -1153,7 +1153,7 @@ void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(int6 bool only_witness_utxo, struct wire_cst_psbt_sig_hash_type *sighash_type); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *that, +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *ptr, struct wire_cst_bdk_script_buf *script); WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions(struct wire_cst_bdk_wallet *that, diff --git a/macos/bdk_flutter.podspec b/macos/bdk_flutter.podspec index c1ff53ea..5e88ecd3 100644 --- a/macos/bdk_flutter.podspec +++ b/macos/bdk_flutter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'bdk_flutter' - s.version = "0.31.2" + s.version = "0.31.3" s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' s.description = <<-DESC A new Flutter plugin project. diff --git a/pubspec.lock b/pubspec.lock index 6902f64e..1d3c7320 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -197,10 +197,10 @@ packages: dependency: "direct main" description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" ffigen: dependency: "direct dev" description: @@ -255,10 +255,10 @@ packages: dependency: "direct main" description: name: freezed_annotation - sha256: f54946fdb1fa7b01f780841937b1a80783a20b393485f3f6cdf336fd6f4705f2 + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.4" frontend_server_client: dependency: transitive description: @@ -351,10 +351,10 @@ packages: dependency: "direct dev" description: name: lints - sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" logging: dependency: transitive description: @@ -488,14 +488,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" stack_trace: dependency: transitive description: @@ -560,14 +552,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" - uuid: - dependency: "direct main" - description: - name: uuid - sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" - url: "https://pub.dev" - source: hosted - version: "4.4.0" vector_math: dependency: transitive description: @@ -633,5 +617,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.5.0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.yaml b/pubspec.yaml index 04a0e4c8..f2c2ee14 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: bdk_flutter description: A Flutter library for the Bitcoin Development Kit(bdk) (https://bitcoindevkit.org/) -version: 0.31.2 +version: 0.31.3 homepage: https://github.com/LtbLightning/bdk-flutter environment: @@ -11,12 +11,11 @@ dependencies: flutter: sdk: flutter flutter_rust_bridge: ">=2.0.0 < 2.1.0" - ffi: ^2.0.1 - freezed_annotation: ^2.2.0 - mockito: ^5.4.0 - meta: ^1.10.0 - uuid: ^4.2.2 + ffi: ^2.1.3 + freezed_annotation: ^2.4.4 + mockito: ^5.4.4 collection: ^1.18.0 + meta: ^1.15.0 dev_dependencies: flutter_test: @@ -24,7 +23,7 @@ dev_dependencies: ffigen: ^12.0.0 freezed: ^2.5.2 build_runner: ^2.4.8 - lints: ^4.0.0 + lints: ^5.0.0 flutter: plugin: @@ -34,4 +33,4 @@ flutter: ios: ffiPlugin: true macos: - ffiPlugin: true \ No newline at end of file + ffiPlugin: true diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 845c186e..4e3fbdf7 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -185,7 +185,7 @@ dependencies = [ [[package]] name = "bdk_flutter" -version = "0.31.2" +version = "0.31.3" dependencies = [ "anyhow", "assert_matches", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 00455be6..c8372212 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdk_flutter" -version = "0.31.2" +version = "0.31.3" edition = "2021" [lib] @@ -11,7 +11,12 @@ anyhow = "1.0.68" [dependencies] flutter_rust_bridge = "=2.0.0" rand = "0.8" -bdk = { version = "0.29.0", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] } +bdk = { version = "0.29.0", features = [ + "all-keys", + "use-esplora-ureq", + "sqlite-bundled", + "rpc", +] } serde = "1.0.89" serde_json = "1.0.96" anyhow = "1.0.68" @@ -22,5 +27,3 @@ opt-level = 3 lto = true codegen-units = 1 panic = "abort" - - diff --git a/rust/src/api/blockchain.rs b/rust/src/api/blockchain.rs index ea297051..c27bef2f 100644 --- a/rust/src/api/blockchain.rs +++ b/rust/src/api/blockchain.rs @@ -62,9 +62,9 @@ impl BdkBlockchain { pub(crate) fn get_blockchain(&self) -> RustOpaque { self.ptr.clone() } - pub fn broadcast(&self, transaction: &BdkTransaction) -> Result { + pub fn broadcast(ptr: BdkBlockchain, transaction: &BdkTransaction) -> Result { let tx: Transaction = transaction.try_into()?; - self.get_blockchain().broadcast(&tx)?; + ptr.get_blockchain().broadcast(&tx)?; Ok(tx.txid().to_string()) } diff --git a/rust/src/api/wallet.rs b/rust/src/api/wallet.rs index 46e37649..dcbcf2c5 100644 --- a/rust/src/api/wallet.rs +++ b/rust/src/api/wallet.rs @@ -54,8 +54,8 @@ impl BdkWallet { execute_with_lock(&self.ptr, |w| w.network().into()) } #[frb(sync)] - pub fn is_mine(&self, script: BdkScriptBuf) -> Result { - execute_with_lock(&self.ptr, |w| { + pub fn is_mine(ptr: BdkWallet, script: BdkScriptBuf) -> Result { + execute_with_lock(&ptr.ptr, |w| { w.is_mine(>::into(script).as_script()) .map_err(|e| e.into()) })? diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs index 7224d72f..e823f8d2 100644 --- a/rust/src/frb_generated.io.rs +++ b/rust/src/frb_generated.io.rs @@ -2256,10 +2256,10 @@ impl Default for wire_cst_tx_out { #[no_mangle] pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast( port_: i64, - that: *mut wire_cst_bdk_blockchain, + ptr: *mut wire_cst_bdk_blockchain, transaction: *mut wire_cst_bdk_transaction, ) { - wire__crate__api__blockchain__bdk_blockchain_broadcast_impl(port_, that, transaction) + wire__crate__api__blockchain__bdk_blockchain_broadcast_impl(port_, ptr, transaction) } #[no_mangle] @@ -2953,10 +2953,10 @@ pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_ps #[no_mangle] pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine( - that: *mut wire_cst_bdk_wallet, + ptr: *mut wire_cst_bdk_wallet, script: *mut wire_cst_bdk_script_buf, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_is_mine_impl(that, script) + wire__crate__api__wallet__bdk_wallet_is_mine_impl(ptr, script) } #[no_mangle] diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 65c12a4d..cfe6c5e3 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -48,7 +48,7 @@ flutter_rust_bridge::frb_generated_default_handler!(); fn wire__crate__api__blockchain__bdk_blockchain_broadcast_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + ptr: impl CstDecode, transaction: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( @@ -58,12 +58,12 @@ fn wire__crate__api__blockchain__bdk_blockchain_broadcast_impl( mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_ptr = ptr.cst_decode(); let api_transaction = transaction.cst_decode(); move |context| { transform_result_dco::<_, _, crate::api::error::BdkError>((move || { let output_ok = crate::api::blockchain::BdkBlockchain::broadcast( - &api_that, + api_ptr, &api_transaction, )?; Ok(output_ok) @@ -1809,7 +1809,7 @@ fn wire__crate__api__wallet__bdk_wallet_get_psbt_input_impl( ) } fn wire__crate__api__wallet__bdk_wallet_is_mine_impl( - that: impl CstDecode, + ptr: impl CstDecode, script: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( @@ -1819,10 +1819,10 @@ fn wire__crate__api__wallet__bdk_wallet_is_mine_impl( mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_that = that.cst_decode(); + let api_ptr = ptr.cst_decode(); let api_script = script.cst_decode(); transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::is_mine(&api_that, api_script)?; + let output_ok = crate::api::wallet::BdkWallet::is_mine(api_ptr, api_script)?; Ok(output_ok) })()) }, diff --git a/test/bdk_flutter_test.mocks.dart b/test/bdk_flutter_test.mocks.dart index 3b01c830..86e43303 100644 --- a/test/bdk_flutter_test.mocks.dart +++ b/test/bdk_flutter_test.mocks.dart @@ -3,12 +3,12 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i4; +import 'dart:async' as _i5; import 'dart:typed_data' as _i7; -import 'package:bdk_flutter/bdk_flutter.dart' as _i3; -import 'package:bdk_flutter/src/generated/api/types.dart' as _i5; +import 'package:bdk_flutter/src/generated/api/types.dart' as _i4; import 'package:bdk_flutter/src/generated/lib.dart' as _i2; +import 'package:bdk_flutter/src/root.dart' as _i3; import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/src/dummies.dart' as _i6; @@ -46,7 +46,7 @@ class _FakeAddressInfo_1 extends _i1.SmartFake implements _i3.AddressInfo { ); } -class _FakeBalance_2 extends _i1.SmartFake implements _i3.Balance { +class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { _FakeBalance_2( Object parent, Invocation parentInvocation, @@ -66,7 +66,7 @@ class _FakeDescriptor_3 extends _i1.SmartFake implements _i3.Descriptor { ); } -class _FakeInput_4 extends _i1.SmartFake implements _i3.Input { +class _FakeInput_4 extends _i1.SmartFake implements _i4.Input { _FakeInput_4( Object parent, Invocation parentInvocation, @@ -86,7 +86,7 @@ class _FakeAnyBlockchain_5 extends _i1.SmartFake implements _i2.AnyBlockchain { ); } -class _FakeFeeRate_6 extends _i1.SmartFake implements _i3.FeeRate { +class _FakeFeeRate_6 extends _i1.SmartFake implements _i4.FeeRate { _FakeFeeRate_6( Object parent, Invocation parentInvocation, @@ -235,7 +235,7 @@ class _FakeDerivationPath_19 extends _i1.SmartFake ); } -class _FakeOutPoint_20 extends _i1.SmartFake implements _i3.OutPoint { +class _FakeOutPoint_20 extends _i1.SmartFake implements _i4.OutPoint { _FakeOutPoint_20( Object parent, Invocation parentInvocation, @@ -245,7 +245,7 @@ class _FakeOutPoint_20 extends _i1.SmartFake implements _i3.OutPoint { ); } -class _FakeTxOut_21 extends _i1.SmartFake implements _i3.TxOut { +class _FakeTxOut_21 extends _i1.SmartFake implements _i4.TxOut { _FakeTxOut_21( Object parent, Invocation parentInvocation, @@ -274,7 +274,7 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { @override _i3.AddressInfo getAddress({ - required _i3.AddressIndex? addressIndex, + required _i4.AddressIndex? addressIndex, dynamic hint, }) => (super.noSuchMethod( @@ -311,7 +311,7 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { ) as _i3.AddressInfo); @override - _i3.Balance getBalance({dynamic hint}) => (super.noSuchMethod( + _i4.Balance getBalance({dynamic hint}) => (super.noSuchMethod( Invocation.method( #getBalance, [], @@ -333,11 +333,11 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { {#hint: hint}, ), ), - ) as _i3.Balance); + ) as _i4.Balance); @override - _i4.Future<_i3.Descriptor> getDescriptorForKeychain({ - required _i3.KeychainKind? keychain, + _i5.Future<_i3.Descriptor> getDescriptorForKeychain({ + required _i4.KeychainKind? keychain, dynamic hint, }) => (super.noSuchMethod( @@ -349,7 +349,7 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { #hint: hint, }, ), - returnValue: _i4.Future<_i3.Descriptor>.value(_FakeDescriptor_3( + returnValue: _i5.Future<_i3.Descriptor>.value(_FakeDescriptor_3( this, Invocation.method( #getDescriptorForKeychain, @@ -361,7 +361,7 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { ), )), returnValueForMissingStub: - _i4.Future<_i3.Descriptor>.value(_FakeDescriptor_3( + _i5.Future<_i3.Descriptor>.value(_FakeDescriptor_3( this, Invocation.method( #getDescriptorForKeychain, @@ -372,11 +372,11 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { }, ), )), - ) as _i4.Future<_i3.Descriptor>); + ) as _i5.Future<_i3.Descriptor>); @override _i3.AddressInfo getInternalAddress({ - required _i3.AddressIndex? addressIndex, + required _i4.AddressIndex? addressIndex, dynamic hint, }) => (super.noSuchMethod( @@ -413,10 +413,10 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { ) as _i3.AddressInfo); @override - _i4.Future<_i3.Input> getPsbtInput({ - required _i3.LocalUtxo? utxo, + _i5.Future<_i4.Input> getPsbtInput({ + required _i4.LocalUtxo? utxo, required bool? onlyWitnessUtxo, - _i3.PsbtSigHashType? sighashType, + _i4.PsbtSigHashType? sighashType, dynamic hint, }) => (super.noSuchMethod( @@ -430,7 +430,7 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { #hint: hint, }, ), - returnValue: _i4.Future<_i3.Input>.value(_FakeInput_4( + returnValue: _i5.Future<_i4.Input>.value(_FakeInput_4( this, Invocation.method( #getPsbtInput, @@ -443,7 +443,7 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { }, ), )), - returnValueForMissingStub: _i4.Future<_i3.Input>.value(_FakeInput_4( + returnValueForMissingStub: _i5.Future<_i4.Input>.value(_FakeInput_4( this, Invocation.method( #getPsbtInput, @@ -456,21 +456,14 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { }, ), )), - ) as _i4.Future<_i3.Input>); + ) as _i5.Future<_i4.Input>); @override - bool isMine({ - required _i5.BdkScriptBuf? script, - dynamic hint, - }) => - (super.noSuchMethod( + bool isMine({required _i3.ScriptBuf? script}) => (super.noSuchMethod( Invocation.method( #isMine, [], - { - #script: script, - #hint: hint, - }, + {#script: script}, ), returnValue: false, returnValueForMissingStub: false, @@ -495,31 +488,31 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { ) as List<_i3.TransactionDetails>); @override - List<_i3.LocalUtxo> listUnspent({dynamic hint}) => (super.noSuchMethod( + List<_i4.LocalUtxo> listUnspent({dynamic hint}) => (super.noSuchMethod( Invocation.method( #listUnspent, [], {#hint: hint}, ), - returnValue: <_i3.LocalUtxo>[], - returnValueForMissingStub: <_i3.LocalUtxo>[], - ) as List<_i3.LocalUtxo>); + returnValue: <_i4.LocalUtxo>[], + returnValueForMissingStub: <_i4.LocalUtxo>[], + ) as List<_i4.LocalUtxo>); @override - _i3.Network network({dynamic hint}) => (super.noSuchMethod( + _i4.Network network({dynamic hint}) => (super.noSuchMethod( Invocation.method( #network, [], {#hint: hint}, ), - returnValue: _i3.Network.testnet, - returnValueForMissingStub: _i3.Network.testnet, - ) as _i3.Network); + returnValue: _i4.Network.testnet, + returnValueForMissingStub: _i4.Network.testnet, + ) as _i4.Network); @override - _i4.Future sign({ + _i5.Future sign({ required _i3.PartiallySignedTransaction? psbt, - _i3.SignOptions? signOptions, + _i4.SignOptions? signOptions, dynamic hint, }) => (super.noSuchMethod( @@ -532,12 +525,12 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { #hint: hint, }, ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); @override - _i4.Future sync({ + _i5.Future sync({ required _i3.Blockchain? blockchain, dynamic hint, }) => @@ -550,12 +543,12 @@ class MockWallet extends _i1.Mock implements _i3.Wallet { #hint: hint, }, ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override - _i3.Policy? policies(_i3.KeychainKind? keychain) => (super.noSuchMethod( + _i3.Policy? policies(_i4.KeychainKind? keychain) => (super.noSuchMethod( Invocation.method( #policies, [keychain], @@ -582,54 +575,54 @@ class MockTransaction extends _i1.Mock implements _i3.Transaction { ) as String); @override - _i4.Future> input() => (super.noSuchMethod( + _i5.Future> input() => (super.noSuchMethod( Invocation.method( #input, [], ), - returnValue: _i4.Future>.value(<_i3.TxIn>[]), + returnValue: _i5.Future>.value(<_i4.TxIn>[]), returnValueForMissingStub: - _i4.Future>.value(<_i3.TxIn>[]), - ) as _i4.Future>); + _i5.Future>.value(<_i4.TxIn>[]), + ) as _i5.Future>); @override - _i4.Future isCoinBase() => (super.noSuchMethod( + _i5.Future isCoinBase() => (super.noSuchMethod( Invocation.method( #isCoinBase, [], ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); @override - _i4.Future isExplicitlyRbf() => (super.noSuchMethod( + _i5.Future isExplicitlyRbf() => (super.noSuchMethod( Invocation.method( #isExplicitlyRbf, [], ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); @override - _i4.Future isLockTimeEnabled() => (super.noSuchMethod( + _i5.Future isLockTimeEnabled() => (super.noSuchMethod( Invocation.method( #isLockTimeEnabled, [], ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); @override - _i4.Future<_i3.LockTime> lockTime() => (super.noSuchMethod( + _i5.Future<_i4.LockTime> lockTime() => (super.noSuchMethod( Invocation.method( #lockTime, [], ), returnValue: - _i4.Future<_i3.LockTime>.value(_i6.dummyValue<_i3.LockTime>( + _i5.Future<_i4.LockTime>.value(_i6.dummyValue<_i4.LockTime>( this, Invocation.method( #lockTime, @@ -637,44 +630,44 @@ class MockTransaction extends _i1.Mock implements _i3.Transaction { ), )), returnValueForMissingStub: - _i4.Future<_i3.LockTime>.value(_i6.dummyValue<_i3.LockTime>( + _i5.Future<_i4.LockTime>.value(_i6.dummyValue<_i4.LockTime>( this, Invocation.method( #lockTime, [], ), )), - ) as _i4.Future<_i3.LockTime>); + ) as _i5.Future<_i4.LockTime>); @override - _i4.Future> output() => (super.noSuchMethod( + _i5.Future> output() => (super.noSuchMethod( Invocation.method( #output, [], ), - returnValue: _i4.Future>.value(<_i3.TxOut>[]), + returnValue: _i5.Future>.value(<_i4.TxOut>[]), returnValueForMissingStub: - _i4.Future>.value(<_i3.TxOut>[]), - ) as _i4.Future>); + _i5.Future>.value(<_i4.TxOut>[]), + ) as _i5.Future>); @override - _i4.Future<_i7.Uint8List> serialize() => (super.noSuchMethod( + _i5.Future<_i7.Uint8List> serialize() => (super.noSuchMethod( Invocation.method( #serialize, [], ), - returnValue: _i4.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), + returnValue: _i5.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), returnValueForMissingStub: - _i4.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - ) as _i4.Future<_i7.Uint8List>); + _i5.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), + ) as _i5.Future<_i7.Uint8List>); @override - _i4.Future size() => (super.noSuchMethod( + _i5.Future size() => (super.noSuchMethod( Invocation.method( #size, [], ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i5.Future.value(_i6.dummyValue( this, Invocation.method( #size, @@ -682,22 +675,22 @@ class MockTransaction extends _i1.Mock implements _i3.Transaction { ), )), returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + _i5.Future.value(_i6.dummyValue( this, Invocation.method( #size, [], ), )), - ) as _i4.Future); + ) as _i5.Future); @override - _i4.Future txid() => (super.noSuchMethod( + _i5.Future txid() => (super.noSuchMethod( Invocation.method( #txid, [], ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i5.Future.value(_i6.dummyValue( this, Invocation.method( #txid, @@ -705,32 +698,32 @@ class MockTransaction extends _i1.Mock implements _i3.Transaction { ), )), returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + _i5.Future.value(_i6.dummyValue( this, Invocation.method( #txid, [], ), )), - ) as _i4.Future); + ) as _i5.Future); @override - _i4.Future version() => (super.noSuchMethod( + _i5.Future version() => (super.noSuchMethod( Invocation.method( #version, [], ), - returnValue: _i4.Future.value(0), - returnValueForMissingStub: _i4.Future.value(0), - ) as _i4.Future); + returnValue: _i5.Future.value(0), + returnValueForMissingStub: _i5.Future.value(0), + ) as _i5.Future); @override - _i4.Future vsize() => (super.noSuchMethod( + _i5.Future vsize() => (super.noSuchMethod( Invocation.method( #vsize, [], ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i5.Future.value(_i6.dummyValue( this, Invocation.method( #vsize, @@ -738,22 +731,22 @@ class MockTransaction extends _i1.Mock implements _i3.Transaction { ), )), returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + _i5.Future.value(_i6.dummyValue( this, Invocation.method( #vsize, [], ), )), - ) as _i4.Future); + ) as _i5.Future); @override - _i4.Future weight() => (super.noSuchMethod( + _i5.Future weight() => (super.noSuchMethod( Invocation.method( #weight, [], ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i5.Future.value(_i6.dummyValue( this, Invocation.method( #weight, @@ -761,14 +754,14 @@ class MockTransaction extends _i1.Mock implements _i3.Transaction { ), )), returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + _i5.Future.value(_i6.dummyValue( this, Invocation.method( #weight, [], ), )), - ) as _i4.Future); + ) as _i5.Future); } /// A class which mocks [Blockchain]. @@ -789,7 +782,7 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { ) as _i2.AnyBlockchain); @override - _i4.Future<_i3.FeeRate> estimateFee({ + _i5.Future<_i4.FeeRate> estimateFee({ required BigInt? target, dynamic hint, }) => @@ -802,7 +795,7 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { #hint: hint, }, ), - returnValue: _i4.Future<_i3.FeeRate>.value(_FakeFeeRate_6( + returnValue: _i5.Future<_i4.FeeRate>.value(_FakeFeeRate_6( this, Invocation.method( #estimateFee, @@ -813,7 +806,7 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { }, ), )), - returnValueForMissingStub: _i4.Future<_i3.FeeRate>.value(_FakeFeeRate_6( + returnValueForMissingStub: _i5.Future<_i4.FeeRate>.value(_FakeFeeRate_6( this, Invocation.method( #estimateFee, @@ -824,11 +817,11 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { }, ), )), - ) as _i4.Future<_i3.FeeRate>); + ) as _i5.Future<_i4.FeeRate>); @override - _i4.Future broadcast({ - required _i5.BdkTransaction? transaction, + _i5.Future broadcast({ + required _i3.Transaction? transaction, dynamic hint, }) => (super.noSuchMethod( @@ -840,7 +833,7 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { #hint: hint, }, ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i5.Future.value(_i6.dummyValue( this, Invocation.method( #broadcast, @@ -852,7 +845,7 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { ), )), returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + _i5.Future.value(_i6.dummyValue( this, Invocation.method( #broadcast, @@ -863,10 +856,10 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { }, ), )), - ) as _i4.Future); + ) as _i5.Future); @override - _i4.Future getBlockHash({ + _i5.Future getBlockHash({ required int? height, dynamic hint, }) => @@ -879,7 +872,7 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { #hint: hint, }, ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i5.Future.value(_i6.dummyValue( this, Invocation.method( #getBlockHash, @@ -891,7 +884,7 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { ), )), returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + _i5.Future.value(_i6.dummyValue( this, Invocation.method( #getBlockHash, @@ -902,18 +895,18 @@ class MockBlockchain extends _i1.Mock implements _i3.Blockchain { }, ), )), - ) as _i4.Future); + ) as _i5.Future); @override - _i4.Future getHeight({dynamic hint}) => (super.noSuchMethod( + _i5.Future getHeight({dynamic hint}) => (super.noSuchMethod( Invocation.method( #getHeight, [], {#hint: hint}, ), - returnValue: _i4.Future.value(0), - returnValueForMissingStub: _i4.Future.value(0), - ) as _i4.Future); + returnValue: _i5.Future.value(0), + returnValueForMissingStub: _i5.Future.value(0), + ) as _i5.Future); } /// A class which mocks [DescriptorSecretKey]. @@ -935,13 +928,13 @@ class MockDescriptorSecretKey extends _i1.Mock ) as _i2.DescriptorSecretKey); @override - _i4.Future<_i3.DescriptorSecretKey> derive(_i3.DerivationPath? path) => + _i5.Future<_i3.DescriptorSecretKey> derive(_i3.DerivationPath? path) => (super.noSuchMethod( Invocation.method( #derive, [path], ), - returnValue: _i4.Future<_i3.DescriptorSecretKey>.value( + returnValue: _i5.Future<_i3.DescriptorSecretKey>.value( _FakeDescriptorSecretKey_8( this, Invocation.method( @@ -949,7 +942,7 @@ class MockDescriptorSecretKey extends _i1.Mock [path], ), )), - returnValueForMissingStub: _i4.Future<_i3.DescriptorSecretKey>.value( + returnValueForMissingStub: _i5.Future<_i3.DescriptorSecretKey>.value( _FakeDescriptorSecretKey_8( this, Invocation.method( @@ -957,16 +950,16 @@ class MockDescriptorSecretKey extends _i1.Mock [path], ), )), - ) as _i4.Future<_i3.DescriptorSecretKey>); + ) as _i5.Future<_i3.DescriptorSecretKey>); @override - _i4.Future<_i3.DescriptorSecretKey> extend(_i3.DerivationPath? path) => + _i5.Future<_i3.DescriptorSecretKey> extend(_i3.DerivationPath? path) => (super.noSuchMethod( Invocation.method( #extend, [path], ), - returnValue: _i4.Future<_i3.DescriptorSecretKey>.value( + returnValue: _i5.Future<_i3.DescriptorSecretKey>.value( _FakeDescriptorSecretKey_8( this, Invocation.method( @@ -974,7 +967,7 @@ class MockDescriptorSecretKey extends _i1.Mock [path], ), )), - returnValueForMissingStub: _i4.Future<_i3.DescriptorSecretKey>.value( + returnValueForMissingStub: _i5.Future<_i3.DescriptorSecretKey>.value( _FakeDescriptorSecretKey_8( this, Invocation.method( @@ -982,7 +975,7 @@ class MockDescriptorSecretKey extends _i1.Mock [path], ), )), - ) as _i4.Future<_i3.DescriptorSecretKey>); + ) as _i5.Future<_i3.DescriptorSecretKey>); @override _i3.DescriptorPublicKey toPublic() => (super.noSuchMethod( @@ -1059,7 +1052,7 @@ class MockDescriptorPublicKey extends _i1.Mock ) as _i2.DescriptorPublicKey); @override - _i4.Future<_i3.DescriptorPublicKey> derive({ + _i5.Future<_i3.DescriptorPublicKey> derive({ required _i3.DerivationPath? path, dynamic hint, }) => @@ -1072,7 +1065,7 @@ class MockDescriptorPublicKey extends _i1.Mock #hint: hint, }, ), - returnValue: _i4.Future<_i3.DescriptorPublicKey>.value( + returnValue: _i5.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -1084,7 +1077,7 @@ class MockDescriptorPublicKey extends _i1.Mock }, ), )), - returnValueForMissingStub: _i4.Future<_i3.DescriptorPublicKey>.value( + returnValueForMissingStub: _i5.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -1096,10 +1089,10 @@ class MockDescriptorPublicKey extends _i1.Mock }, ), )), - ) as _i4.Future<_i3.DescriptorPublicKey>); + ) as _i5.Future<_i3.DescriptorPublicKey>); @override - _i4.Future<_i3.DescriptorPublicKey> extend({ + _i5.Future<_i3.DescriptorPublicKey> extend({ required _i3.DerivationPath? path, dynamic hint, }) => @@ -1112,7 +1105,7 @@ class MockDescriptorPublicKey extends _i1.Mock #hint: hint, }, ), - returnValue: _i4.Future<_i3.DescriptorPublicKey>.value( + returnValue: _i5.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -1124,7 +1117,7 @@ class MockDescriptorPublicKey extends _i1.Mock }, ), )), - returnValueForMissingStub: _i4.Future<_i3.DescriptorPublicKey>.value( + returnValueForMissingStub: _i5.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -1136,7 +1129,7 @@ class MockDescriptorPublicKey extends _i1.Mock }, ), )), - ) as _i4.Future<_i3.DescriptorPublicKey>); + ) as _i5.Future<_i3.DescriptorPublicKey>); @override String asString() => (super.noSuchMethod( @@ -1238,14 +1231,14 @@ class MockPartiallySignedTransaction extends _i1.Mock ) as _i3.Transaction); @override - _i4.Future<_i3.PartiallySignedTransaction> combine( + _i5.Future<_i3.PartiallySignedTransaction> combine( _i3.PartiallySignedTransaction? other) => (super.noSuchMethod( Invocation.method( #combine, [other], ), - returnValue: _i4.Future<_i3.PartiallySignedTransaction>.value( + returnValue: _i5.Future<_i3.PartiallySignedTransaction>.value( _FakePartiallySignedTransaction_13( this, Invocation.method( @@ -1254,7 +1247,7 @@ class MockPartiallySignedTransaction extends _i1.Mock ), )), returnValueForMissingStub: - _i4.Future<_i3.PartiallySignedTransaction>.value( + _i5.Future<_i3.PartiallySignedTransaction>.value( _FakePartiallySignedTransaction_13( this, Invocation.method( @@ -1262,7 +1255,7 @@ class MockPartiallySignedTransaction extends _i1.Mock [other], ), )), - ) as _i4.Future<_i3.PartiallySignedTransaction>); + ) as _i5.Future<_i3.PartiallySignedTransaction>); @override String txid({dynamic hint}) => (super.noSuchMethod( @@ -1377,7 +1370,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ) as _i3.TxBuilder); @override - _i3.TxBuilder unSpendable(List<_i3.OutPoint>? outpoints) => + _i3.TxBuilder unSpendable(List<_i4.OutPoint>? outpoints) => (super.noSuchMethod( Invocation.method( #unSpendable, @@ -1400,7 +1393,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ) as _i3.TxBuilder); @override - _i3.TxBuilder addUtxo(_i3.OutPoint? outpoint) => (super.noSuchMethod( + _i3.TxBuilder addUtxo(_i4.OutPoint? outpoint) => (super.noSuchMethod( Invocation.method( #addUtxo, [outpoint], @@ -1422,7 +1415,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ) as _i3.TxBuilder); @override - _i3.TxBuilder addUtxos(List<_i3.OutPoint>? outpoints) => (super.noSuchMethod( + _i3.TxBuilder addUtxos(List<_i4.OutPoint>? outpoints) => (super.noSuchMethod( Invocation.method( #addUtxos, [outpoints], @@ -1445,8 +1438,8 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { @override _i3.TxBuilder addForeignUtxo( - _i3.Input? psbtInput, - _i3.OutPoint? outPoint, + _i4.Input? psbtInput, + _i4.OutPoint? outPoint, BigInt? satisfactionWeight, ) => (super.noSuchMethod( @@ -1637,7 +1630,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ) as _i3.TxBuilder); @override - _i3.TxBuilder setRecipients(List<_i3.ScriptAmount>? recipients) => + _i3.TxBuilder setRecipients(List<(_i3.ScriptBuf, BigInt)>? recipients) => (super.noSuchMethod( Invocation.method( #setRecipients, @@ -1682,7 +1675,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ) as _i3.TxBuilder); @override - _i3.TxBuilder addUnSpendable(_i3.OutPoint? unSpendable) => + _i3.TxBuilder addUnSpendable(_i4.OutPoint? unSpendable) => (super.noSuchMethod( Invocation.method( #addUnSpendable, @@ -1706,7 +1699,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { @override _i3.TxBuilder policyPath( - _i3.KeychainKind? keychain, + _i4.KeychainKind? keychain, Map? path, ) => (super.noSuchMethod( @@ -1762,14 +1755,14 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ) as _i3.TxBuilder); @override - _i4.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( + _i5.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( _i3.Wallet? wallet) => (super.noSuchMethod( Invocation.method( #finish, [wallet], ), - returnValue: _i4.Future< + returnValue: _i5.Future< (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( _FakePartiallySignedTransaction_13( this, @@ -1786,7 +1779,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ), ) )), - returnValueForMissingStub: _i4.Future< + returnValueForMissingStub: _i5.Future< (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( _FakePartiallySignedTransaction_13( this, @@ -1803,7 +1796,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ), ) )), - ) as _i4 + ) as _i5 .Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)>); } @@ -1900,14 +1893,14 @@ class MockBumpFeeTxBuilder extends _i1.Mock implements _i3.BumpFeeTxBuilder { ) as _i3.BumpFeeTxBuilder); @override - _i4.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( + _i5.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( _i3.Wallet? wallet) => (super.noSuchMethod( Invocation.method( #finish, [wallet], ), - returnValue: _i4.Future< + returnValue: _i5.Future< (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( _FakePartiallySignedTransaction_13( this, @@ -1924,7 +1917,7 @@ class MockBumpFeeTxBuilder extends _i1.Mock implements _i3.BumpFeeTxBuilder { ), ) )), - returnValueForMissingStub: _i4.Future< + returnValueForMissingStub: _i5.Future< (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( _FakePartiallySignedTransaction_13( this, @@ -1941,7 +1934,7 @@ class MockBumpFeeTxBuilder extends _i1.Mock implements _i3.BumpFeeTxBuilder { ), ) )), - ) as _i4 + ) as _i5 .Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)>); } @@ -2041,7 +2034,7 @@ class MockAddress extends _i1.Mock implements _i3.Address { ) as String); @override - bool isValidForNetwork({required _i3.Network? network}) => + bool isValidForNetwork({required _i4.Network? network}) => (super.noSuchMethod( Invocation.method( #isValidForNetwork, @@ -2053,36 +2046,36 @@ class MockAddress extends _i1.Mock implements _i3.Address { ) as bool); @override - _i3.Network network() => (super.noSuchMethod( + _i4.Network network() => (super.noSuchMethod( Invocation.method( #network, [], ), - returnValue: _i3.Network.testnet, - returnValueForMissingStub: _i3.Network.testnet, - ) as _i3.Network); + returnValue: _i4.Network.testnet, + returnValueForMissingStub: _i4.Network.testnet, + ) as _i4.Network); @override - _i3.Payload payload() => (super.noSuchMethod( + _i4.Payload payload() => (super.noSuchMethod( Invocation.method( #payload, [], ), - returnValue: _i6.dummyValue<_i3.Payload>( + returnValue: _i6.dummyValue<_i4.Payload>( this, Invocation.method( #payload, [], ), ), - returnValueForMissingStub: _i6.dummyValue<_i3.Payload>( + returnValueForMissingStub: _i6.dummyValue<_i4.Payload>( this, Invocation.method( #payload, [], ), ), - ) as _i3.Payload); + ) as _i4.Payload); @override String asString() => (super.noSuchMethod( @@ -2150,7 +2143,7 @@ class MockDerivationPath extends _i1.Mock implements _i3.DerivationPath { /// A class which mocks [FeeRate]. /// /// See the documentation for Mockito's code generation for more information. -class MockFeeRate extends _i1.Mock implements _i3.FeeRate { +class MockFeeRate extends _i1.Mock implements _i4.FeeRate { @override double get satPerVb => (super.noSuchMethod( Invocation.getter(#satPerVb), @@ -2162,9 +2155,9 @@ class MockFeeRate extends _i1.Mock implements _i3.FeeRate { /// A class which mocks [LocalUtxo]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocalUtxo extends _i1.Mock implements _i3.LocalUtxo { +class MockLocalUtxo extends _i1.Mock implements _i4.LocalUtxo { @override - _i3.OutPoint get outpoint => (super.noSuchMethod( + _i4.OutPoint get outpoint => (super.noSuchMethod( Invocation.getter(#outpoint), returnValue: _FakeOutPoint_20( this, @@ -2174,10 +2167,10 @@ class MockLocalUtxo extends _i1.Mock implements _i3.LocalUtxo { this, Invocation.getter(#outpoint), ), - ) as _i3.OutPoint); + ) as _i4.OutPoint); @override - _i3.TxOut get txout => (super.noSuchMethod( + _i4.TxOut get txout => (super.noSuchMethod( Invocation.getter(#txout), returnValue: _FakeTxOut_21( this, @@ -2187,14 +2180,14 @@ class MockLocalUtxo extends _i1.Mock implements _i3.LocalUtxo { this, Invocation.getter(#txout), ), - ) as _i3.TxOut); + ) as _i4.TxOut); @override - _i3.KeychainKind get keychain => (super.noSuchMethod( + _i4.KeychainKind get keychain => (super.noSuchMethod( Invocation.getter(#keychain), - returnValue: _i3.KeychainKind.externalChain, - returnValueForMissingStub: _i3.KeychainKind.externalChain, - ) as _i3.KeychainKind); + returnValue: _i4.KeychainKind.externalChain, + returnValueForMissingStub: _i4.KeychainKind.externalChain, + ) as _i4.KeychainKind); @override bool get isSpent => (super.noSuchMethod( From 4dd2cfb79d6e8f45a20039570a42baba8ee476a1 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 4 Dec 2024 16:47:00 -0500 Subject: [PATCH 2/7] Squashed 'cargokit/' content from commit 918f280 --- .github/workflows/check_and_lint.yml | 26 + .github/workflows/precompile_binaries.yml | 54 - .../workflows/test_example_plugin_build.yml | 86 + .gitignore | 40 +- .metadata | 36 - CHANGELOG.md | 179 - LICENSE | 40 +- LICENSE-APACHE | 201 - README | 8 + README.md | 189 - analysis_options.yaml | 31 - android/.gitignore | 9 - android/build.gradle | 57 - android/gradle.properties | 15 - android/gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 - android/gradlew | 234 - android/gradlew.bat | 89 - android/settings.gradle | 1 - android/src/main/AndroidManifest.xml | 1 - build_pod.sh | 58 + build_tool/README.md | 2 + build_tool/analysis_options.yaml | 31 + build_tool/bin/build_tool.dart | 5 + build_tool/lib/build_tool.dart | 5 + build_tool/lib/src/android_environment.dart | 192 + build_tool/lib/src/artifacts_provider.dart | 263 + build_tool/lib/src/build_cmake.dart | 37 + build_tool/lib/src/build_gradle.dart | 46 + build_tool/lib/src/build_pod.dart | 86 + build_tool/lib/src/build_tool.dart | 268 + build_tool/lib/src/builder.dart | 195 + build_tool/lib/src/cargo.dart | 45 + build_tool/lib/src/crate_hash.dart | 121 + build_tool/lib/src/environment.dart | 65 + build_tool/lib/src/logging.dart | 49 + build_tool/lib/src/options.dart | 306 + build_tool/lib/src/precompile_binaries.dart | 199 + build_tool/lib/src/rustup.dart | 133 + build_tool/lib/src/target.dart | 137 + build_tool/lib/src/util.dart | 169 + build_tool/lib/src/verify_binaries.dart | 81 + {example => build_tool}/pubspec.lock | 418 +- build_tool/pubspec.yaml | 30 + build_tool/test/builder_test.dart | 28 + build_tool/test/cargo_test.dart | 28 + build_tool/test/options_test.dart | 75 + build_tool/test/rustup_test.dart | 66 + check_precompiled.sh | 11 - cmake/cargokit.cmake | 99 + cmake/resolve_symlinks.ps1 | 27 + docs/architecture.md | 104 + docs/precompiled_binaries.md | 95 + example/.gitignore | 45 - example/README.md | 16 - example/analysis_options.yaml | 29 - example/android/.gitignore | 13 - example/android/app/build.gradle | 72 - .../android/app/src/debug/AndroidManifest.xml | 7 - .../android/app/src/main/AndroidManifest.xml | 34 - .../bdk/f/bdk_flutter_example/MainActivity.kt | 5 - .../res/drawable-v21/launch_background.xml | 11 - .../main/res/drawable/launch_background.xml | 11 - .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 544 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 442 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 721 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 1031 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 1443 -> 0 bytes .../app/src/main/res/values-night/styles.xml | 18 - .../app/src/main/res/values/styles.xml | 18 - .../app/src/profile/AndroidManifest.xml | 7 - example/android/build.gradle | 31 - example/android/gradle.properties | 3 - .../gradle/wrapper/gradle-wrapper.properties | 6 - example/android/settings.gradle | 11 - example/integration_test /multi_sig_test.dart | 167 - example/ios/.gitignore | 34 - example/ios/Flutter/AppFrameworkInfo.plist | 26 - example/ios/Flutter/Debug.xcconfig | 2 - example/ios/Flutter/Release.xcconfig | 2 - example/ios/Podfile | 40 - example/ios/Runner.xcodeproj/project.pbxproj | 557 - .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/WorkspaceSettings.xcsettings | 8 - .../xcshareddata/xcschemes/Runner.xcscheme | 87 - .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/WorkspaceSettings.xcsettings | 8 - example/ios/Runner/AppDelegate.swift | 13 - .../AppIcon.appiconset/Contents.json | 122 - .../Icon-App-1024x1024@1x.png | Bin 10932 -> 0 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 564 -> 0 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 1283 -> 0 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 1588 -> 0 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 1025 -> 0 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 1716 -> 0 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 1920 -> 0 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 1283 -> 0 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 1895 -> 0 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 2665 -> 0 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 2665 -> 0 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 3831 -> 0 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 1888 -> 0 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 3294 -> 0 bytes .../Icon-App-83.5x83.5@2x.png | Bin 3612 -> 0 bytes .../LaunchImage.imageset/Contents.json | 23 - .../LaunchImage.imageset/LaunchImage.png | Bin 68 -> 0 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 68 -> 0 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 68 -> 0 bytes .../LaunchImage.imageset/README.md | 8 - .../Runner/Base.lproj/LaunchScreen.storyboard | 37 - example/ios/Runner/Base.lproj/Main.storyboard | 26 - example/ios/Runner/Info.plist | 51 - example/ios/Runner/Runner-Bridging-Header.h | 1 - example/lib/bdk_library.dart | 119 - example/lib/main.dart | 6 - example/lib/wallet.dart | 325 - example/macos/.gitignore | 7 - example/macos/Flutter/Flutter-Debug.xcconfig | 2 - .../macos/Flutter/Flutter-Release.xcconfig | 2 - .../Flutter/GeneratedPluginRegistrant.swift | 10 - example/macos/Podfile | 43 - example/macos/Podfile.lock | 22 - .../macos/Runner.xcodeproj/project.pbxproj | 791 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/xcschemes/Runner.xcscheme | 98 - .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - example/macos/Runner/AppDelegate.swift | 9 - .../AppIcon.appiconset/Contents.json | 68 - .../AppIcon.appiconset/app_icon_1024.png | Bin 102994 -> 0 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 5680 -> 0 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 520 -> 0 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 14142 -> 0 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 1066 -> 0 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 36406 -> 0 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 2218 -> 0 bytes example/macos/Runner/Base.lproj/MainMenu.xib | 343 - example/macos/Runner/Configs/AppInfo.xcconfig | 14 - example/macos/Runner/Configs/Debug.xcconfig | 2 - example/macos/Runner/Configs/Release.xcconfig | 2 - .../macos/Runner/Configs/Warnings.xcconfig | 13 - .../macos/Runner/DebugProfile.entitlements | 14 - example/macos/Runner/Info.plist | 32 - example/macos/Runner/MainFlutterWindow.swift | 15 - example/macos/Runner/Release.entitlements | 8 - example/pubspec.yaml | 86 - flutter_rust_bridge.yaml | 10 - gradle/plugin.gradle | 176 + ios/.gitignore | 41 - ios/Classes/EnforceBundling.swift | 4 - ios/Classes/bdk_flutter.c | 0 ios/Classes/frb_generated.h | 1542 - ios/bdk_flutter.podspec | 31 - lefthook.yml | 16 - lib/bdk_flutter.dart | 50 - lib/src/generated/api/blockchain.dart | 289 - lib/src/generated/api/blockchain.freezed.dart | 993 - lib/src/generated/api/descriptor.dart | 127 - lib/src/generated/api/error.dart | 362 - lib/src/generated/api/error.freezed.dart | 28272 ---------------- lib/src/generated/api/key.dart | 170 - lib/src/generated/api/psbt.dart | 77 - lib/src/generated/api/types.dart | 991 - lib/src/generated/api/types.freezed.dart | 5830 ---- lib/src/generated/api/wallet.dart | 181 - lib/src/generated/frb_generated.dart | 8595 ----- lib/src/generated/frb_generated.io.dart | 8116 ----- lib/src/generated/lib.dart | 55 - lib/src/root.dart | 1369 - lib/src/utils/exceptions.dart | 459 - lib/src/utils/utils.dart | 15 - macos/.gitignore | 41 - macos/Classes/EnforceBundling.swift | 4 - macos/Classes/bdk_flutter.c | 0 macos/Classes/frb_generated.h | 1542 - macos/bdk_flutter.podspec | 36 - makefile | 29 - pubspec.lock | 621 - pubspec.yaml | 36 - run_build_tool.cmd | 91 + run_build_tool.sh | 99 + rust/Cargo.lock | 1592 - rust/Cargo.toml | 29 - rust/cargokit.yaml | 6 - rust/src/api/blockchain.rs | 207 - rust/src/api/descriptor.rs | 274 - rust/src/api/error.rs | 368 - rust/src/api/key.rs | 297 - rust/src/api/mod.rs | 24 - rust/src/api/psbt.rs | 101 - rust/src/api/types.rs | 1168 - rust/src/api/wallet.rs | 329 - rust/src/frb_generated.io.rs | 4856 --- rust/src/frb_generated.rs | 7124 ---- rust/src/lib.rs | 5 - test/bdk_flutter_test.dart | 345 - test/bdk_flutter_test.mocks.dart | 2243 -- 199 files changed, 3765 insertions(+), 83887 deletions(-) create mode 100644 .github/workflows/check_and_lint.yml delete mode 100644 .github/workflows/precompile_binaries.yml create mode 100644 .github/workflows/test_example_plugin_build.yml delete mode 100644 .metadata delete mode 100644 CHANGELOG.md delete mode 100644 LICENSE-APACHE create mode 100644 README delete mode 100644 README.md delete mode 100644 analysis_options.yaml delete mode 100644 android/.gitignore delete mode 100644 android/build.gradle delete mode 100644 android/gradle.properties delete mode 100644 android/gradle/wrapper/gradle-wrapper.jar delete mode 100644 android/gradle/wrapper/gradle-wrapper.properties delete mode 100644 android/gradlew delete mode 100644 android/gradlew.bat delete mode 100644 android/settings.gradle delete mode 100644 android/src/main/AndroidManifest.xml create mode 100755 build_pod.sh create mode 100644 build_tool/README.md create mode 100644 build_tool/analysis_options.yaml create mode 100644 build_tool/bin/build_tool.dart create mode 100644 build_tool/lib/build_tool.dart create mode 100644 build_tool/lib/src/android_environment.dart create mode 100644 build_tool/lib/src/artifacts_provider.dart create mode 100644 build_tool/lib/src/build_cmake.dart create mode 100644 build_tool/lib/src/build_gradle.dart create mode 100644 build_tool/lib/src/build_pod.dart create mode 100644 build_tool/lib/src/build_tool.dart create mode 100644 build_tool/lib/src/builder.dart create mode 100644 build_tool/lib/src/cargo.dart create mode 100644 build_tool/lib/src/crate_hash.dart create mode 100644 build_tool/lib/src/environment.dart create mode 100644 build_tool/lib/src/logging.dart create mode 100644 build_tool/lib/src/options.dart create mode 100644 build_tool/lib/src/precompile_binaries.dart create mode 100644 build_tool/lib/src/rustup.dart create mode 100644 build_tool/lib/src/target.dart create mode 100644 build_tool/lib/src/util.dart create mode 100644 build_tool/lib/src/verify_binaries.dart rename {example => build_tool}/pubspec.lock (57%) create mode 100644 build_tool/pubspec.yaml create mode 100644 build_tool/test/builder_test.dart create mode 100644 build_tool/test/cargo_test.dart create mode 100644 build_tool/test/options_test.dart create mode 100644 build_tool/test/rustup_test.dart delete mode 100644 check_precompiled.sh create mode 100644 cmake/cargokit.cmake create mode 100644 cmake/resolve_symlinks.ps1 create mode 100644 docs/architecture.md create mode 100644 docs/precompiled_binaries.md delete mode 100644 example/.gitignore delete mode 100644 example/README.md delete mode 100644 example/analysis_options.yaml delete mode 100644 example/android/.gitignore delete mode 100644 example/android/app/build.gradle delete mode 100644 example/android/app/src/debug/AndroidManifest.xml delete mode 100644 example/android/app/src/main/AndroidManifest.xml delete mode 100644 example/android/app/src/main/kotlin/io/bdk/f/bdk_flutter_example/MainActivity.kt delete mode 100644 example/android/app/src/main/res/drawable-v21/launch_background.xml delete mode 100644 example/android/app/src/main/res/drawable/launch_background.xml delete mode 100644 example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/values-night/styles.xml delete mode 100644 example/android/app/src/main/res/values/styles.xml delete mode 100644 example/android/app/src/profile/AndroidManifest.xml delete mode 100644 example/android/build.gradle delete mode 100644 example/android/gradle.properties delete mode 100644 example/android/gradle/wrapper/gradle-wrapper.properties delete mode 100644 example/android/settings.gradle delete mode 100644 example/integration_test /multi_sig_test.dart delete mode 100644 example/ios/.gitignore delete mode 100644 example/ios/Flutter/AppFrameworkInfo.plist delete mode 100644 example/ios/Flutter/Debug.xcconfig delete mode 100644 example/ios/Flutter/Release.xcconfig delete mode 100644 example/ios/Podfile delete mode 100644 example/ios/Runner.xcodeproj/project.pbxproj delete mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme delete mode 100644 example/ios/Runner.xcworkspace/contents.xcworkspacedata delete mode 100644 example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 example/ios/Runner/AppDelegate.swift delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md delete mode 100644 example/ios/Runner/Base.lproj/LaunchScreen.storyboard delete mode 100644 example/ios/Runner/Base.lproj/Main.storyboard delete mode 100644 example/ios/Runner/Info.plist delete mode 100644 example/ios/Runner/Runner-Bridging-Header.h delete mode 100644 example/lib/bdk_library.dart delete mode 100644 example/lib/main.dart delete mode 100644 example/lib/wallet.dart delete mode 100644 example/macos/.gitignore delete mode 100644 example/macos/Flutter/Flutter-Debug.xcconfig delete mode 100644 example/macos/Flutter/Flutter-Release.xcconfig delete mode 100644 example/macos/Flutter/GeneratedPluginRegistrant.swift delete mode 100644 example/macos/Podfile delete mode 100644 example/macos/Podfile.lock delete mode 100644 example/macos/Runner.xcodeproj/project.pbxproj delete mode 100644 example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme delete mode 100644 example/macos/Runner.xcworkspace/contents.xcworkspacedata delete mode 100644 example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 example/macos/Runner/AppDelegate.swift delete mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png delete mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png delete mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png delete mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png delete mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png delete mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png delete mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png delete mode 100644 example/macos/Runner/Base.lproj/MainMenu.xib delete mode 100644 example/macos/Runner/Configs/AppInfo.xcconfig delete mode 100644 example/macos/Runner/Configs/Debug.xcconfig delete mode 100644 example/macos/Runner/Configs/Release.xcconfig delete mode 100644 example/macos/Runner/Configs/Warnings.xcconfig delete mode 100644 example/macos/Runner/DebugProfile.entitlements delete mode 100644 example/macos/Runner/Info.plist delete mode 100644 example/macos/Runner/MainFlutterWindow.swift delete mode 100644 example/macos/Runner/Release.entitlements delete mode 100644 example/pubspec.yaml delete mode 100644 flutter_rust_bridge.yaml create mode 100644 gradle/plugin.gradle delete mode 100644 ios/.gitignore delete mode 100644 ios/Classes/EnforceBundling.swift delete mode 100644 ios/Classes/bdk_flutter.c delete mode 100644 ios/Classes/frb_generated.h delete mode 100644 ios/bdk_flutter.podspec delete mode 100644 lefthook.yml delete mode 100644 lib/bdk_flutter.dart delete mode 100644 lib/src/generated/api/blockchain.dart delete mode 100644 lib/src/generated/api/blockchain.freezed.dart delete mode 100644 lib/src/generated/api/descriptor.dart delete mode 100644 lib/src/generated/api/error.dart delete mode 100644 lib/src/generated/api/error.freezed.dart delete mode 100644 lib/src/generated/api/key.dart delete mode 100644 lib/src/generated/api/psbt.dart delete mode 100644 lib/src/generated/api/types.dart delete mode 100644 lib/src/generated/api/types.freezed.dart delete mode 100644 lib/src/generated/api/wallet.dart delete mode 100644 lib/src/generated/frb_generated.dart delete mode 100644 lib/src/generated/frb_generated.io.dart delete mode 100644 lib/src/generated/lib.dart delete mode 100644 lib/src/root.dart delete mode 100644 lib/src/utils/exceptions.dart delete mode 100644 lib/src/utils/utils.dart delete mode 100644 macos/.gitignore delete mode 100644 macos/Classes/EnforceBundling.swift delete mode 100644 macos/Classes/bdk_flutter.c delete mode 100644 macos/Classes/frb_generated.h delete mode 100644 macos/bdk_flutter.podspec delete mode 100644 makefile delete mode 100644 pubspec.lock delete mode 100644 pubspec.yaml create mode 100644 run_build_tool.cmd create mode 100755 run_build_tool.sh delete mode 100644 rust/Cargo.lock delete mode 100644 rust/Cargo.toml delete mode 100644 rust/cargokit.yaml delete mode 100644 rust/src/api/blockchain.rs delete mode 100644 rust/src/api/descriptor.rs delete mode 100644 rust/src/api/error.rs delete mode 100644 rust/src/api/key.rs delete mode 100644 rust/src/api/mod.rs delete mode 100644 rust/src/api/psbt.rs delete mode 100644 rust/src/api/types.rs delete mode 100644 rust/src/api/wallet.rs delete mode 100644 rust/src/frb_generated.io.rs delete mode 100644 rust/src/frb_generated.rs delete mode 100644 rust/src/lib.rs delete mode 100644 test/bdk_flutter_test.dart delete mode 100644 test/bdk_flutter_test.mocks.dart diff --git a/.github/workflows/check_and_lint.yml b/.github/workflows/check_and_lint.yml new file mode 100644 index 00000000..d8979f0e --- /dev/null +++ b/.github/workflows/check_and_lint.yml @@ -0,0 +1,26 @@ +on: + pull_request: + push: + branches: + - main + +name: Check and Lint + +jobs: + Flutter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # 4.1.0 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # 2.16.0 + - name: Pub Get + run: dart pub get --no-precompile + working-directory: build_tool + - name: Dart Format + run: dart format . --output=none --set-exit-if-changed + working-directory: build_tool + - name: Analyze + run: dart analyze + working-directory: build_tool + - name: Test + run: flutter test + working-directory: build_tool diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml deleted file mode 100644 index 0804c5b0..00000000 --- a/.github/workflows/precompile_binaries.yml +++ /dev/null @@ -1,54 +0,0 @@ -on: - push: - branches: '*' - -name: Precompile Binaries - -jobs: - Precompile: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-20.04 - - macOS-latest - steps: - - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - name: Configure Cargo.toml optimizations - run: | - mkdir -p .cargo - echo "[profile.release]" >> .cargo/config.toml - echo "opt-level = 'z'" >> .cargo/config.toml - echo "lto = true" >> .cargo/config.toml - echo "codegen-units = 1" >> .cargo/config.toml - echo "panic = 'abort'" >> .cargo/config.toml - - uses: dart-lang/setup-dart@v1 - - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - - name: Set up Android SDK - if: (matrix.os == 'ubuntu-20.04') - uses: android-actions/setup-android@v2 - - name: Install Specific NDK - if: (matrix.os == 'ubuntu-20.04') - run: sdkmanager --install "ndk;24.0.8215888" - - name: Precompile (with iOS) - if: (matrix.os == 'macOS-latest') - run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter - working-directory: cargokit/build_tool - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} - - name: Precompile (with Android) - if: (matrix.os == 'ubuntu-20.04') - run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 - working-directory: cargokit/build_tool - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} diff --git a/.github/workflows/test_example_plugin_build.yml b/.github/workflows/test_example_plugin_build.yml new file mode 100644 index 00000000..698ea7e1 --- /dev/null +++ b/.github/workflows/test_example_plugin_build.yml @@ -0,0 +1,86 @@ +on: + pull_request: + push: + branches: + - main + +name: Test Example Plugin + +jobs: + Build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macOS-latest + - windows-latest + build_mode: + - debug + - profile + - release + env: + EXAMPLE_DIR: "a b/hello_rust_ffi_plugin/example" + CARGOKIT_VERBOSE: 1 + steps: + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + - name: Setup Repository + shell: bash + run: | + mkdir "a b" # Space is intentional + cd "a b" + git config --global user.email "you@example.com" + git config --global user.name "Your Name" + # "advanced" branch has extra iOS flavor and uses rust nightly for release builds + git clone -b advanced https://github.com/irondash/hello_rust_ffi_plugin + cd hello_rust_ffi_plugin + git subtree pull --prefix cargokit https://github.com/${{ github.event.pull_request.head.repo.full_name || github.repository }} ${{ steps.extract_branch.outputs.branch }} --squash + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # 2.16.0 + with: + channel: "stable" + - name: Install GTK + if: (matrix.os == 'ubuntu-latest') + run: sudo apt-get update && sudo apt-get install libgtk-3-dev + - name: Install ninja-build + if: (matrix.os == 'ubuntu-latest') + run: sudo apt-get update && sudo apt-get install ninja-build + - name: Build Linux (${{ matrix.build_mode }}) + if: matrix.os == 'ubuntu-latest' + shell: bash + working-directory: ${{ env.EXAMPLE_DIR }} + run: flutter build linux --${{ matrix.build_mode }} -v + - name: Build macOS (${{ matrix.build_mode }}) + if: matrix.os == 'macos-latest' + shell: bash + working-directory: ${{ env.EXAMPLE_DIR }} + run: flutter build macos --${{ matrix.build_mode }} -v + - name: Build iOS (${{ matrix.build_mode }}) + if: matrix.os == 'macos-latest' + shell: bash + working-directory: ${{ env.EXAMPLE_DIR }} + run: flutter build ios --${{ matrix.build_mode }} --no-codesign -v + - name: Build iOS (${{ matrix.build_mode }}) - flavor1 + if: matrix.os == 'macos-latest' + shell: bash + working-directory: ${{ env.EXAMPLE_DIR }} + run: flutter build ios --flavor flavor1 --${{ matrix.build_mode }} --no-codesign -v + - name: Build Windows (${{ matrix.build_mode }}) + if: matrix.os == 'windows-latest' + shell: bash + working-directory: ${{ env.EXAMPLE_DIR }} + run: flutter build windows --${{ matrix.build_mode }} -v + - name: Build Android (${{ matrix.build_mode }}) + shell: bash + working-directory: ${{ env.EXAMPLE_DIR }} + run: | + if [[ $(sysctl hw.optional.arm64) == *"hw.optional.arm64: 1"* ]]; then + export JAVA_HOME=$JAVA_HOME_17_arm64 + else + export JAVA_HOME=$JAVA_HOME_11_X64 + fi + flutter build apk --${{ matrix.build_mode }} -v + diff --git a/.gitignore b/.gitignore index 840c0b18..cf7bb868 100644 --- a/.gitignore +++ b/.gitignore @@ -1,38 +1,4 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ -migrate_working_dir/ -.vscode/settings.json - -# IntelliJ related +target +.dart_tool *.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. - -**/doc/api/ -.dart_tool/ -.packages -build/ -bdk.*/ -*.xcframework -android/src/main/jniLibs/ -rust/target/ -rust/output.log - - +!pubspec.lock diff --git a/.metadata b/.metadata deleted file mode 100644 index 8aaaa2cc..00000000 --- a/.metadata +++ /dev/null @@ -1,36 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled. - -version: - revision: f92f44110e87bad5ff168335c36da6f6053036e6 - channel: stable - -project_type: plugin - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 - base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 - - platform: android - create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 - base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 - - platform: ios - create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 - base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 - - platform: macos - create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 - base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 77d8f273..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,179 +0,0 @@ -## [0.31.3] - -## [0.31.2] -Updated `flutter_rust_bridge` to `2.0.0`. -#### APIs added -- Exposed `createTestnet` & `createMutinynet` to `Blockchain`. -- Exposed `policies` in `Wallet`. -- Exposed `policyPath` in `TxBuilder`. -- Exposed `id`, `requiresPath`, `item`, `satisfaction`, `contribution` in `Policy` class. -- Overrode `toString()` for `Address`, `DerivationPath`, `Descriptor`, `DescriptorPublicKey` , `DescriptorSecretKey`, `Mnemonic`, -- `PartiallySignedTransaction`, `ScriptBuf` & `Transaction`. -#### Changed -- `partiallySignedTransaction.serialize()` serialize the data as raw binary. -#### Fixed -- Thread `frb_workerpool` panicked on Sql database access. - -## [0.31.2-dev.2] -#### Fixed -- Thread `frb_workerpool` panicked on invalid `Fingerprint`. -- `SignOptions` issue to accept `witness-utxo` while signing. - -#### Changed -- Removed `multiSig` variable from `SignOptions`. -- Updated example app to support `mutinynet`. -- Mapped `Hex`, `Address`, `Descriptor` & `Consensus` exceptions. - -## [0.31.2-dev.1] -#### Fixed -- Invalid `Bip49Public`, `Bip84Public` & `Bip86Public`. - -## [0.31.2-dev] -Updated Rust and Flutter dependencies. -#### APIs added -- Add `InvalidInputException`, `InvalidLockTimeException` & `InvalidTransactionException` . -#### Fixed -- Thread `frb_workerpool` panic on `UnknownUtxo` and `InvalidPsbtInput`. - -## [0.31.1-dev] -#### Fixed -- Failed to load `.so` files in android. - -## [0.31.0-dev] -Updated Rust and Flutter dependencies. -#### APIs added -- Add sealed class `Auth` in `RpcConfig`. -- Made `PartiallySignedTransaction` class mutable. - -#### Changed -- Replace `AddressIndex`'s `new` with`increase`. -- Renamed `Address`'s create to `fromString`. -- `txBuilder.finish` returns a tuple. -- Added `cargokit` to handle rust binary build - -#### Fixed -- Functions hang indefinitely on iOS devices. -- Thread `frb_workerpool` panicked. - -## [0.30.0] -Updated Rust and Flutter dependencies. -MacOS support bug resolved -#### APIs added -- Add BIP-86 descriptor template - -## [0.29.2] -Support MacOS and unit testing. -Updated flutter dependencies. - -## [0.29.1] -Updated Rust and Flutter dependencies. -Exposed strongly-typed exceptions. - -## [0.29.0] -Support Dart 3. -Updated Rust and Flutter dependencies. -#### APIs added -- Add `isMine` method to `Wallet`. -- Expose script.toBytes() method. - -## [0.28.3] -### Fixed -- Multisig issue resolved by adding isMultiSig to signOptions. - -## [0.28.2] -#### APIs added -- Expose `Wallet` class's `getDescriptorForKeyChain` and `getPsbtInput` functions. -- Expose `TxBuilder` class's `addForeignUtxo` function. -- Add `Input` class. -- Expose `Descriptor` class's `maxSatisfactionWeight` function. - -## [0.28.1] -### Fixed -- Invalid UTF-8 error for txansaction.input(). - -## [0.28.0] -Updated Rust ( Bdk to latest version 0.28.0 ) and Flutter dependencies. -#### APIs added -- Expose `Address` class's `payload` and `network` functions -- Add `fromScript` constructor to `Address` class -- Add `SignOptions` to Wallet.sign() params. -- Add `jsonSerialize` function to `PartiallySignedTransaction`, to get the JSON serialized value of all PSBT fields. -- Expose `Transaction` class's `txid`, `weight`, `size`, `vsize`, `isCoinBase`, `isExplicitlyRbf`, `version`, `isLockTimeEnabled`, `lockTime`, `input` and `output` functions. - -## [0.27.2] -### API changed -- txBuilder.finish() & bumpFeeTxBuilder.finish() returns a `TxBuilderResult` instead of a `PartiallySignedTransaction`. - -## [0.27.1] -Updated Rust ( Bdk to latest version 0.27.1 ) and Flutter dependencies. -#### APIs added -- New `Transaction` class that can be created from or serialized to consensus encoded bytes. -- Add estimateFee(int Target) function for `Blockchain` -- Add getInternalAddress() function for `Wallet` -- Add AddressIndex.reset(int index) & AddressIndex.peek(int index) -#### APIs changed -- partiallySignedTransaction.extractTx() returns a `Transaction` instead of a the transaction bytes. -- blockchain.broadcast() takes a `Transaction` instead of a `PartiallySignedTransaction` - -## [0.3.2] -### Fixed -- iOS build issue when using flavors -- Added toString method for all objects - -## [0.3.1] -### Fixed -- Pub.dev analysis score -- Type mismatch for descriptorSecretKey - -## [0.3.0] -Updated Rust ( Bdk to latest version 0.26.0 ) and Flutter dependencies. -#### APIs changed -- The descriptor and changeDescriptor arguments on the wallet constructor now take a `Descriptor` instead of a String. -#### APIs added -- Added RpcConfig, BlockchainConfig.rpc -- Added Descriptor type with the following named constructors: -- Default `create` constructor, that requires a descriptor in String format and a Network -- newBip44 constructor returns a Descriptor with structure pkh(key/44'/{0,1}'/0'/{0,1}/*) -- newBip44Public constructor returns a Descriptor with structure pkh(key/{0,1}/*) -- newBip49 constructor returns a Descriptor with structure sh(wpkh(key/49'/{0,1}'/0'/{0,1}/*)) -- newBip49Public constructor returns a Descriptor with structure sh(wpkh(key/{0,1}/*)) -- newBip84 constructor returns a Descriptor with structure wpkh(key/84'/{0,1}'/0'/{0,1}/*) -- newBip84Public constructor returns a Descriptor with structure wpkh(key/{0,1}/*) -- asString returns the public version of the output descriptor in String format -- asPrivateString returns the private version of the output descriptor if available, otherwise, return the public version - -## [0.2.3] -### Fixed -- pub.dev analysis score - -## [0.2.2] -### Fixed -- pub.dev analysis score - -## [0.2.1] -### Fixed -- pub.dev static analysis warning -- removing internal helper functions from public api - -## [0.2.0] -Updated API to match bdk-ffi - -## [0.1.4] -#### Functionality Added -- Generate Mnemonic method -- Create Descriptors -- Create Extended Key -- Create XPriv -- Create XPub -- Create Wallet -- Get New Address -- Get Last Unused Address -- Get Balance -- Get Transactions -- Get Pending Transactions -- Get Confirmed Transactions -- Sync Wallet -- Create Transaction -- Sign Transaction -- Broadcast Transaction -- Quick Send \ No newline at end of file diff --git a/LICENSE b/LICENSE index 1f95d26c..54a7d589 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,39 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Copyright 2022 Matej Knopp -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +================================================================================ + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +================================================================================ + +APACHE LICENSE, VERSION 2.0 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/LICENSE-APACHE b/LICENSE-APACHE deleted file mode 100644 index 8c866a85..00000000 --- a/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/README b/README new file mode 100644 index 00000000..8ae4a073 --- /dev/null +++ b/README @@ -0,0 +1,8 @@ +Experimental repository to provide glue for seamlessly integrating cargo build +with flutter plugins and packages. + +See https://matejknopp.com/post/flutter_plugin_in_rust_with_no_prebuilt_binaries/ +for a tutorial on how to use Cargokit. + +Example plugin available at https://github.com/irondash/hello_rust_ffi_plugin. + diff --git a/README.md b/README.md deleted file mode 100644 index 8e596aad..00000000 --- a/README.md +++ /dev/null @@ -1,189 +0,0 @@ -### Bdk Flutter - -

- - BDK is released under the MIT license. - - - Docs - - - Current pub package version. - - - Issues - - - Stars - - - Forks - - - Demo App - -

- -A Flutter library for the [Bitcoin Development Kit](https://bitcoindevkit.org/). -The bdk library aims to be the core building block for Bitcoin Applications of any kind. - -### Requirements - -- Flutter : 3.0 or higher -- Android minSdkVersion. : API 23 or higher. -- Deployment target : iOS 12.0 or greater. - -### How to Use - -To use the `bdk_flutter` package in your project, add it as a dependency in your project's pubspec.yaml: - -```dart -dependencies: - bdk_flutter: ^0.31.3 -``` - -### Examples - -### Create a Wallet & sync the balance of a descriptor - -```dart -import 'package:bdk_flutter/bdk_flutter.dart'; - -// .... - -final mnemonic = await Mnemonic.create(WordCount.words12); -final descriptorSecretKey = await DescriptorSecretKey.create( network: Network.testnet, - mnemonic: mnemonic ); -final externalDescriptor = await Descriptor.newBip44( secretKey: descriptorSecretKey, - network: Network.testnet, - keychain: KeychainKind.externalChain ); -final internalDescriptor = await Descriptor.newBip44( secretKey: descriptorSecretKey, - network: Network.testnet, - keychain: KeyChainKind.internalChain ); -final blockchain = await Blockchain.create( config: BlockchainConfig.electrum( - config: ElectrumConfig( - stopGap: 10, - timeout: 5, - retry: 5, - url: "ssl://electrum.blockstream.info:60002" ))); -final wallet = await Wallet.create( descriptor: externalDescriptor, - changeDescriptor: internalDescriptor, - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory() ); -final _ = await wallet.sync( blockchain ); -``` - -### Create a `public` wallet descriptor - -```dart -import 'package:bdk_flutter/bdk_flutter.dart'; - -// .... - -final mnemonic = await Mnemonic.create(WordCount.words12); -final descriptorSecretKey = await DescriptorSecretKey.create( network: Network.testnet, - mnemonic: mnemonic ); -final externalDescriptor = await Descriptor.newBip44( secretKey: descriptorSecretKey, - network: Network.testnet, - keychain: KeychainKind.externalChain ); -final externalPublicDescriptor = await Descriptor.create( descriptor: externalDescriptor.toString(), - network: Network.testnet); -``` - -### Get the transaction details - -```dart -import 'package:bdk_flutter/bdk_flutter.dart'; - -final bdkWallet = ..... - -// .... - -final txBuilder = TxBuilder(); -final address = await Address.fromString(s: "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB", network: Network.testnet); - -final script = await address.scriptPubkey(); -final feeRate = await blockchain.estimateFee(target: 25); - -final (psbt, transactionDetails) = await txBuilder.feeRate( feeRate.satPerVb ) - .addRecipient( script, 2000 ) - .finish( bdkWallet ); - -final serializedPsbt = await psbt.jsonSerialize(); -final jsonObject = json.decode(serializedPsbt); -final outputs = jsonObject['unsigned_tx']['output'] as List; -final inputs = jsonObject['inputs'][0]['non_witness_utxo']['output'] as List; - -debugPrint("=========Inputs====="); - for (var e in 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. - -```dart -import 'package:bdk_flutter/bdk_flutter.dart'; - - -final mnemonic = await Mnemonic.create(WordCount.words12); -final descriptorSecretKey = await DescriptorSecretKey.create( - network: Network.testnet, mnemonic: mnemonic); - -// create external descriptor -final derivationPath = await DerivationPath.create(path: "m/44h/1h/0h/0"); -final descriptorPrivateKey = - await descriptorSecretKey.derive(derivationPath); -final Descriptor descriptorPrivate = await Descriptor.create( - descriptor: "pkh(${descriptorPrivateKey.toString()})", - network: Network.testnet, - ); - -// create internal descriptor -final derivationPathInt = - await DerivationPath.create(path: "m/44h/1h/0h/1"); -final descriptorPrivateKeyInt = - await descriptorSecretKey.derive(derivationPathInt); -final Descriptor descriptorPrivateInt = await Descriptor.create( - descriptor: "pkh(${descriptorPrivateKeyInt.toString()})", - network: Network.testnet, - ); - -final bdkWallet = await Wallet.create( - descriptor: descriptorPrivate, - changeDescriptor: descriptorPrivateInt, - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory(), - ); - -final address = - await bdkWallet.getAddress(addressIndex: const AddressIndex.increase()); -final internalAddress = - await bdkWallet.getInternalAddress(addressIndex: const AddressIndex.increase()); - -``` - -### API Documentation - -The latest API documentation is available [here](https://pub.dev/documentation/bdk_flutter/latest/bdk_flutter/bdk_flutter-library.html) - -### Example Projects - -- **\*BDK Flutter Demo App:** The [BDK Flutter Demo App](https://github.com/LtbLightning/bdk-flutter-quickstart) - is a simple bitcoin app built in flutter to serve as a reference app to demonstrate `bdk-flutter` api usage. - -### 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 - - -Thanks for taking a look! diff --git a/analysis_options.yaml b/analysis_options.yaml deleted file mode 100644 index a40d945a..00000000 --- a/analysis_options.yaml +++ /dev/null @@ -1,31 +0,0 @@ -include: package:lints/core.yaml -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options - -linter: - rules: - prefer_single_quotes: false - avoid_void_async: false - prefer_interpolation_to_compose_strings: false - avoid_print: false - use_build_context_synchronously: false - unnecessary_string_escapes: false - avoid_dynamic_calls: false - non_constant_identifier_names: false - -analyzer: - exclude: - - lib/src/generated/frb_generated.dart - - lib/src/generated/frb_generated.io.dart - - lib/src/generated/frb_generated.dart - - lib/src/generated/api/types.freezed.dart - - lib/src/generated/api/types.dart - - lib/src/generated/api/descriptor.dart - - lib/src/generated/api/error.freezed.dart - - lib/src/generated/api/error.dart - - lib/src/generated/api/key.dart - - lib/src/generated/api/psbt.dart - - lib/src/generated/api/wallet.dart - - lib/src/generated/api/blockchain.freezed.dart - - README.md - - cargokit/ diff --git a/android/.gitignore b/android/.gitignore deleted file mode 100644 index 161bdcda..00000000 --- a/android/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures -.cxx diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index 6cc0c534..00000000 --- a/android/build.gradle +++ /dev/null @@ -1,57 +0,0 @@ -group 'io.bdk.f.bdk_flutter' -version '1.0-SNAPSHOT' -buildscript { - ext.kotlin_version = '1.6.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - - -allprojects { - repositories { - google() - mavenCentral() - } -} - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 31 - namespace "io.bdk.f.bdk_flutter" - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - minSdkVersion 23 - } -} -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.databinding:databinding-runtime:7.2.1' - testImplementation 'junit:junit:4.13.2' -} -apply from: "../cargokit/gradle/plugin.gradle" - -cargokit { - manifestDir = "../rust" - libname = "bdk_flutter" -} diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index 49dec4d8..00000000 --- a/android/gradle.properties +++ /dev/null @@ -1,15 +0,0 @@ -## For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx1024m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -# -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -#Sun Jun 05 16:55:39 EDT 2022 -android.useAndroidX=true -android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7454180f2ae8848c63b8b4dea2cb829da983f2fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}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9{M6nj>BHGn(KA2n|O zt}$=FPq!j`p&kQ8>cirSzkU0c08%8{^Qyqi-w2LoO8)^E7;;I1;HQ6B$u0nNaX2CY zSmfi)F`m94zL8>#zu;8|{aBui@RzRKBlP1&mfFxEC@%cjl?NBs`cr^nm){>;$g?rhKr$AO&6qV_Wbn^}5tfFBry^e1`%du2~o zs$~dN;S_#%iwwA_QvmMjh%Qo?0?rR~6liyN5Xmej8(*V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2e6e5897..00000000 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew deleted file mode 100644 index c53aefaa..00000000 --- a/android/gradlew +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" -APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat deleted file mode 100644 index 107acd32..00000000 --- a/android/gradlew.bat +++ /dev/null @@ -1,89 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index ac214652..00000000 --- a/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'bdk_flutter' diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml deleted file mode 100644 index 0bfa73ba..00000000 --- a/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/build_pod.sh b/build_pod.sh new file mode 100755 index 00000000..ed0e0d98 --- /dev/null +++ b/build_pod.sh @@ -0,0 +1,58 @@ +#!/bin/sh +set -e + +BASEDIR=$(dirname "$0") + +# Workaround for https://github.com/dart-lang/pub/issues/4010 +BASEDIR=$(cd "$BASEDIR" ; pwd -P) + +# Remove XCode SDK from path. Otherwise this breaks tool compilation when building iOS project +NEW_PATH=`echo $PATH | tr ":" "\n" | grep -v "Contents/Developer/" | tr "\n" ":"` + +export PATH=${NEW_PATH%?} # remove trailing : + +env + +# Platform name (macosx, iphoneos, iphonesimulator) +export CARGOKIT_DARWIN_PLATFORM_NAME=$PLATFORM_NAME + +# Arctive architectures (arm64, armv7, x86_64), space separated. +export CARGOKIT_DARWIN_ARCHS=$ARCHS + +# Current build configuration (Debug, Release) +export CARGOKIT_CONFIGURATION=$CONFIGURATION + +# Path to directory containing Cargo.toml. +export CARGOKIT_MANIFEST_DIR=$PODS_TARGET_SRCROOT/$1 + +# Temporary directory for build artifacts. +export CARGOKIT_TARGET_TEMP_DIR=$TARGET_TEMP_DIR + +# Output directory for final artifacts. +export CARGOKIT_OUTPUT_DIR=$PODS_CONFIGURATION_BUILD_DIR/$PRODUCT_NAME + +# Directory to store built tool artifacts. +export CARGOKIT_TOOL_TEMP_DIR=$TARGET_TEMP_DIR/build_tool + +# Directory inside root project. Not necessarily the top level directory of root project. +export CARGOKIT_ROOT_PROJECT_DIR=$SRCROOT + +FLUTTER_EXPORT_BUILD_ENVIRONMENT=( + "$PODS_ROOT/../Flutter/ephemeral/flutter_export_environment.sh" # macOS + "$PODS_ROOT/../Flutter/flutter_export_environment.sh" # iOS +) + +for path in "${FLUTTER_EXPORT_BUILD_ENVIRONMENT[@]}" +do + if [[ -f "$path" ]]; then + source "$path" + fi +done + +sh "$BASEDIR/run_build_tool.sh" build-pod "$@" + +# Make a symlink from built framework to phony file, which will be used as input to +# build script. This should force rebuild (podspec currently doesn't support alwaysOutOfDate +# attribute on custom build phase) +ln -fs "$OBJROOT/XCBuildData/build.db" "${BUILT_PRODUCTS_DIR}/cargokit_phony" +ln -fs "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}" "${BUILT_PRODUCTS_DIR}/cargokit_phony_out" diff --git a/build_tool/README.md b/build_tool/README.md new file mode 100644 index 00000000..3816eca3 --- /dev/null +++ b/build_tool/README.md @@ -0,0 +1,2 @@ +A sample command-line application with an entrypoint in `bin/`, library code +in `lib/`, and example unit test in `test/`. diff --git a/build_tool/analysis_options.yaml b/build_tool/analysis_options.yaml new file mode 100644 index 00000000..a1aad5b3 --- /dev/null +++ b/build_tool/analysis_options.yaml @@ -0,0 +1,31 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +linter: + rules: + - prefer_relative_imports + - directives_ordering + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/build_tool/bin/build_tool.dart b/build_tool/bin/build_tool.dart new file mode 100644 index 00000000..f27ec75c --- /dev/null +++ b/build_tool/bin/build_tool.dart @@ -0,0 +1,5 @@ +import 'package:build_tool/build_tool.dart' as build_tool; + +void main(List arguments) { + build_tool.runMain(arguments); +} diff --git a/build_tool/lib/build_tool.dart b/build_tool/lib/build_tool.dart new file mode 100644 index 00000000..b329c01a --- /dev/null +++ b/build_tool/lib/build_tool.dart @@ -0,0 +1,5 @@ +import 'src/build_tool.dart' as build_tool; + +Future runMain(List args) async { + return build_tool.runMain(args); +} diff --git a/build_tool/lib/src/android_environment.dart b/build_tool/lib/src/android_environment.dart new file mode 100644 index 00000000..9342964b --- /dev/null +++ b/build_tool/lib/src/android_environment.dart @@ -0,0 +1,192 @@ +import 'dart:io'; +import 'dart:isolate'; +import 'dart:math' as math; + +import 'package:collection/collection.dart'; +import 'package:path/path.dart' as path; +import 'package:version/version.dart'; + +import 'target.dart'; +import 'util.dart'; + +class AndroidEnvironment { + AndroidEnvironment({ + required this.sdkPath, + required this.ndkVersion, + required this.minSdkVersion, + required this.targetTempDir, + required this.target, + }); + + static void clangLinkerWrapper(List args) { + final clang = Platform.environment['_CARGOKIT_NDK_LINK_CLANG']; + if (clang == null) { + throw Exception( + "cargo-ndk rustc linker: didn't find _CARGOKIT_NDK_LINK_CLANG env var"); + } + final target = Platform.environment['_CARGOKIT_NDK_LINK_TARGET']; + if (target == null) { + throw Exception( + "cargo-ndk rustc linker: didn't find _CARGOKIT_NDK_LINK_TARGET env var"); + } + + runCommand(clang, [ + target, + ...args, + ]); + } + + /// Full path to Android SDK. + final String sdkPath; + + /// Full version of Android NDK. + final String ndkVersion; + + /// Minimum supported SDK version. + final int minSdkVersion; + + /// Target directory for build artifacts. + final String targetTempDir; + + /// Target being built. + final Target target; + + bool ndkIsInstalled() { + final ndkPath = path.join(sdkPath, 'ndk', ndkVersion); + final ndkPackageXml = File(path.join(ndkPath, 'package.xml')); + return ndkPackageXml.existsSync(); + } + + void installNdk({ + required String javaHome, + }) { + final sdkManagerExtension = Platform.isWindows ? '.bat' : ''; + final sdkManager = path.join( + sdkPath, + 'cmdline-tools', + 'latest', + 'bin', + 'sdkmanager$sdkManagerExtension', + ); + + log.info('Installing NDK $ndkVersion'); + runCommand(sdkManager, [ + '--install', + 'ndk;$ndkVersion', + ], environment: { + 'JAVA_HOME': javaHome, + }); + } + + Future> buildEnvironment() async { + final hostArch = Platform.isMacOS + ? "darwin-x86_64" + : (Platform.isLinux ? "linux-x86_64" : "windows-x86_64"); + + final ndkPath = path.join(sdkPath, 'ndk', ndkVersion); + final toolchainPath = path.join( + ndkPath, + 'toolchains', + 'llvm', + 'prebuilt', + hostArch, + 'bin', + ); + + final minSdkVersion = + math.max(target.androidMinSdkVersion!, this.minSdkVersion); + + final exe = Platform.isWindows ? '.exe' : ''; + + final arKey = 'AR_${target.rust}'; + final arValue = ['${target.rust}-ar', 'llvm-ar', 'llvm-ar.exe'] + .map((e) => path.join(toolchainPath, e)) + .firstWhereOrNull((element) => File(element).existsSync()); + if (arValue == null) { + throw Exception('Failed to find ar for $target in $toolchainPath'); + } + + final targetArg = '--target=${target.rust}$minSdkVersion'; + + final ccKey = 'CC_${target.rust}'; + final ccValue = path.join(toolchainPath, 'clang$exe'); + final cfFlagsKey = 'CFLAGS_${target.rust}'; + final cFlagsValue = targetArg; + + final cxxKey = 'CXX_${target.rust}'; + final cxxValue = path.join(toolchainPath, 'clang++$exe'); + final cxxFlagsKey = 'CXXFLAGS_${target.rust}'; + final cxxFlagsValue = targetArg; + + final linkerKey = + 'cargo_target_${target.rust.replaceAll('-', '_')}_linker'.toUpperCase(); + + final ranlibKey = 'RANLIB_${target.rust}'; + final ranlibValue = path.join(toolchainPath, 'llvm-ranlib$exe'); + + final ndkVersionParsed = Version.parse(ndkVersion); + final rustFlagsKey = 'CARGO_ENCODED_RUSTFLAGS'; + final rustFlagsValue = _libGccWorkaround(targetTempDir, ndkVersionParsed); + + final runRustTool = + Platform.isWindows ? 'run_build_tool.cmd' : 'run_build_tool.sh'; + + final packagePath = (await Isolate.resolvePackageUri( + Uri.parse('package:build_tool/buildtool.dart')))! + .toFilePath(); + final selfPath = path.canonicalize(path.join( + packagePath, + '..', + '..', + '..', + runRustTool, + )); + + // Make sure that run_build_tool is working properly even initially launched directly + // through dart run. + final toolTempDir = + Platform.environment['CARGOKIT_TOOL_TEMP_DIR'] ?? targetTempDir; + + return { + arKey: arValue, + ccKey: ccValue, + cfFlagsKey: cFlagsValue, + cxxKey: cxxValue, + cxxFlagsKey: cxxFlagsValue, + ranlibKey: ranlibValue, + rustFlagsKey: rustFlagsValue, + linkerKey: selfPath, + // Recognized by main() so we know when we're acting as a wrapper + '_CARGOKIT_NDK_LINK_TARGET': targetArg, + '_CARGOKIT_NDK_LINK_CLANG': ccValue, + 'CARGOKIT_TOOL_TEMP_DIR': toolTempDir, + }; + } + + // Workaround for libgcc missing in NDK23, inspired by cargo-ndk + String _libGccWorkaround(String buildDir, Version ndkVersion) { + final workaroundDir = path.join( + buildDir, + 'cargokit', + 'libgcc_workaround', + '${ndkVersion.major}', + ); + Directory(workaroundDir).createSync(recursive: true); + if (ndkVersion.major >= 23) { + File(path.join(workaroundDir, 'libgcc.a')) + .writeAsStringSync('INPUT(-lunwind)'); + } else { + // Other way around, untested, forward libgcc.a from libunwind once Rust + // gets updated for NDK23+. + File(path.join(workaroundDir, 'libunwind.a')) + .writeAsStringSync('INPUT(-lgcc)'); + } + + var rustFlags = Platform.environment['CARGO_ENCODED_RUSTFLAGS'] ?? ''; + if (rustFlags.isNotEmpty) { + rustFlags = '$rustFlags\x1f'; + } + rustFlags = '$rustFlags-L\x1f$workaroundDir'; + return rustFlags; + } +} diff --git a/build_tool/lib/src/artifacts_provider.dart b/build_tool/lib/src/artifacts_provider.dart new file mode 100644 index 00000000..ef655a9e --- /dev/null +++ b/build_tool/lib/src/artifacts_provider.dart @@ -0,0 +1,263 @@ +import 'dart:io'; + +import 'package:ed25519_edwards/ed25519_edwards.dart'; +import 'package:http/http.dart'; +import 'package:logging/logging.dart'; +import 'package:path/path.dart' as path; + +import 'builder.dart'; +import 'crate_hash.dart'; +import 'options.dart'; +import 'precompile_binaries.dart'; +import 'rustup.dart'; +import 'target.dart'; + +class Artifact { + /// File system location of the artifact. + final String path; + + /// Actual file name that the artifact should have in destination folder. + final String finalFileName; + + AritifactType get type { + if (finalFileName.endsWith('.dll') || + finalFileName.endsWith('.dll.lib') || + finalFileName.endsWith('.pdb') || + finalFileName.endsWith('.so') || + finalFileName.endsWith('.dylib')) { + return AritifactType.dylib; + } else if (finalFileName.endsWith('.lib') || finalFileName.endsWith('.a')) { + return AritifactType.staticlib; + } else { + throw Exception('Unknown artifact type for $finalFileName'); + } + } + + Artifact({ + required this.path, + required this.finalFileName, + }); +} + +final _log = Logger('artifacts_provider'); + +class ArtifactProvider { + ArtifactProvider({ + required this.environment, + required this.userOptions, + }); + + final BuildEnvironment environment; + final CargokitUserOptions userOptions; + + Future>> getArtifacts(List targets) async { + final result = await _getPrecompiledArtifacts(targets); + + final pendingTargets = List.of(targets); + pendingTargets.removeWhere((element) => result.containsKey(element)); + + if (pendingTargets.isEmpty) { + return result; + } + + final rustup = Rustup(); + for (final target in targets) { + final builder = RustBuilder(target: target, environment: environment); + builder.prepare(rustup); + _log.info('Building ${environment.crateInfo.packageName} for $target'); + final targetDir = await builder.build(); + // For local build accept both static and dynamic libraries. + final artifactNames = { + ...getArtifactNames( + target: target, + libraryName: environment.crateInfo.packageName, + aritifactType: AritifactType.dylib, + remote: false, + ), + ...getArtifactNames( + target: target, + libraryName: environment.crateInfo.packageName, + aritifactType: AritifactType.staticlib, + remote: false, + ) + }; + final artifacts = artifactNames + .map((artifactName) => Artifact( + path: path.join(targetDir, artifactName), + finalFileName: artifactName, + )) + .where((element) => File(element.path).existsSync()) + .toList(); + result[target] = artifacts; + } + return result; + } + + Future>> _getPrecompiledArtifacts( + List targets) async { + if (userOptions.usePrecompiledBinaries == false) { + _log.info('Precompiled binaries are disabled'); + return {}; + } + if (environment.crateOptions.precompiledBinaries == null) { + _log.fine('Precompiled binaries not enabled for this crate'); + return {}; + } + + final start = Stopwatch()..start(); + final crateHash = CrateHash.compute(environment.manifestDir, + tempStorage: environment.targetTempDir); + _log.fine( + 'Computed crate hash $crateHash in ${start.elapsedMilliseconds}ms'); + + final downloadedArtifactsDir = + path.join(environment.targetTempDir, 'precompiled', crateHash); + Directory(downloadedArtifactsDir).createSync(recursive: true); + + final res = >{}; + + for (final target in targets) { + final requiredArtifacts = getArtifactNames( + target: target, + libraryName: environment.crateInfo.packageName, + remote: true, + ); + final artifactsForTarget = []; + + for (final artifact in requiredArtifacts) { + final fileName = PrecompileBinaries.fileName(target, artifact); + final downloadedPath = path.join(downloadedArtifactsDir, fileName); + if (!File(downloadedPath).existsSync()) { + final signatureFileName = + PrecompileBinaries.signatureFileName(target, artifact); + await _tryDownloadArtifacts( + crateHash: crateHash, + fileName: fileName, + signatureFileName: signatureFileName, + finalPath: downloadedPath, + ); + } + if (File(downloadedPath).existsSync()) { + artifactsForTarget.add(Artifact( + path: downloadedPath, + finalFileName: artifact, + )); + } else { + break; + } + } + + // Only provide complete set of artifacts. + if (artifactsForTarget.length == requiredArtifacts.length) { + _log.fine('Found precompiled artifacts for $target'); + res[target] = artifactsForTarget; + } + } + + return res; + } + + static Future _get(Uri url, {Map? headers}) async { + int attempt = 0; + const maxAttempts = 10; + while (true) { + try { + return await get(url, headers: headers); + } on SocketException catch (e) { + // Try to detect reset by peer error and retry. + if (attempt++ < maxAttempts && + (e.osError?.errorCode == 54 || e.osError?.errorCode == 10054)) { + _log.severe( + 'Failed to download $url: $e, attempt $attempt of $maxAttempts, will retry...'); + await Future.delayed(Duration(seconds: 1)); + continue; + } else { + rethrow; + } + } + } + } + + Future _tryDownloadArtifacts({ + required String crateHash, + required String fileName, + required String signatureFileName, + required String finalPath, + }) async { + final precompiledBinaries = environment.crateOptions.precompiledBinaries!; + final prefix = precompiledBinaries.uriPrefix; + final url = Uri.parse('$prefix$crateHash/$fileName'); + final signatureUrl = Uri.parse('$prefix$crateHash/$signatureFileName'); + _log.fine('Downloading signature from $signatureUrl'); + final signature = await _get(signatureUrl); + if (signature.statusCode == 404) { + _log.warning( + 'Precompiled binaries not available for crate hash $crateHash ($fileName)'); + return; + } + if (signature.statusCode != 200) { + _log.severe( + 'Failed to download signature $signatureUrl: status ${signature.statusCode}'); + return; + } + _log.fine('Downloading binary from $url'); + final res = await _get(url); + if (res.statusCode != 200) { + _log.severe('Failed to download binary $url: status ${res.statusCode}'); + return; + } + if (verify( + precompiledBinaries.publicKey, res.bodyBytes, signature.bodyBytes)) { + File(finalPath).writeAsBytesSync(res.bodyBytes); + } else { + _log.shout('Signature verification failed! Ignoring binary.'); + } + } +} + +enum AritifactType { + staticlib, + dylib, +} + +AritifactType artifactTypeForTarget(Target target) { + if (target.darwinPlatform != null) { + return AritifactType.staticlib; + } else { + return AritifactType.dylib; + } +} + +List getArtifactNames({ + required Target target, + required String libraryName, + required bool remote, + AritifactType? aritifactType, +}) { + aritifactType ??= artifactTypeForTarget(target); + if (target.darwinArch != null) { + if (aritifactType == AritifactType.staticlib) { + return ['lib$libraryName.a']; + } else { + return ['lib$libraryName.dylib']; + } + } else if (target.rust.contains('-windows-')) { + if (aritifactType == AritifactType.staticlib) { + return ['$libraryName.lib']; + } else { + return [ + '$libraryName.dll', + '$libraryName.dll.lib', + if (!remote) '$libraryName.pdb' + ]; + } + } else if (target.rust.contains('-linux-')) { + if (aritifactType == AritifactType.staticlib) { + return ['lib$libraryName.a']; + } else { + return ['lib$libraryName.so']; + } + } else { + throw Exception("Unsupported target: ${target.rust}"); + } +} diff --git a/build_tool/lib/src/build_cmake.dart b/build_tool/lib/src/build_cmake.dart new file mode 100644 index 00000000..9154371e --- /dev/null +++ b/build_tool/lib/src/build_cmake.dart @@ -0,0 +1,37 @@ +import 'dart:io'; + +import 'package:path/path.dart' as path; + +import 'artifacts_provider.dart'; +import 'builder.dart'; +import 'environment.dart'; +import 'options.dart'; +import 'target.dart'; + +class BuildCMake { + final CargokitUserOptions userOptions; + + BuildCMake({required this.userOptions}); + + Future build() async { + final targetPlatform = Environment.targetPlatform; + final target = Target.forFlutterName(Environment.targetPlatform); + if (target == null) { + throw Exception("Unknown target platform: $targetPlatform"); + } + + final environment = BuildEnvironment.fromEnvironment(isAndroid: false); + final provider = + ArtifactProvider(environment: environment, userOptions: userOptions); + final artifacts = await provider.getArtifacts([target]); + + final libs = artifacts[target]!; + + for (final lib in libs) { + if (lib.type == AritifactType.dylib) { + File(lib.path) + .copySync(path.join(Environment.outputDir, lib.finalFileName)); + } + } + } +} diff --git a/build_tool/lib/src/build_gradle.dart b/build_tool/lib/src/build_gradle.dart new file mode 100644 index 00000000..469c8b2d --- /dev/null +++ b/build_tool/lib/src/build_gradle.dart @@ -0,0 +1,46 @@ +import 'dart:io'; + +import 'package:logging/logging.dart'; +import 'package:path/path.dart' as path; + +import 'artifacts_provider.dart'; +import 'builder.dart'; +import 'environment.dart'; +import 'options.dart'; +import 'target.dart'; + +final log = Logger('build_gradle'); + +class BuildGradle { + BuildGradle({required this.userOptions}); + + final CargokitUserOptions userOptions; + + Future build() async { + final targets = Environment.targetPlatforms.map((arch) { + final target = Target.forFlutterName(arch); + if (target == null) { + throw Exception( + "Unknown darwin target or platform: $arch, ${Environment.darwinPlatformName}"); + } + return target; + }).toList(); + + final environment = BuildEnvironment.fromEnvironment(isAndroid: true); + final provider = + ArtifactProvider(environment: environment, userOptions: userOptions); + final artifacts = await provider.getArtifacts(targets); + + for (final target in targets) { + final libs = artifacts[target]!; + final outputDir = path.join(Environment.outputDir, target.android!); + Directory(outputDir).createSync(recursive: true); + + for (final lib in libs) { + if (lib.type == AritifactType.dylib) { + File(lib.path).copySync(path.join(outputDir, lib.finalFileName)); + } + } + } + } +} diff --git a/build_tool/lib/src/build_pod.dart b/build_tool/lib/src/build_pod.dart new file mode 100644 index 00000000..f01401e1 --- /dev/null +++ b/build_tool/lib/src/build_pod.dart @@ -0,0 +1,86 @@ +import 'dart:io'; + +import 'package:path/path.dart' as path; + +import 'artifacts_provider.dart'; +import 'builder.dart'; +import 'environment.dart'; +import 'options.dart'; +import 'target.dart'; +import 'util.dart'; + +class BuildPod { + BuildPod({required this.userOptions}); + + final CargokitUserOptions userOptions; + + Future build() async { + final targets = Environment.darwinArchs.map((arch) { + final target = Target.forDarwin( + platformName: Environment.darwinPlatformName, darwinAarch: arch); + if (target == null) { + throw Exception( + "Unknown darwin target or platform: $arch, ${Environment.darwinPlatformName}"); + } + return target; + }).toList(); + + final environment = BuildEnvironment.fromEnvironment(isAndroid: false); + final provider = + ArtifactProvider(environment: environment, userOptions: userOptions); + final artifacts = await provider.getArtifacts(targets); + + void performLipo(String targetFile, Iterable sourceFiles) { + runCommand("lipo", [ + '-create', + ...sourceFiles, + '-output', + targetFile, + ]); + } + + final outputDir = Environment.outputDir; + + Directory(outputDir).createSync(recursive: true); + + final staticLibs = artifacts.values + .expand((element) => element) + .where((element) => element.type == AritifactType.staticlib) + .toList(); + final dynamicLibs = artifacts.values + .expand((element) => element) + .where((element) => element.type == AritifactType.dylib) + .toList(); + + final libName = environment.crateInfo.packageName; + + // If there is static lib, use it and link it with pod + if (staticLibs.isNotEmpty) { + final finalTargetFile = path.join(outputDir, "lib$libName.a"); + performLipo(finalTargetFile, staticLibs.map((e) => e.path)); + } else { + // Otherwise try to replace bundle dylib with our dylib + final bundlePaths = [ + '$libName.framework/Versions/A/$libName', + '$libName.framework/$libName', + ]; + + for (final bundlePath in bundlePaths) { + final targetFile = path.join(outputDir, bundlePath); + if (File(targetFile).existsSync()) { + performLipo(targetFile, dynamicLibs.map((e) => e.path)); + + // Replace absolute id with @rpath one so that it works properly + // when moved to Frameworks. + runCommand("install_name_tool", [ + '-id', + '@rpath/$bundlePath', + targetFile, + ]); + return; + } + } + throw Exception('Unable to find bundle for dynamic library'); + } + } +} diff --git a/build_tool/lib/src/build_tool.dart b/build_tool/lib/src/build_tool.dart new file mode 100644 index 00000000..1d9462af --- /dev/null +++ b/build_tool/lib/src/build_tool.dart @@ -0,0 +1,268 @@ +import 'dart:io'; + +import 'package:args/command_runner.dart'; +import 'package:ed25519_edwards/ed25519_edwards.dart'; +import 'package:github/github.dart'; +import 'package:hex/hex.dart'; +import 'package:logging/logging.dart'; + +import 'android_environment.dart'; +import 'build_cmake.dart'; +import 'build_gradle.dart'; +import 'build_pod.dart'; +import 'logging.dart'; +import 'options.dart'; +import 'precompile_binaries.dart'; +import 'target.dart'; +import 'util.dart'; +import 'verify_binaries.dart'; + +final log = Logger('build_tool'); + +abstract class BuildCommand extends Command { + Future runBuildCommand(CargokitUserOptions options); + + @override + Future run() async { + final options = CargokitUserOptions.load(); + + if (options.verboseLogging || + Platform.environment['CARGOKIT_VERBOSE'] == '1') { + enableVerboseLogging(); + } + + await runBuildCommand(options); + } +} + +class BuildPodCommand extends BuildCommand { + @override + final name = 'build-pod'; + + @override + final description = 'Build cocoa pod library'; + + @override + Future runBuildCommand(CargokitUserOptions options) async { + final build = BuildPod(userOptions: options); + await build.build(); + } +} + +class BuildGradleCommand extends BuildCommand { + @override + final name = 'build-gradle'; + + @override + final description = 'Build android library'; + + @override + Future runBuildCommand(CargokitUserOptions options) async { + final build = BuildGradle(userOptions: options); + await build.build(); + } +} + +class BuildCMakeCommand extends BuildCommand { + @override + final name = 'build-cmake'; + + @override + final description = 'Build CMake library'; + + @override + Future runBuildCommand(CargokitUserOptions options) async { + final build = BuildCMake(userOptions: options); + await build.build(); + } +} + +class GenKeyCommand extends Command { + @override + final name = 'gen-key'; + + @override + final description = 'Generate key pair for signing precompiled binaries'; + + @override + void run() { + final kp = generateKey(); + final private = HEX.encode(kp.privateKey.bytes); + final public = HEX.encode(kp.publicKey.bytes); + print("Private Key: $private"); + print("Public Key: $public"); + } +} + +class PrecompileBinariesCommand extends Command { + PrecompileBinariesCommand() { + argParser + ..addOption( + 'repository', + mandatory: true, + help: 'Github repository slug in format owner/name', + ) + ..addOption( + 'manifest-dir', + mandatory: true, + help: 'Directory containing Cargo.toml', + ) + ..addMultiOption('target', + help: 'Rust target triple of artifact to build.\n' + 'Can be specified multiple times or omitted in which case\n' + 'all targets for current platform will be built.') + ..addOption( + 'android-sdk-location', + help: 'Location of Android SDK (if available)', + ) + ..addOption( + 'android-ndk-version', + help: 'Android NDK version (if available)', + ) + ..addOption( + 'android-min-sdk-version', + help: 'Android minimum rquired version (if available)', + ) + ..addOption( + 'temp-dir', + help: 'Directory to store temporary build artifacts', + ) + ..addFlag( + "verbose", + abbr: "v", + defaultsTo: false, + help: "Enable verbose logging", + ); + } + + @override + final name = 'precompile-binaries'; + + @override + final description = 'Prebuild and upload binaries\n' + 'Private key must be passed through PRIVATE_KEY environment variable. ' + 'Use gen_key through generate priave key.\n' + 'Github token must be passed as GITHUB_TOKEN environment variable.\n'; + + @override + Future run() async { + final verbose = argResults!['verbose'] as bool; + if (verbose) { + enableVerboseLogging(); + } + + final privateKeyString = Platform.environment['PRIVATE_KEY']; + if (privateKeyString == null) { + throw ArgumentError('Missing PRIVATE_KEY environment variable'); + } + final githubToken = Platform.environment['GITHUB_TOKEN']; + if (githubToken == null) { + throw ArgumentError('Missing GITHUB_TOKEN environment variable'); + } + final privateKey = HEX.decode(privateKeyString); + if (privateKey.length != 64) { + throw ArgumentError('Private key must be 64 bytes long'); + } + final manifestDir = argResults!['manifest-dir'] as String; + if (!Directory(manifestDir).existsSync()) { + throw ArgumentError('Manifest directory does not exist: $manifestDir'); + } + String? androidMinSdkVersionString = + argResults!['android-min-sdk-version'] as String?; + int? androidMinSdkVersion; + if (androidMinSdkVersionString != null) { + androidMinSdkVersion = int.tryParse(androidMinSdkVersionString); + if (androidMinSdkVersion == null) { + throw ArgumentError( + 'Invalid android-min-sdk-version: $androidMinSdkVersionString'); + } + } + final targetStrigns = argResults!['target'] as List; + final targets = targetStrigns.map((target) { + final res = Target.forRustTriple(target); + if (res == null) { + throw ArgumentError('Invalid target: $target'); + } + return res; + }).toList(growable: false); + final precompileBinaries = PrecompileBinaries( + privateKey: PrivateKey(privateKey), + githubToken: githubToken, + manifestDir: manifestDir, + repositorySlug: RepositorySlug.full(argResults!['repository'] as String), + targets: targets, + androidSdkLocation: argResults!['android-sdk-location'] as String?, + androidNdkVersion: argResults!['android-ndk-version'] as String?, + androidMinSdkVersion: androidMinSdkVersion, + tempDir: argResults!['temp-dir'] as String?, + ); + + await precompileBinaries.run(); + } +} + +class VerifyBinariesCommand extends Command { + VerifyBinariesCommand() { + argParser.addOption( + 'manifest-dir', + mandatory: true, + help: 'Directory containing Cargo.toml', + ); + } + + @override + final name = "verify-binaries"; + + @override + final description = 'Verifies published binaries\n' + 'Checks whether there is a binary published for each targets\n' + 'and checks the signature.'; + + @override + Future run() async { + final manifestDir = argResults!['manifest-dir'] as String; + final verifyBinaries = VerifyBinaries( + manifestDir: manifestDir, + ); + await verifyBinaries.run(); + } +} + +Future runMain(List args) async { + try { + // Init logging before options are loaded + initLogging(); + + if (Platform.environment['_CARGOKIT_NDK_LINK_TARGET'] != null) { + return AndroidEnvironment.clangLinkerWrapper(args); + } + + final runner = CommandRunner('build_tool', 'Cargokit built_tool') + ..addCommand(BuildPodCommand()) + ..addCommand(BuildGradleCommand()) + ..addCommand(BuildCMakeCommand()) + ..addCommand(GenKeyCommand()) + ..addCommand(PrecompileBinariesCommand()) + ..addCommand(VerifyBinariesCommand()); + + await runner.run(args); + } on ArgumentError catch (e) { + stderr.writeln(e.toString()); + exit(1); + } catch (e, s) { + log.severe(kDoubleSeparator); + log.severe('Cargokit BuildTool failed with error:'); + log.severe(kSeparator); + log.severe(e); + // This tells user to install Rust, there's no need to pollute the log with + // stack trace. + if (e is! RustupNotFoundException) { + log.severe(kSeparator); + log.severe(s); + log.severe(kSeparator); + log.severe('BuildTool arguments: $args'); + } + log.severe(kDoubleSeparator); + exit(1); + } +} diff --git a/build_tool/lib/src/builder.dart b/build_tool/lib/src/builder.dart new file mode 100644 index 00000000..570a5375 --- /dev/null +++ b/build_tool/lib/src/builder.dart @@ -0,0 +1,195 @@ +import 'package:collection/collection.dart'; +import 'package:logging/logging.dart'; +import 'package:path/path.dart' as path; + +import 'android_environment.dart'; +import 'cargo.dart'; +import 'environment.dart'; +import 'options.dart'; +import 'rustup.dart'; +import 'target.dart'; +import 'util.dart'; + +final _log = Logger('builder'); + +enum BuildConfiguration { + debug, + release, + profile, +} + +extension on BuildConfiguration { + bool get isDebug => this == BuildConfiguration.debug; + String get rustName => switch (this) { + BuildConfiguration.debug => 'debug', + BuildConfiguration.release => 'release', + BuildConfiguration.profile => 'release', + }; +} + +class BuildException implements Exception { + final String message; + + BuildException(this.message); + + @override + String toString() { + return 'BuildException: $message'; + } +} + +class BuildEnvironment { + final BuildConfiguration configuration; + final CargokitCrateOptions crateOptions; + final String targetTempDir; + final String manifestDir; + final CrateInfo crateInfo; + + final bool isAndroid; + final String? androidSdkPath; + final String? androidNdkVersion; + final int? androidMinSdkVersion; + final String? javaHome; + + BuildEnvironment({ + required this.configuration, + required this.crateOptions, + required this.targetTempDir, + required this.manifestDir, + required this.crateInfo, + required this.isAndroid, + this.androidSdkPath, + this.androidNdkVersion, + this.androidMinSdkVersion, + this.javaHome, + }); + + static BuildConfiguration parseBuildConfiguration(String value) { + // XCode configuration adds the flavor to configuration name. + final firstSegment = value.split('-').first; + final buildConfiguration = BuildConfiguration.values.firstWhereOrNull( + (e) => e.name == firstSegment, + ); + if (buildConfiguration == null) { + _log.warning('Unknown build configuraiton $value, will assume release'); + return BuildConfiguration.release; + } + return buildConfiguration; + } + + static BuildEnvironment fromEnvironment({ + required bool isAndroid, + }) { + final buildConfiguration = + parseBuildConfiguration(Environment.configuration); + final manifestDir = Environment.manifestDir; + final crateOptions = CargokitCrateOptions.load( + manifestDir: manifestDir, + ); + final crateInfo = CrateInfo.load(manifestDir); + return BuildEnvironment( + configuration: buildConfiguration, + crateOptions: crateOptions, + targetTempDir: Environment.targetTempDir, + manifestDir: manifestDir, + crateInfo: crateInfo, + isAndroid: isAndroid, + androidSdkPath: isAndroid ? Environment.sdkPath : null, + androidNdkVersion: isAndroid ? Environment.ndkVersion : null, + androidMinSdkVersion: + isAndroid ? int.parse(Environment.minSdkVersion) : null, + javaHome: isAndroid ? Environment.javaHome : null, + ); + } +} + +class RustBuilder { + final Target target; + final BuildEnvironment environment; + + RustBuilder({ + required this.target, + required this.environment, + }); + + void prepare( + Rustup rustup, + ) { + final toolchain = _toolchain; + if (rustup.installedTargets(toolchain) == null) { + rustup.installToolchain(toolchain); + } + if (toolchain == 'nightly') { + rustup.installRustSrcForNightly(); + } + if (!rustup.installedTargets(toolchain)!.contains(target.rust)) { + rustup.installTarget(target.rust, toolchain: toolchain); + } + } + + CargoBuildOptions? get _buildOptions => + environment.crateOptions.cargo[environment.configuration]; + + String get _toolchain => _buildOptions?.toolchain.name ?? 'stable'; + + /// Returns the path of directory containing build artifacts. + Future build() async { + final extraArgs = _buildOptions?.flags ?? []; + final manifestPath = path.join(environment.manifestDir, 'Cargo.toml'); + runCommand( + 'rustup', + [ + 'run', + _toolchain, + 'cargo', + 'build', + ...extraArgs, + '--manifest-path', + manifestPath, + '-p', + environment.crateInfo.packageName, + if (!environment.configuration.isDebug) '--release', + '--target', + target.rust, + '--target-dir', + environment.targetTempDir, + ], + environment: await _buildEnvironment(), + ); + return path.join( + environment.targetTempDir, + target.rust, + environment.configuration.rustName, + ); + } + + Future> _buildEnvironment() async { + if (target.android == null) { + return {}; + } else { + final sdkPath = environment.androidSdkPath; + final ndkVersion = environment.androidNdkVersion; + final minSdkVersion = environment.androidMinSdkVersion; + if (sdkPath == null) { + throw BuildException('androidSdkPath is not set'); + } + if (ndkVersion == null) { + throw BuildException('androidNdkVersion is not set'); + } + if (minSdkVersion == null) { + throw BuildException('androidMinSdkVersion is not set'); + } + final env = AndroidEnvironment( + sdkPath: sdkPath, + ndkVersion: ndkVersion, + minSdkVersion: minSdkVersion, + targetTempDir: environment.targetTempDir, + target: target, + ); + if (!env.ndkIsInstalled() && environment.javaHome != null) { + env.installNdk(javaHome: environment.javaHome!); + } + return env.buildEnvironment(); + } + } +} diff --git a/build_tool/lib/src/cargo.dart b/build_tool/lib/src/cargo.dart new file mode 100644 index 00000000..0d4483ff --- /dev/null +++ b/build_tool/lib/src/cargo.dart @@ -0,0 +1,45 @@ +import 'dart:io'; + +import 'package:path/path.dart' as path; +import 'package:toml/toml.dart'; + +class ManifestException { + ManifestException(this.message, {required this.fileName}); + + final String? fileName; + final String message; + + @override + String toString() { + if (fileName != null) { + return 'Failed to parse package manifest at $fileName: $message'; + } else { + return 'Failed to parse package manifest: $message'; + } + } +} + +class CrateInfo { + CrateInfo({required this.packageName}); + + final String packageName; + + static CrateInfo parseManifest(String manifest, {final String? fileName}) { + final toml = TomlDocument.parse(manifest); + final package = toml.toMap()['package']; + if (package == null) { + throw ManifestException('Missing package section', fileName: fileName); + } + final name = package['name']; + if (name == null) { + throw ManifestException('Missing package name', fileName: fileName); + } + return CrateInfo(packageName: name); + } + + static CrateInfo load(String manifestDir) { + final manifestFile = File(path.join(manifestDir, 'Cargo.toml')); + final manifest = manifestFile.readAsStringSync(); + return parseManifest(manifest, fileName: manifestFile.path); + } +} diff --git a/build_tool/lib/src/crate_hash.dart b/build_tool/lib/src/crate_hash.dart new file mode 100644 index 00000000..e58c37ff --- /dev/null +++ b/build_tool/lib/src/crate_hash.dart @@ -0,0 +1,121 @@ +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; + +import 'package:collection/collection.dart'; +import 'package:convert/convert.dart'; +import 'package:crypto/crypto.dart'; +import 'package:path/path.dart' as path; + +class CrateHash { + /// Computes a hash uniquely identifying crate content. This takes into account + /// content all all .rs files inside the src directory, as well as Cargo.toml, + /// Cargo.lock, build.rs and cargokit.yaml. + /// + /// If [tempStorage] is provided, computed hash is stored in a file in that directory + /// and reused on subsequent calls if the crate content hasn't changed. + static String compute(String manifestDir, {String? tempStorage}) { + return CrateHash._( + manifestDir: manifestDir, + tempStorage: tempStorage, + )._compute(); + } + + CrateHash._({ + required this.manifestDir, + required this.tempStorage, + }); + + String _compute() { + final files = getFiles(); + final tempStorage = this.tempStorage; + if (tempStorage != null) { + final quickHash = _computeQuickHash(files); + final quickHashFolder = Directory(path.join(tempStorage, 'crate_hash')); + quickHashFolder.createSync(recursive: true); + final quickHashFile = File(path.join(quickHashFolder.path, quickHash)); + if (quickHashFile.existsSync()) { + return quickHashFile.readAsStringSync(); + } + final hash = _computeHash(files); + quickHashFile.writeAsStringSync(hash); + return hash; + } else { + return _computeHash(files); + } + } + + /// Computes a quick hash based on files stat (without reading contents). This + /// is used to cache the real hash, which is slower to compute since it involves + /// reading every single file. + String _computeQuickHash(List files) { + final output = AccumulatorSink(); + final input = sha256.startChunkedConversion(output); + + final data = ByteData(8); + for (final file in files) { + input.add(utf8.encode(file.path)); + final stat = file.statSync(); + data.setUint64(0, stat.size); + input.add(data.buffer.asUint8List()); + data.setUint64(0, stat.modified.millisecondsSinceEpoch); + input.add(data.buffer.asUint8List()); + } + + input.close(); + return base64Url.encode(output.events.single.bytes); + } + + String _computeHash(List files) { + final output = AccumulatorSink(); + final input = sha256.startChunkedConversion(output); + + void addTextFile(File file) { + // text Files are hashed by lines in case we're dealing with github checkout + // that auto-converts line endings. + final splitter = LineSplitter(); + if (file.existsSync()) { + final data = file.readAsStringSync(); + final lines = splitter.convert(data); + for (final line in lines) { + input.add(utf8.encode(line)); + } + } + } + + for (final file in files) { + addTextFile(file); + } + + input.close(); + final res = output.events.single; + + // Truncate to 128bits. + final hash = res.bytes.sublist(0, 16); + return hex.encode(hash); + } + + List getFiles() { + final src = Directory(path.join(manifestDir, 'src')); + final files = src + .listSync(recursive: true, followLinks: false) + .whereType() + .toList(); + files.sortBy((element) => element.path); + void addFile(String relative) { + final file = File(path.join(manifestDir, relative)); + if (file.existsSync()) { + files.add(file); + } + } + + addFile('Cargo.toml'); + addFile('Cargo.lock'); + addFile('build.rs'); + addFile('cargokit.yaml'); + return files; + } + + final String manifestDir; + final String? tempStorage; +} diff --git a/build_tool/lib/src/environment.dart b/build_tool/lib/src/environment.dart new file mode 100644 index 00000000..1d267edb --- /dev/null +++ b/build_tool/lib/src/environment.dart @@ -0,0 +1,65 @@ +import 'dart:io'; + +extension on String { + String resolveSymlink() => File(this).resolveSymbolicLinksSync(); +} + +class Environment { + /// Current build configuration (debug or release). + static String get configuration => + _getEnv("CARGOKIT_CONFIGURATION").toLowerCase(); + + static bool get isDebug => configuration == 'debug'; + static bool get isRelease => configuration == 'release'; + + /// Temporary directory where Rust build artifacts are placed. + static String get targetTempDir => _getEnv("CARGOKIT_TARGET_TEMP_DIR"); + + /// Final output directory where the build artifacts are placed. + static String get outputDir => _getEnvPath('CARGOKIT_OUTPUT_DIR'); + + /// Path to the crate manifest (containing Cargo.toml). + static String get manifestDir => _getEnvPath('CARGOKIT_MANIFEST_DIR'); + + /// Directory inside root project. Not necessarily root folder. Symlinks are + /// not resolved on purpose. + static String get rootProjectDir => _getEnv('CARGOKIT_ROOT_PROJECT_DIR'); + + // Pod + + /// Platform name (macosx, iphoneos, iphonesimulator). + static String get darwinPlatformName => + _getEnv("CARGOKIT_DARWIN_PLATFORM_NAME"); + + /// List of architectures to build for (arm64, armv7, x86_64). + static List get darwinArchs => + _getEnv("CARGOKIT_DARWIN_ARCHS").split(' '); + + // Gradle + static String get minSdkVersion => _getEnv("CARGOKIT_MIN_SDK_VERSION"); + static String get ndkVersion => _getEnv("CARGOKIT_NDK_VERSION"); + static String get sdkPath => _getEnvPath("CARGOKIT_SDK_DIR"); + static String get javaHome => _getEnvPath("CARGOKIT_JAVA_HOME"); + static List get targetPlatforms => + _getEnv("CARGOKIT_TARGET_PLATFORMS").split(','); + + // CMAKE + static String get targetPlatform => _getEnv("CARGOKIT_TARGET_PLATFORM"); + + static String _getEnv(String key) { + final res = Platform.environment[key]; + if (res == null) { + throw Exception("Missing environment variable $key"); + } + return res; + } + + static String _getEnvPath(String key) { + final res = _getEnv(key); + if (Directory(res).existsSync()) { + return res.resolveSymlink(); + } else { + return res; + } + } +} diff --git a/build_tool/lib/src/logging.dart b/build_tool/lib/src/logging.dart new file mode 100644 index 00000000..06392b99 --- /dev/null +++ b/build_tool/lib/src/logging.dart @@ -0,0 +1,49 @@ +import 'dart:io'; + +import 'package:logging/logging.dart'; + +const String kSeparator = "--"; +const String kDoubleSeparator = "=="; + +bool _lastMessageWasSeparator = false; + +void _log(LogRecord rec) { + final prefix = '${rec.level.name}: '; + final out = rec.level == Level.SEVERE ? stderr : stdout; + if (rec.message == kSeparator) { + if (!_lastMessageWasSeparator) { + out.write(prefix); + out.writeln('-' * 80); + _lastMessageWasSeparator = true; + } + return; + } else if (rec.message == kDoubleSeparator) { + out.write(prefix); + out.writeln('=' * 80); + _lastMessageWasSeparator = true; + return; + } + out.write(prefix); + out.writeln(rec.message); + _lastMessageWasSeparator = false; +} + +void initLogging() { + Logger.root.level = Level.INFO; + Logger.root.onRecord.listen((LogRecord rec) { + final lines = rec.message.split('\n'); + for (final line in lines) { + if (line.isNotEmpty || lines.length == 1 || line != lines.last) { + _log(LogRecord( + rec.level, + line, + rec.loggerName, + )); + } + } + }); +} + +void enableVerboseLogging() { + Logger.root.level = Level.ALL; +} diff --git a/build_tool/lib/src/options.dart b/build_tool/lib/src/options.dart new file mode 100644 index 00000000..7937dcac --- /dev/null +++ b/build_tool/lib/src/options.dart @@ -0,0 +1,306 @@ +import 'dart:io'; + +import 'package:collection/collection.dart'; +import 'package:ed25519_edwards/ed25519_edwards.dart'; +import 'package:hex/hex.dart'; +import 'package:logging/logging.dart'; +import 'package:path/path.dart' as path; +import 'package:source_span/source_span.dart'; +import 'package:yaml/yaml.dart'; + +import 'builder.dart'; +import 'environment.dart'; +import 'rustup.dart'; + +final _log = Logger('options'); + +/// A class for exceptions that have source span information attached. +class SourceSpanException implements Exception { + // This is a getter so that subclasses can override it. + /// A message describing the exception. + String get message => _message; + final String _message; + + // This is a getter so that subclasses can override it. + /// The span associated with this exception. + /// + /// This may be `null` if the source location can't be determined. + SourceSpan? get span => _span; + final SourceSpan? _span; + + SourceSpanException(this._message, this._span); + + /// Returns a string representation of `this`. + /// + /// [color] may either be a [String], a [bool], or `null`. If it's a string, + /// it indicates an ANSI terminal color escape that should be used to + /// highlight the span's text. If it's `true`, it indicates that the text + /// should be highlighted using the default color. If it's `false` or `null`, + /// it indicates that the text shouldn't be highlighted. + @override + String toString({Object? color}) { + if (span == null) return message; + return 'Error on ${span!.message(message, color: color)}'; + } +} + +enum Toolchain { + stable, + beta, + nightly, +} + +class CargoBuildOptions { + final Toolchain toolchain; + final List flags; + + CargoBuildOptions({ + required this.toolchain, + required this.flags, + }); + + static Toolchain _toolchainFromNode(YamlNode node) { + if (node case YamlScalar(value: String name)) { + final toolchain = + Toolchain.values.firstWhereOrNull((element) => element.name == name); + if (toolchain != null) { + return toolchain; + } + } + throw SourceSpanException( + 'Unknown toolchain. Must be one of ${Toolchain.values.map((e) => e.name)}.', + node.span); + } + + static CargoBuildOptions parse(YamlNode node) { + if (node is! YamlMap) { + throw SourceSpanException('Cargo options must be a map', node.span); + } + Toolchain toolchain = Toolchain.stable; + List flags = []; + for (final MapEntry(:key, :value) in node.nodes.entries) { + if (key case YamlScalar(value: 'toolchain')) { + toolchain = _toolchainFromNode(value); + } else if (key case YamlScalar(value: 'extra_flags')) { + if (value case YamlList(nodes: List list)) { + if (list.every((element) { + if (element case YamlScalar(value: String _)) { + return true; + } + return false; + })) { + flags = list.map((e) => e.value as String).toList(); + continue; + } + } + throw SourceSpanException( + 'Extra flags must be a list of strings', value.span); + } else { + throw SourceSpanException( + 'Unknown cargo option type. Must be "toolchain" or "extra_flags".', + key.span); + } + } + return CargoBuildOptions(toolchain: toolchain, flags: flags); + } +} + +extension on YamlMap { + /// Map that extracts keys so that we can do map case check on them. + Map get valueMap => + nodes.map((key, value) => MapEntry(key.value, value)); +} + +class PrecompiledBinaries { + final String uriPrefix; + final PublicKey publicKey; + + PrecompiledBinaries({ + required this.uriPrefix, + required this.publicKey, + }); + + static PublicKey _publicKeyFromHex(String key, SourceSpan? span) { + final bytes = HEX.decode(key); + if (bytes.length != 32) { + throw SourceSpanException( + 'Invalid public key. Must be 32 bytes long.', span); + } + return PublicKey(bytes); + } + + static PrecompiledBinaries parse(YamlNode node) { + if (node case YamlMap(valueMap: Map map)) { + if (map + case { + 'url_prefix': YamlNode urlPrefixNode, + 'public_key': YamlNode publicKeyNode, + }) { + final urlPrefix = switch (urlPrefixNode) { + YamlScalar(value: String urlPrefix) => urlPrefix, + _ => throw SourceSpanException( + 'Invalid URL prefix value.', urlPrefixNode.span), + }; + final publicKey = switch (publicKeyNode) { + YamlScalar(value: String publicKey) => + _publicKeyFromHex(publicKey, publicKeyNode.span), + _ => throw SourceSpanException( + 'Invalid public key value.', publicKeyNode.span), + }; + return PrecompiledBinaries( + uriPrefix: urlPrefix, + publicKey: publicKey, + ); + } + } + throw SourceSpanException( + 'Invalid precompiled binaries value. ' + 'Expected Map with "url_prefix" and "public_key".', + node.span); + } +} + +/// Cargokit options specified for Rust crate. +class CargokitCrateOptions { + CargokitCrateOptions({ + this.cargo = const {}, + this.precompiledBinaries, + }); + + final Map cargo; + final PrecompiledBinaries? precompiledBinaries; + + static CargokitCrateOptions parse(YamlNode node) { + if (node is! YamlMap) { + throw SourceSpanException('Cargokit options must be a map', node.span); + } + final options = {}; + PrecompiledBinaries? precompiledBinaries; + + for (final entry in node.nodes.entries) { + if (entry + case MapEntry( + key: YamlScalar(value: 'cargo'), + value: YamlNode node, + )) { + if (node is! YamlMap) { + throw SourceSpanException('Cargo options must be a map', node.span); + } + for (final MapEntry(:YamlNode key, :value) in node.nodes.entries) { + if (key case YamlScalar(value: String name)) { + final configuration = BuildConfiguration.values + .firstWhereOrNull((element) => element.name == name); + if (configuration != null) { + options[configuration] = CargoBuildOptions.parse(value); + continue; + } + } + throw SourceSpanException( + 'Unknown build configuration. Must be one of ${BuildConfiguration.values.map((e) => e.name)}.', + key.span); + } + } else if (entry.key case YamlScalar(value: 'precompiled_binaries')) { + precompiledBinaries = PrecompiledBinaries.parse(entry.value); + } else { + throw SourceSpanException( + 'Unknown cargokit option type. Must be "cargo" or "precompiled_binaries".', + entry.key.span); + } + } + return CargokitCrateOptions( + cargo: options, + precompiledBinaries: precompiledBinaries, + ); + } + + static CargokitCrateOptions load({ + required String manifestDir, + }) { + final uri = Uri.file(path.join(manifestDir, "cargokit.yaml")); + final file = File.fromUri(uri); + if (file.existsSync()) { + final contents = loadYamlNode(file.readAsStringSync(), sourceUrl: uri); + return parse(contents); + } else { + return CargokitCrateOptions(); + } + } +} + +class CargokitUserOptions { + // When Rustup is installed always build locally unless user opts into + // using precompiled binaries. + static bool defaultUsePrecompiledBinaries() { + return Rustup.executablePath() == null; + } + + CargokitUserOptions({ + required this.usePrecompiledBinaries, + required this.verboseLogging, + }); + + CargokitUserOptions._() + : usePrecompiledBinaries = defaultUsePrecompiledBinaries(), + verboseLogging = false; + + static CargokitUserOptions parse(YamlNode node) { + if (node is! YamlMap) { + throw SourceSpanException('Cargokit options must be a map', node.span); + } + bool usePrecompiledBinaries = defaultUsePrecompiledBinaries(); + bool verboseLogging = false; + + for (final entry in node.nodes.entries) { + if (entry.key case YamlScalar(value: 'use_precompiled_binaries')) { + if (entry.value case YamlScalar(value: bool value)) { + usePrecompiledBinaries = value; + continue; + } + throw SourceSpanException( + 'Invalid value for "use_precompiled_binaries". Must be a boolean.', + entry.value.span); + } else if (entry.key case YamlScalar(value: 'verbose_logging')) { + if (entry.value case YamlScalar(value: bool value)) { + verboseLogging = value; + continue; + } + throw SourceSpanException( + 'Invalid value for "verbose_logging". Must be a boolean.', + entry.value.span); + } else { + throw SourceSpanException( + 'Unknown cargokit option type. Must be "use_precompiled_binaries" or "verbose_logging".', + entry.key.span); + } + } + return CargokitUserOptions( + usePrecompiledBinaries: usePrecompiledBinaries, + verboseLogging: verboseLogging, + ); + } + + static CargokitUserOptions load() { + String fileName = "cargokit_options.yaml"; + var userProjectDir = Directory(Environment.rootProjectDir); + + while (userProjectDir.parent.path != userProjectDir.path) { + final configFile = File(path.join(userProjectDir.path, fileName)); + if (configFile.existsSync()) { + final contents = loadYamlNode( + configFile.readAsStringSync(), + sourceUrl: configFile.uri, + ); + final res = parse(contents); + if (res.verboseLogging) { + _log.info('Found user options file at ${configFile.path}'); + } + return res; + } + userProjectDir = userProjectDir.parent; + } + return CargokitUserOptions._(); + } + + final bool usePrecompiledBinaries; + final bool verboseLogging; +} diff --git a/build_tool/lib/src/precompile_binaries.dart b/build_tool/lib/src/precompile_binaries.dart new file mode 100644 index 00000000..39ffafc4 --- /dev/null +++ b/build_tool/lib/src/precompile_binaries.dart @@ -0,0 +1,199 @@ +import 'dart:io'; + +import 'package:ed25519_edwards/ed25519_edwards.dart'; +import 'package:github/github.dart'; +import 'package:logging/logging.dart'; +import 'package:path/path.dart' as path; + +import 'artifacts_provider.dart'; +import 'builder.dart'; +import 'cargo.dart'; +import 'crate_hash.dart'; +import 'options.dart'; +import 'rustup.dart'; +import 'target.dart'; + +final _log = Logger('precompile_binaries'); + +class PrecompileBinaries { + PrecompileBinaries({ + required this.privateKey, + required this.githubToken, + required this.repositorySlug, + required this.manifestDir, + required this.targets, + this.androidSdkLocation, + this.androidNdkVersion, + this.androidMinSdkVersion, + this.tempDir, + }); + + final PrivateKey privateKey; + final String githubToken; + final RepositorySlug repositorySlug; + final String manifestDir; + final List targets; + final String? androidSdkLocation; + final String? androidNdkVersion; + final int? androidMinSdkVersion; + final String? tempDir; + + static String fileName(Target target, String name) { + return '${target.rust}_$name'; + } + + static String signatureFileName(Target target, String name) { + return '${target.rust}_$name.sig'; + } + + Future run() async { + final crateInfo = CrateInfo.load(manifestDir); + + final targets = List.of(this.targets); + if (targets.isEmpty) { + targets.addAll([ + ...Target.buildableTargets(), + if (androidSdkLocation != null) ...Target.androidTargets(), + ]); + } + + _log.info('Precompiling binaries for $targets'); + + final hash = CrateHash.compute(manifestDir); + _log.info('Computed crate hash: $hash'); + + final String tagName = 'precompiled_$hash'; + + final github = GitHub(auth: Authentication.withToken(githubToken)); + final repo = github.repositories; + final release = await _getOrCreateRelease( + repo: repo, + tagName: tagName, + packageName: crateInfo.packageName, + hash: hash, + ); + + final tempDir = this.tempDir != null + ? Directory(this.tempDir!) + : Directory.systemTemp.createTempSync('precompiled_'); + + tempDir.createSync(recursive: true); + + final crateOptions = CargokitCrateOptions.load( + manifestDir: manifestDir, + ); + + final buildEnvironment = BuildEnvironment( + configuration: BuildConfiguration.release, + crateOptions: crateOptions, + targetTempDir: tempDir.path, + manifestDir: manifestDir, + crateInfo: crateInfo, + isAndroid: androidSdkLocation != null, + androidSdkPath: androidSdkLocation, + androidNdkVersion: androidNdkVersion, + androidMinSdkVersion: androidMinSdkVersion, + ); + + final rustup = Rustup(); + + for (final target in targets) { + final artifactNames = getArtifactNames( + target: target, + libraryName: crateInfo.packageName, + remote: true, + ); + + if (artifactNames.every((name) { + final fileName = PrecompileBinaries.fileName(target, name); + return (release.assets ?? []).any((e) => e.name == fileName); + })) { + _log.info("All artifacts for $target already exist - skipping"); + continue; + } + + _log.info('Building for $target'); + + final builder = + RustBuilder(target: target, environment: buildEnvironment); + builder.prepare(rustup); + final res = await builder.build(); + + final assets = []; + for (final name in artifactNames) { + final file = File(path.join(res, name)); + if (!file.existsSync()) { + throw Exception('Missing artifact: ${file.path}'); + } + + final data = file.readAsBytesSync(); + final create = CreateReleaseAsset( + name: PrecompileBinaries.fileName(target, name), + contentType: "application/octet-stream", + assetData: data, + ); + final signature = sign(privateKey, data); + final signatureCreate = CreateReleaseAsset( + name: signatureFileName(target, name), + contentType: "application/octet-stream", + assetData: signature, + ); + bool verified = verify(public(privateKey), data, signature); + if (!verified) { + throw Exception('Signature verification failed'); + } + assets.add(create); + assets.add(signatureCreate); + } + _log.info('Uploading assets: ${assets.map((e) => e.name)}'); + for (final asset in assets) { + // This seems to be failing on CI so do it one by one + int retryCount = 0; + while (true) { + try { + await repo.uploadReleaseAssets(release, [asset]); + break; + } on Exception catch (e) { + if (retryCount == 10) { + rethrow; + } + ++retryCount; + _log.shout( + 'Upload failed (attempt $retryCount, will retry): ${e.toString()}'); + await Future.delayed(Duration(seconds: 2)); + } + } + } + } + + _log.info('Cleaning up'); + tempDir.deleteSync(recursive: true); + } + + Future _getOrCreateRelease({ + required RepositoriesService repo, + required String tagName, + required String packageName, + required String hash, + }) async { + Release release; + try { + _log.info('Fetching release $tagName'); + release = await repo.getReleaseByTagName(repositorySlug, tagName); + } on ReleaseNotFound { + _log.info('Release not found - creating release $tagName'); + release = await repo.createRelease( + repositorySlug, + CreateRelease.from( + tagName: tagName, + name: 'Precompiled binaries ${hash.substring(0, 8)}', + targetCommitish: null, + isDraft: false, + isPrerelease: false, + body: 'Precompiled binaries for crate $packageName, ' + 'crate hash $hash.', + )); + } + return release; + } +} diff --git a/build_tool/lib/src/rustup.dart b/build_tool/lib/src/rustup.dart new file mode 100644 index 00000000..f284179a --- /dev/null +++ b/build_tool/lib/src/rustup.dart @@ -0,0 +1,133 @@ +import 'dart:io'; + +import 'package:collection/collection.dart'; +import 'package:path/path.dart' as path; + +import 'util.dart'; + +class _Toolchain { + _Toolchain( + this.name, + this.targets, + ); + + final String name; + final List targets; +} + +class Rustup { + List? installedTargets(String toolchain) { + final targets = _installedTargets(toolchain); + return targets != null ? List.unmodifiable(targets) : null; + } + + void installToolchain(String toolchain) { + log.info("Installing Rust toolchain: $toolchain"); + runCommand("rustup", ['toolchain', 'install', toolchain]); + _installedToolchains + .add(_Toolchain(toolchain, _getInstalledTargets(toolchain))); + } + + void installTarget( + String target, { + required String toolchain, + }) { + log.info("Installing Rust target: $target"); + runCommand("rustup", [ + 'target', + 'add', + '--toolchain', + toolchain, + target, + ]); + _installedTargets(toolchain)?.add(target); + } + + final List<_Toolchain> _installedToolchains; + + Rustup() : _installedToolchains = _getInstalledToolchains(); + + List? _installedTargets(String toolchain) => _installedToolchains + .firstWhereOrNull( + (e) => e.name == toolchain || e.name.startsWith('$toolchain-')) + ?.targets; + + static List<_Toolchain> _getInstalledToolchains() { + String extractToolchainName(String line) { + // ignore (default) after toolchain name + final parts = line.split(' '); + return parts[0]; + } + + final res = runCommand("rustup", ['toolchain', 'list']); + + // To list all non-custom toolchains, we need to filter out lines that + // don't start with "stable", "beta", or "nightly". + Pattern nonCustom = RegExp(r"^(stable|beta|nightly)"); + final lines = res.stdout + .toString() + .split('\n') + .where((e) => e.isNotEmpty && e.startsWith(nonCustom)) + .map(extractToolchainName) + .toList(growable: true); + + return lines + .map( + (name) => _Toolchain( + name, + _getInstalledTargets(name), + ), + ) + .toList(growable: true); + } + + static List _getInstalledTargets(String toolchain) { + final res = runCommand("rustup", [ + 'target', + 'list', + '--toolchain', + toolchain, + '--installed', + ]); + final lines = res.stdout + .toString() + .split('\n') + .where((e) => e.isNotEmpty) + .toList(growable: true); + return lines; + } + + bool _didInstallRustSrcForNightly = false; + + void installRustSrcForNightly() { + if (_didInstallRustSrcForNightly) { + return; + } + // Useful for -Z build-std + runCommand( + "rustup", + ['component', 'add', 'rust-src', '--toolchain', 'nightly'], + ); + _didInstallRustSrcForNightly = true; + } + + static String? executablePath() { + final envPath = Platform.environment['PATH']; + final envPathSeparator = Platform.isWindows ? ';' : ':'; + final home = Platform.isWindows + ? Platform.environment['USERPROFILE'] + : Platform.environment['HOME']; + final paths = [ + if (home != null) path.join(home, '.cargo', 'bin'), + if (envPath != null) ...envPath.split(envPathSeparator), + ]; + for (final p in paths) { + final rustup = Platform.isWindows ? 'rustup.exe' : 'rustup'; + final rustupPath = path.join(p, rustup); + if (File(rustupPath).existsSync()) { + return rustupPath; + } + } + return null; + } +} diff --git a/build_tool/lib/src/target.dart b/build_tool/lib/src/target.dart new file mode 100644 index 00000000..9287b23c --- /dev/null +++ b/build_tool/lib/src/target.dart @@ -0,0 +1,137 @@ +import 'dart:io'; + +import 'package:collection/collection.dart'; + +import 'util.dart'; + +class Target { + Target({ + required this.rust, + this.flutter, + this.android, + this.androidMinSdkVersion, + this.darwinPlatform, + this.darwinArch, + }); + + static final all = [ + Target( + rust: 'armv7-linux-androideabi', + flutter: 'android-arm', + android: 'armeabi-v7a', + androidMinSdkVersion: 16, + ), + Target( + rust: 'aarch64-linux-android', + flutter: 'android-arm64', + android: 'arm64-v8a', + androidMinSdkVersion: 21, + ), + Target( + rust: 'i686-linux-android', + flutter: 'android-x86', + android: 'x86', + androidMinSdkVersion: 16, + ), + Target( + rust: 'x86_64-linux-android', + flutter: 'android-x64', + android: 'x86_64', + androidMinSdkVersion: 21, + ), + Target( + rust: 'x86_64-pc-windows-msvc', + flutter: 'windows-x64', + ), + Target( + rust: 'x86_64-unknown-linux-gnu', + flutter: 'linux-x64', + ), + Target( + rust: 'aarch64-unknown-linux-gnu', + flutter: 'linux-arm64', + ), + Target( + rust: 'x86_64-apple-darwin', + darwinPlatform: 'macosx', + darwinArch: 'x86_64', + ), + Target( + rust: 'aarch64-apple-darwin', + darwinPlatform: 'macosx', + darwinArch: 'arm64', + ), + Target( + rust: 'aarch64-apple-ios', + darwinPlatform: 'iphoneos', + darwinArch: 'arm64', + ), + Target( + rust: 'aarch64-apple-ios-sim', + darwinPlatform: 'iphonesimulator', + darwinArch: 'arm64', + ), + Target( + rust: 'x86_64-apple-ios', + darwinPlatform: 'iphonesimulator', + darwinArch: 'x86_64', + ), + ]; + + static Target? forFlutterName(String flutterName) { + return all.firstWhereOrNull((element) => element.flutter == flutterName); + } + + static Target? forDarwin({ + required String platformName, + required String darwinAarch, + }) { + return all.firstWhereOrNull((element) => // + element.darwinPlatform == platformName && + element.darwinArch == darwinAarch); + } + + static Target? forRustTriple(String triple) { + return all.firstWhereOrNull((element) => element.rust == triple); + } + + static List androidTargets() { + return all + .where((element) => element.android != null) + .toList(growable: false); + } + + /// Returns buildable targets on current host platform ignoring Android targets. + static List buildableTargets() { + if (Platform.isLinux) { + // Right now we don't support cross-compiling on Linux. So we just return + // the host target. + final arch = runCommand('arch', []).stdout as String; + if (arch.trim() == 'aarch64') { + return [Target.forRustTriple('aarch64-unknown-linux-gnu')!]; + } else { + return [Target.forRustTriple('x86_64-unknown-linux-gnu')!]; + } + } + return all.where((target) { + if (Platform.isWindows) { + return target.rust.contains('-windows-'); + } else if (Platform.isMacOS) { + return target.darwinPlatform != null; + } + return false; + }).toList(growable: false); + } + + @override + String toString() { + return rust; + } + + final String? flutter; + final String rust; + final String? android; + final int? androidMinSdkVersion; + final String? darwinPlatform; + final String? darwinArch; +} diff --git a/build_tool/lib/src/util.dart b/build_tool/lib/src/util.dart new file mode 100644 index 00000000..d8e30196 --- /dev/null +++ b/build_tool/lib/src/util.dart @@ -0,0 +1,169 @@ +import 'dart:convert'; +import 'dart:io'; + +import 'package:logging/logging.dart'; +import 'package:path/path.dart' as path; + +import 'logging.dart'; +import 'rustup.dart'; + +final log = Logger("process"); + +class CommandFailedException implements Exception { + final String executable; + final List arguments; + final ProcessResult result; + + CommandFailedException({ + required this.executable, + required this.arguments, + required this.result, + }); + + @override + String toString() { + final stdout = result.stdout.toString().trim(); + final stderr = result.stderr.toString().trim(); + return [ + "External Command: $executable ${arguments.map((e) => '"$e"').join(' ')}", + "Returned Exit Code: ${result.exitCode}", + kSeparator, + "STDOUT:", + if (stdout.isNotEmpty) stdout, + kSeparator, + "STDERR:", + if (stderr.isNotEmpty) stderr, + ].join('\n'); + } +} + +class TestRunCommandArgs { + final String executable; + final List arguments; + final String? workingDirectory; + final Map? environment; + final bool includeParentEnvironment; + final bool runInShell; + final Encoding? stdoutEncoding; + final Encoding? stderrEncoding; + + TestRunCommandArgs({ + required this.executable, + required this.arguments, + this.workingDirectory, + this.environment, + this.includeParentEnvironment = true, + this.runInShell = false, + this.stdoutEncoding, + this.stderrEncoding, + }); +} + +class TestRunCommandResult { + TestRunCommandResult({ + this.pid = 1, + this.exitCode = 0, + this.stdout = '', + this.stderr = '', + }); + + final int pid; + final int exitCode; + final String stdout; + final String stderr; +} + +TestRunCommandResult Function(TestRunCommandArgs args)? testRunCommandOverride; + +ProcessResult runCommand( + String executable, + List arguments, { + String? workingDirectory, + Map? environment, + bool includeParentEnvironment = true, + bool runInShell = false, + Encoding? stdoutEncoding = systemEncoding, + Encoding? stderrEncoding = systemEncoding, +}) { + if (testRunCommandOverride != null) { + final result = testRunCommandOverride!(TestRunCommandArgs( + executable: executable, + arguments: arguments, + workingDirectory: workingDirectory, + environment: environment, + includeParentEnvironment: includeParentEnvironment, + runInShell: runInShell, + stdoutEncoding: stdoutEncoding, + stderrEncoding: stderrEncoding, + )); + return ProcessResult( + result.pid, + result.exitCode, + result.stdout, + result.stderr, + ); + } + log.finer('Running command $executable ${arguments.join(' ')}'); + final res = Process.runSync( + _resolveExecutable(executable), + arguments, + workingDirectory: workingDirectory, + environment: environment, + includeParentEnvironment: includeParentEnvironment, + runInShell: runInShell, + stderrEncoding: stderrEncoding, + stdoutEncoding: stdoutEncoding, + ); + if (res.exitCode != 0) { + throw CommandFailedException( + executable: executable, + arguments: arguments, + result: res, + ); + } else { + return res; + } +} + +class RustupNotFoundException implements Exception { + @override + String toString() { + return [ + ' ', + 'rustup not found in PATH.', + ' ', + 'Maybe you need to install Rust? It only takes a minute:', + ' ', + if (Platform.isWindows) 'https://www.rust-lang.org/tools/install', + if (hasHomebrewRustInPath()) ...[ + '\$ brew unlink rust # Unlink homebrew Rust from PATH', + ], + if (!Platform.isWindows) + "\$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh", + ' ', + ].join('\n'); + } + + static bool hasHomebrewRustInPath() { + if (!Platform.isMacOS) { + return false; + } + final envPath = Platform.environment['PATH'] ?? ''; + final paths = envPath.split(':'); + return paths.any((p) { + return p.contains('homebrew') && File(path.join(p, 'rustc')).existsSync(); + }); + } +} + +String _resolveExecutable(String executable) { + if (executable == 'rustup') { + final resolved = Rustup.executablePath(); + if (resolved != null) { + return resolved; + } + throw RustupNotFoundException(); + } else { + return executable; + } +} diff --git a/build_tool/lib/src/verify_binaries.dart b/build_tool/lib/src/verify_binaries.dart new file mode 100644 index 00000000..0094c644 --- /dev/null +++ b/build_tool/lib/src/verify_binaries.dart @@ -0,0 +1,81 @@ +import 'dart:io'; + +import 'package:ed25519_edwards/ed25519_edwards.dart'; +import 'package:http/http.dart'; + +import 'artifacts_provider.dart'; +import 'cargo.dart'; +import 'crate_hash.dart'; +import 'options.dart'; +import 'precompile_binaries.dart'; +import 'target.dart'; + +class VerifyBinaries { + VerifyBinaries({ + required this.manifestDir, + }); + + final String manifestDir; + + Future run() async { + final crateInfo = CrateInfo.load(manifestDir); + + final config = CargokitCrateOptions.load(manifestDir: manifestDir); + final precompiledBinaries = config.precompiledBinaries; + if (precompiledBinaries == null) { + stdout.writeln('Crate does not support precompiled binaries.'); + } else { + final crateHash = CrateHash.compute(manifestDir); + stdout.writeln('Crate hash: $crateHash'); + + for (final target in Target.all) { + final message = 'Checking ${target.rust}...'; + stdout.write(message.padRight(40)); + stdout.flush(); + + final artifacts = getArtifactNames( + target: target, + libraryName: crateInfo.packageName, + remote: true, + ); + + final prefix = precompiledBinaries.uriPrefix; + + bool ok = true; + + for (final artifact in artifacts) { + final fileName = PrecompileBinaries.fileName(target, artifact); + final signatureFileName = + PrecompileBinaries.signatureFileName(target, artifact); + + final url = Uri.parse('$prefix$crateHash/$fileName'); + final signatureUrl = + Uri.parse('$prefix$crateHash/$signatureFileName'); + + final signature = await get(signatureUrl); + if (signature.statusCode != 200) { + stdout.writeln('MISSING'); + ok = false; + break; + } + final asset = await get(url); + if (asset.statusCode != 200) { + stdout.writeln('MISSING'); + ok = false; + break; + } + + if (!verify(precompiledBinaries.publicKey, asset.bodyBytes, + signature.bodyBytes)) { + stdout.writeln('INVALID SIGNATURE'); + ok = false; + } + } + + if (ok) { + stdout.writeln('OK'); + } + } + } + } +} diff --git a/example/pubspec.lock b/build_tool/pubspec.lock similarity index 57% rename from example/pubspec.lock rename to build_tool/pubspec.lock index d3df3614..343bdd36 100644 --- a/example/pubspec.lock +++ b/build_tool/pubspec.lock @@ -5,26 +5,34 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 url: "https://pub.dev" source: hosted - version: "67.0.0" + version: "64.0.0" + adaptive_number: + dependency: transitive + description: + name: adaptive_number + sha256: "3a567544e9b5c9c803006f51140ad544aedc79604fd4f3f2c1380003f97c1d77" + url: "https://pub.dev" + source: hosted + version: "1.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" url: "https://pub.dev" source: hosted - version: "6.4.1" + version: "6.2.0" args: - dependency: transitive + dependency: "direct main" description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.4.2" async: dependency: transitive description: @@ -33,13 +41,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" - bdk_flutter: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "0.31.3" boolean_selector: dependency: transitive description: @@ -48,64 +49,8 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - build_cli_annotations: - dependency: transitive - description: - name: build_cli_annotations - sha256: b59d2769769efd6c9ff6d4c4cede0be115a566afc591705c2040b707534b1172 - url: "https://pub.dev" - source: hosted - version: "2.1.0" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb - url: "https://pub.dev" - source: hosted - version: "8.9.2" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 - url: "https://pub.dev" - source: hosted - version: "4.10.0" collection: - dependency: transitive + dependency: "direct main" description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a @@ -113,160 +58,135 @@ packages: source: hosted version: "1.18.0" convert: - dependency: transitive + dependency: "direct main" description: name: convert sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" url: "https://pub.dev" source: hosted version: "3.1.1" - crypto: + coverage: dependency: transitive + description: + name: coverage + sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + url: "https://pub.dev" + source: hosted + version: "1.6.3" + crypto: + dependency: "direct main" description: name: crypto sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted version: "3.0.3" - cupertino_icons: + ed25519_edwards: dependency: "direct main" description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + name: ed25519_edwards + sha256: "6ce0112d131327ec6d42beede1e5dfd526069b18ad45dcf654f15074ad9276cd" url: "https://pub.dev" source: hosted - version: "1.0.8" - dart_style: + version: "0.3.1" + file: dependency: transitive description: - name: dart_style - sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" url: "https://pub.dev" source: hosted - version: "2.3.6" - fake_async: + version: "6.1.4" + fixnum: dependency: transitive description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.3.1" - ffi: + version: "1.1.0" + frontend_server_client: dependency: transitive description: - name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" url: "https://pub.dev" source: hosted - version: "2.1.3" - file: - dependency: transitive + version: "3.2.0" + github: + dependency: "direct main" description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + name: github + sha256: "9966bc13bf612342e916b0a343e95e5f046c88f602a14476440e9b75d2295411" url: "https://pub.dev" source: hosted - version: "7.0.0" - fixnum: + version: "9.17.0" + glob: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: + version: "2.1.2" + hex: dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_driver: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 - url: "https://pub.dev" - source: hosted - version: "2.0.3" - flutter_rust_bridge: - dependency: transitive description: - name: flutter_rust_bridge - sha256: f703c4b50e253e53efc604d50281bbaefe82d615856f8ae1e7625518ae252e98 + name: hex + sha256: "4e7cd54e4b59ba026432a6be2dd9d96e4c5205725194997193bf871703b82c4a" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: transitive + version: "0.2.0" + http: + dependency: "direct main" description: - name: freezed_annotation - sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + name: http + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" url: "https://pub.dev" source: hosted - version: "2.4.4" - fuchsia_remote_debug_protocol: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - glob: + version: "1.1.0" + http_multi_server: dependency: transitive description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" url: "https://pub.dev" source: hosted - version: "2.1.2" - integration_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - json_annotation: + version: "3.2.1" + http_parser: dependency: transitive description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" url: "https://pub.dev" source: hosted - version: "4.9.0" - leak_tracker: + version: "4.0.2" + io: dependency: transitive description: - name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" url: "https://pub.dev" source: hosted - version: "10.0.5" - leak_tracker_flutter_testing: + version: "1.0.4" + js: dependency: transitive description: - name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "3.0.5" - leak_tracker_testing: + version: "0.6.7" + json_annotation: dependency: transitive description: - name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "4.8.1" lints: - dependency: transitive + dependency: "direct dev" description: name: lints sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" @@ -274,7 +194,7 @@ packages: source: hosted version: "2.1.1" logging: - dependency: transitive + dependency: "direct main" description: name: logging sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" @@ -285,34 +205,34 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.16+1" - material_color_utilities: + version: "0.12.16" + meta: dependency: transitive description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + name: meta + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "0.11.1" - meta: + version: "1.9.1" + mime: dependency: transitive description: - name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e url: "https://pub.dev" source: hosted - version: "1.15.0" - mockito: + version: "1.0.4" + node_preamble: dependency: transitive description: - name: mockito - sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" url: "https://pub.dev" source: hosted - version: "5.4.4" + version: "2.0.2" package_config: dependency: transitive description: @@ -322,29 +242,29 @@ packages: source: hosted version: "2.1.0" path: - dependency: transitive + dependency: "direct main" description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "2ad4cddff7f5cc0e2d13069f2a3f7a73ca18f66abd6f5ecf215219cdb3638edb" url: "https://pub.dev" source: hosted - version: "1.9.0" - platform: + version: "1.8.0" + petitparser: dependency: transitive description: - name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + name: petitparser + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 url: "https://pub.dev" source: hosted - version: "3.1.5" - process: + version: "5.4.0" + pool: dependency: transitive description: - name: process - sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "1.5.1" pub_semver: dependency: transitive description: @@ -353,21 +273,56 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - sky_engine: + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: dependency: transitive description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + name: shelf_static + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e url: "https://pub.dev" source: hosted - version: "1.5.0" - source_span: + version: "1.1.2" + shelf_web_socket: dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" + source_span: + dependency: "direct main" description: name: source_span sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" @@ -398,14 +353,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" - sync_http: - dependency: transitive - description: - name: sync_http - sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" - url: "https://pub.dev" - source: hosted - version: "0.3.1" term_glyph: dependency: transitive description: @@ -414,14 +361,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" + test: + dependency: "direct dev" + description: + name: test + sha256: "9b0dd8e36af4a5b1569029949d50a52cb2a2a2fdaa20cebb96e6603b9ae241f9" + url: "https://pub.dev" + source: hosted + version: "1.24.6" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.6.1" + test_core: + dependency: transitive + description: + name: test_core + sha256: "4bef837e56375537055fdbbbf6dd458b1859881f4c7e6da936158f77d61ab265" + url: "https://pub.dev" + source: hosted + version: "0.5.6" + toml: + dependency: "direct main" + description: + name: toml + sha256: "157c5dca5160fced243f3ce984117f729c788bb5e475504f3dbcda881accee44" + url: "https://pub.dev" + source: hosted + version: "0.14.0" typed_data: dependency: transitive description: @@ -430,22 +401,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" - vector_math: - dependency: transitive + version: + dependency: "direct main" description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + name: version + sha256: "2307e23a45b43f96469eeab946208ed63293e8afca9c28cd8b5241ff31c55f55" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "3.0.0" vm_service: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "0fae432c85c4ea880b33b497d32824b97795b04cdaa74d270219572a1f50268d" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "11.9.0" watcher: dependency: transitive description: @@ -454,24 +425,24 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - web: + web_socket_channel: dependency: transitive description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b url: "https://pub.dev" source: hosted - version: "0.5.1" - webdriver: + version: "2.4.0" + webkit_inspection_protocol: dependency: transitive description: - name: webdriver - sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + name: webkit_inspection_protocol + sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "1.2.0" yaml: - dependency: transitive + dependency: "direct main" description: name: yaml sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" @@ -479,5 +450,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.4.0 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + dart: ">=3.0.0 <4.0.0" diff --git a/build_tool/pubspec.yaml b/build_tool/pubspec.yaml new file mode 100644 index 00000000..e01aa0ae --- /dev/null +++ b/build_tool/pubspec.yaml @@ -0,0 +1,30 @@ +name: build_tool +description: Cargokit build_tool. Facilitates the build of Rust crate during Flutter application build. +publish_to: none +version: 1.0.0 + +environment: + sdk: ">=3.0.0 <4.0.0" + +# Add regular dependencies here. +dependencies: + # these are pinned on purpose because the bundle_tool_runner doesn't have + # pubspec.lock. See run_build_tool.sh + logging: 1.2.0 + path: 1.8.0 + version: 3.0.0 + collection: 1.18.0 + ed25519_edwards: 0.3.1 + hex: 0.2.0 + yaml: 3.1.2 + source_span: 1.10.0 + github: 9.17.0 + args: 2.4.2 + crypto: 3.0.3 + convert: 3.1.1 + http: 1.1.0 + toml: 0.14.0 + +dev_dependencies: + lints: ^2.1.0 + test: ^1.24.0 diff --git a/build_tool/test/builder_test.dart b/build_tool/test/builder_test.dart new file mode 100644 index 00000000..e92852e5 --- /dev/null +++ b/build_tool/test/builder_test.dart @@ -0,0 +1,28 @@ +import 'package:build_tool/src/builder.dart'; +import 'package:test/test.dart'; + +void main() { + test('parseBuildConfiguration', () { + var b = BuildEnvironment.parseBuildConfiguration('debug'); + expect(b, BuildConfiguration.debug); + + b = BuildEnvironment.parseBuildConfiguration('profile'); + expect(b, BuildConfiguration.profile); + + b = BuildEnvironment.parseBuildConfiguration('release'); + expect(b, BuildConfiguration.release); + + b = BuildEnvironment.parseBuildConfiguration('debug-dev'); + expect(b, BuildConfiguration.debug); + + b = BuildEnvironment.parseBuildConfiguration('profile'); + expect(b, BuildConfiguration.profile); + + b = BuildEnvironment.parseBuildConfiguration('profile-prod'); + expect(b, BuildConfiguration.profile); + + // fallback to release + b = BuildEnvironment.parseBuildConfiguration('unknown'); + expect(b, BuildConfiguration.release); + }); +} diff --git a/build_tool/test/cargo_test.dart b/build_tool/test/cargo_test.dart new file mode 100644 index 00000000..00afe29f --- /dev/null +++ b/build_tool/test/cargo_test.dart @@ -0,0 +1,28 @@ +import 'package:build_tool/src/cargo.dart'; +import 'package:test/test.dart'; + +final _cargoToml = """ +[workspace] + +[profile.release] +lto = true +panic = "abort" +opt-level = "z" +# strip = "symbols" + +[package] +name = "super_native_extensions" +version = "0.1.0" +edition = "2021" +resolver = "2" + +[lib] +crate-type = ["cdylib", "staticlib"] +"""; + +void main() { + test('parseCargoToml', () { + final info = CrateInfo.parseManifest(_cargoToml); + expect(info.packageName, 'super_native_extensions'); + }); +} diff --git a/build_tool/test/options_test.dart b/build_tool/test/options_test.dart new file mode 100644 index 00000000..25a85b6a --- /dev/null +++ b/build_tool/test/options_test.dart @@ -0,0 +1,75 @@ +import 'package:build_tool/src/builder.dart'; +import 'package:build_tool/src/options.dart'; +import 'package:hex/hex.dart'; +import 'package:test/test.dart'; +import 'package:yaml/yaml.dart'; + +void main() { + test('parseCargoBuildOptions', () { + final yaml = """ +toolchain: nightly +extra_flags: + - -Z + # Comment here + - build-std=panic_abort,std +"""; + final node = loadYamlNode(yaml); + final options = CargoBuildOptions.parse(node); + expect(options.toolchain, Toolchain.nightly); + expect(options.flags, ['-Z', 'build-std=panic_abort,std']); + }); + + test('parsePrecompiledBinaries', () { + final yaml = """ +url_prefix: https://url-prefix +public_key: a4c3433798eb2c36edf2b94dbb4dd899d57496ca373a8982d8a792410b7f6445 +"""; + final precompiledBinaries = PrecompiledBinaries.parse(loadYamlNode(yaml)); + final key = HEX.decode( + 'a4c3433798eb2c36edf2b94dbb4dd899d57496ca373a8982d8a792410b7f6445'); + expect(precompiledBinaries.uriPrefix, 'https://url-prefix'); + expect(precompiledBinaries.publicKey.bytes, key); + }); + + test('parseCargokitOptions', () { + const yaml = ''' +cargo: + # For smalles binaries rebuilt the standard library with panic=abort + debug: + toolchain: nightly + extra_flags: + - -Z + # Comment here + - build-std=panic_abort,std + release: + toolchain: beta + +precompiled_binaries: + url_prefix: https://url-prefix + public_key: a4c3433798eb2c36edf2b94dbb4dd899d57496ca373a8982d8a792410b7f6445 +'''; + final options = CargokitCrateOptions.parse(loadYamlNode(yaml)); + expect(options.precompiledBinaries?.uriPrefix, 'https://url-prefix'); + final key = HEX.decode( + 'a4c3433798eb2c36edf2b94dbb4dd899d57496ca373a8982d8a792410b7f6445'); + expect(options.precompiledBinaries?.publicKey.bytes, key); + + final debugOptions = options.cargo[BuildConfiguration.debug]!; + expect(debugOptions.toolchain, Toolchain.nightly); + expect(debugOptions.flags, ['-Z', 'build-std=panic_abort,std']); + + final releaseOptions = options.cargo[BuildConfiguration.release]!; + expect(releaseOptions.toolchain, Toolchain.beta); + expect(releaseOptions.flags, []); + }); + + test('parseCargokitUserOptions', () { + const yaml = ''' +use_precompiled_binaries: false +verbose_logging: true +'''; + final options = CargokitUserOptions.parse(loadYamlNode(yaml)); + expect(options.usePrecompiledBinaries, false); + expect(options.verboseLogging, true); + }); +} diff --git a/build_tool/test/rustup_test.dart b/build_tool/test/rustup_test.dart new file mode 100644 index 00000000..af95303c --- /dev/null +++ b/build_tool/test/rustup_test.dart @@ -0,0 +1,66 @@ +import 'package:build_tool/src/rustup.dart'; +import 'package:build_tool/src/util.dart'; +import 'package:test/test.dart'; + +void main() { + test('rustup with no toolchains', () { + bool didListToolchains = false; + bool didInstallStable = false; + bool didListTargets = false; + testRunCommandOverride = (args) { + expect(args.executable, 'rustup'); + switch (args.arguments) { + case ['toolchain', 'list']: + didListToolchains = true; + return TestRunCommandResult(stdout: 'no installed toolchains\n'); + case ['toolchain', 'install', 'stable']: + didInstallStable = true; + return TestRunCommandResult(); + case ['target', 'list', '--toolchain', 'stable', '--installed']: + didListTargets = true; + return TestRunCommandResult( + stdout: 'x86_64-unknown-linux-gnu\nx86_64-apple-darwin\n'); + default: + throw Exception('Unexpected call: ${args.arguments}'); + } + }; + final rustup = Rustup(); + rustup.installToolchain('stable'); + expect(didInstallStable, true); + expect(didListToolchains, true); + expect(didListTargets, true); + expect(rustup.installedTargets('stable'), [ + 'x86_64-unknown-linux-gnu', + 'x86_64-apple-darwin', + ]); + testRunCommandOverride = null; + }); + + test('rustup with esp toolchain', () { + final targetsQueried = []; + testRunCommandOverride = (args) { + expect(args.executable, 'rustup'); + switch (args.arguments) { + case ['toolchain', 'list']: + return TestRunCommandResult( + stdout: 'stable-aarch64-apple-darwin (default)\n' + 'nightly-aarch64-apple-darwin\n' + 'esp\n'); + case ['target', 'list', '--toolchain', String toolchain, '--installed']: + targetsQueried.add(toolchain); + return TestRunCommandResult(stdout: '$toolchain:target\n'); + default: + throw Exception('Unexpected call: ${args.arguments}'); + } + }; + final rustup = Rustup(); + expect(targetsQueried, [ + 'stable-aarch64-apple-darwin', + 'nightly-aarch64-apple-darwin', + ]); + expect(rustup.installedTargets('stable'), + ['stable-aarch64-apple-darwin:target']); + expect(rustup.installedTargets('nightly'), + ['nightly-aarch64-apple-darwin:target']); + }); +} diff --git a/check_precompiled.sh b/check_precompiled.sh deleted file mode 100644 index d6ff7498..00000000 --- a/check_precompiled.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -BASEDIR=$(dirname "$0") - -cd $BASEDIR/cargokit/build_tool - -# Check whether the precompiled binaries ara available for each architecture. -# Note: aaarch64-unknown-linux-gnu binary is missing as there is no -# cross-compilation available currently. - -dart run build_tool verify-binaries --manifest-dir=../../rust \ No newline at end of file diff --git a/cmake/cargokit.cmake b/cmake/cargokit.cmake new file mode 100644 index 00000000..ddd05df9 --- /dev/null +++ b/cmake/cargokit.cmake @@ -0,0 +1,99 @@ +SET(cargokit_cmake_root "${CMAKE_CURRENT_LIST_DIR}/..") + +# Workaround for https://github.com/dart-lang/pub/issues/4010 +get_filename_component(cargokit_cmake_root "${cargokit_cmake_root}" REALPATH) + +if(WIN32) + # REALPATH does not properly resolve symlinks on windows :-/ + execute_process(COMMAND powershell -ExecutionPolicy Bypass -File "${CMAKE_CURRENT_LIST_DIR}/resolve_symlinks.ps1" "${cargokit_cmake_root}" OUTPUT_VARIABLE cargokit_cmake_root OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() + +# Arguments +# - target: CMAKE target to which rust library is linked +# - manifest_dir: relative path from current folder to directory containing cargo manifest +# - lib_name: cargo package name +# - any_symbol_name: name of any exported symbol from the library. +# used on windows to force linking with library. +function(apply_cargokit target manifest_dir lib_name any_symbol_name) + + set(CARGOKIT_LIB_NAME "${lib_name}") + set(CARGOKIT_LIB_FULL_NAME "${CMAKE_SHARED_MODULE_PREFIX}${CARGOKIT_LIB_NAME}${CMAKE_SHARED_MODULE_SUFFIX}") + if (CMAKE_CONFIGURATION_TYPES) + set(CARGOKIT_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/$") + set(OUTPUT_LIB "${CMAKE_CURRENT_BINARY_DIR}/$/${CARGOKIT_LIB_FULL_NAME}") + else() + set(CARGOKIT_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}") + set(OUTPUT_LIB "${CMAKE_CURRENT_BINARY_DIR}/${CARGOKIT_LIB_FULL_NAME}") + endif() + set(CARGOKIT_TEMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/cargokit_build") + + if (FLUTTER_TARGET_PLATFORM) + set(CARGOKIT_TARGET_PLATFORM "${FLUTTER_TARGET_PLATFORM}") + else() + set(CARGOKIT_TARGET_PLATFORM "windows-x64") + endif() + + set(CARGOKIT_ENV + "CARGOKIT_CMAKE=${CMAKE_COMMAND}" + "CARGOKIT_CONFIGURATION=$" + "CARGOKIT_MANIFEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${manifest_dir}" + "CARGOKIT_TARGET_TEMP_DIR=${CARGOKIT_TEMP_DIR}" + "CARGOKIT_OUTPUT_DIR=${CARGOKIT_OUTPUT_DIR}" + "CARGOKIT_TARGET_PLATFORM=${CARGOKIT_TARGET_PLATFORM}" + "CARGOKIT_TOOL_TEMP_DIR=${CARGOKIT_TEMP_DIR}/tool" + "CARGOKIT_ROOT_PROJECT_DIR=${CMAKE_SOURCE_DIR}" + ) + + if (WIN32) + set(SCRIPT_EXTENSION ".cmd") + set(IMPORT_LIB_EXTENSION ".lib") + else() + set(SCRIPT_EXTENSION ".sh") + set(IMPORT_LIB_EXTENSION "") + execute_process(COMMAND chmod +x "${cargokit_cmake_root}/run_build_tool${SCRIPT_EXTENSION}") + endif() + + # Using generators in custom command is only supported in CMake 3.20+ + if (CMAKE_CONFIGURATION_TYPES AND ${CMAKE_VERSION} VERSION_LESS "3.20.0") + foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES) + add_custom_command( + OUTPUT + "${CMAKE_CURRENT_BINARY_DIR}/${CONFIG}/${CARGOKIT_LIB_FULL_NAME}" + "${CMAKE_CURRENT_BINARY_DIR}/_phony_" + COMMAND ${CMAKE_COMMAND} -E env ${CARGOKIT_ENV} + "${cargokit_cmake_root}/run_build_tool${SCRIPT_EXTENSION}" build-cmake + VERBATIM + ) + endforeach() + else() + add_custom_command( + OUTPUT + ${OUTPUT_LIB} + "${CMAKE_CURRENT_BINARY_DIR}/_phony_" + COMMAND ${CMAKE_COMMAND} -E env ${CARGOKIT_ENV} + "${cargokit_cmake_root}/run_build_tool${SCRIPT_EXTENSION}" build-cmake + VERBATIM + ) + endif() + + + set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/_phony_" PROPERTIES SYMBOLIC TRUE) + + if (TARGET ${target}) + # If we have actual cmake target provided create target and make existing + # target depend on it + add_custom_target("${target}_cargokit" DEPENDS ${OUTPUT_LIB}) + add_dependencies("${target}" "${target}_cargokit") + target_link_libraries("${target}" PRIVATE "${OUTPUT_LIB}${IMPORT_LIB_EXTENSION}") + if(WIN32) + target_link_options(${target} PRIVATE "/INCLUDE:${any_symbol_name}") + endif() + else() + # Otherwise (FFI) just use ALL to force building always + add_custom_target("${target}_cargokit" ALL DEPENDS ${OUTPUT_LIB}) + endif() + + # Allow adding the output library to plugin bundled libraries + set("${target}_cargokit_lib" ${OUTPUT_LIB} PARENT_SCOPE) + +endfunction() diff --git a/cmake/resolve_symlinks.ps1 b/cmake/resolve_symlinks.ps1 new file mode 100644 index 00000000..3d10d283 --- /dev/null +++ b/cmake/resolve_symlinks.ps1 @@ -0,0 +1,27 @@ +function Resolve-Symlinks { + [CmdletBinding()] + [OutputType([string])] + param( + [Parameter(Position = 0, Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] + [string] $Path + ) + + [string] $separator = '/' + [string[]] $parts = $Path.Split($separator) + + [string] $realPath = '' + foreach ($part in $parts) { + if ($realPath -and !$realPath.EndsWith($separator)) { + $realPath += $separator + } + $realPath += $part + $item = Get-Item $realPath + if ($item.Target) { + $realPath = $item.Target.Replace('\', '/') + } + } + $realPath +} + +$path=Resolve-Symlinks -Path $args[0] +Write-Host $path diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 00000000..d9bcf4e2 --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,104 @@ +# Cargokit Architecture + +Note: This is mostly relevant for plugins authors that want to see a bit under the hood rather then just following a tutorial. + +In ideal conditions the end-developer using the plugin should not even be aware of Cargokit existence. + +## Integration + +Cargokit is meant to be included in Flutter plugin (or application) that contains the Rust crate to be built during the Flutter build process. + +Cargokit can be either incuded as git submodule or git subtree (required for plugins - as pub does not support submodules for git dependencies). + +For a step by step tutorial on integrating Cargokit with a Flutter plugin see https://matejknopp.com/post/flutter_plugin_in_rust_with_no_prebuilt_binaries/. + +## build_tool + +Build tool is the core of cargokit. It is a Dart command line package that facilitates the build of Rust crate. It is invoked during the Flutter build process to build (or download) Rust artifacts, but it can be also used as a standalone tool. + +It handles the following commands: + +### build-cmake + +This is invoked from `cargokit.cmake` and it is used to build the Rust crate into a dynamic library on Linux and Windows (which use CMake as build system). + +The command takes no additional arguments, everything is controlled during environment variables set by `cargokit.cmake`. + +### build-gradle + +This is invoked from `plugin.gradle` and it is used to build the Rust crate into a dynamic library on Android. The command takes no additional arguments, everything is controlled during environment variables set by `plugin.gradle`. + +The build_tool installs NDK if needed, configures the Rust environment for cross compilation and then invokes `cargo build` with appropriate arguments and environment variables. + +The build-tool also acts a linker driver. + +### build-pod + +This is invoked from plugin's podspec `script_phase` through `build_pod.sh`. Bundle tool will build the Rust crate into a static library that gets linked into the plugin Framework. In this case must have `:execution_position` set to `:before_compile`. + +Cargokit will build binaries for all active architectures from XCode build and lipo them togherer. + +When using Cargokit to integrate Rust code with an application (not a plugin) you can also configure the `Cargo.toml` to just build a dynamic library. When Cargokit finds that the crate only built a dylib and no static lib, it will attempt to replace the Cocoapod framework binary with the dylib. In this case the script `:execution_position` must be set to `:after_compile`. This is *not* recommended for plugins and it's quite experimental. + +### gen-key, precompile-binaries, verify-binaries + +These are used as when providing precompiled binaries for Plugin. See [precompiled_binaries.md](precompiled_binaries.md) for more information. + +## Launching the build_tool during build. + +During Flutter build, the build tool can not be launched directly using `dart run`. Rather it is launched through `run_build_tool.sh` and `run_build_tool.cmd`. Because the `build_tool` is shipped as part of plugin, we generally don't want to write into the plugin directory during build, which would happen if the `build_tool` was simply invoked through `dart run` (For example the `.dart_tool/package_config.json` file would get written inside the `build_tool` directory). + +Instead the `run_build_tool` script creates a minimal Dart command line package in the build directory and references the `build_tool` as package. That way the `.dart_tool/package_config.json` file is created in the temporary build folder and not in the plugin itself. The script also precompiles the Dart code to speed up subsequent invocations. + +## Configuring Cargokit + +### Configuration for the Rust crate + +Cargokit can be configured through a `cargokit.yaml` file, which can be used to control the build of the Rust package and is placed into the Rust crate next to `Cargo.toml`. + +Here is an example `cargokit.yaml` with comments: +```yaml +cargo: + debug: # Configuration of cargo execution during debug builds + toolchain: stable # default + release: # Configuration of cargo execution for release builds + toolchain: nightly # rustup will be invoked with nightly toolchain + extra_flags: # extra arguments passed to cargo build + - -Z + - build-std=panic_abort,std + +# If crate ships with precompiled binaries, they can be configured here. +precompiled_binaries: + # Uri prefix used when downloading precompiled binaries. + url_prefix: https://github.com/superlistapp/super_native_extensions/releases/download/precompiled_ + + # Public key for verifying downloaded precompiled binaries. + public_key: 3a257ef1c7d72d84225ac4658d24812ada50a7a7a8a2138c2a91353389fdc514 +``` + +### Configuration for the application consuming the plugin + +A `cargokit_options.yaml` file can also be placed by developer using plugin to the root of the application package. In which case the file can be used to specify following options: + +```yaml +# Enables verbose logging of Cargokit during build +verbose_logging: true + +# Opts out of using precompiled binaries. If crate has configured +# and deployed precompiled binaries, these will be by default used whenever Rustup +# is not installed. With `use_precompiled_binaries` set to false, the build will +# instead be aborted prompting user to install Rustup. +use_precompiled_binaries: false +``` + +## Detecting Rustup + +When the plugin doesn't come with precompiled libraries (or user opt-out), `build_tool` will need to invoke Rustup during build to ensure that required Rust targets and toolchain are installed for current build and to build the Rust crate. + +Cargokit will attempt to detect Rustup in the default Rustup installation location (`~/.cargo/rustup`) as well as in PATH. This is done so that if user install Rustup but doesn't properly configure PATH, Cargokit will still work. + +If `build_tool` doesn't find Rustup, it will about the build with a message showing instructions to install Rustup specific to current platform. + +On macOS it will also detect a homebrew Rust installation in PATH and will prompt user to call `brew unlink rust` first to remove homebrew Rust installation from PATH, because it may interfere with Rustup. + +Homebrew Rust installation can not be used by Cargokit, because it can only build for host platform. Cargokit needs to be able to cross compile the Rust crate for iOS and Android and thus needs full Rustup installation. diff --git a/docs/precompiled_binaries.md b/docs/precompiled_binaries.md new file mode 100644 index 00000000..2026e867 --- /dev/null +++ b/docs/precompiled_binaries.md @@ -0,0 +1,95 @@ +# Precompiled Binaries + +Because Cargokit builds the Rust crate during Flutter build, it is inherently +dependend on the Rust toolchain being installed on the developer's machine. + +To decrease the friction, it is possible for Cargokit to use precompiled binaries instead. + +This is how the process of using precompiled binaries looks from the perspective of the build on developer machine: + +1. Cargokit checks if there is `cargokit_options.yaml` file in the root folder of target application. If there is one, it will be checked for `use_precompiled_binaries` options to see if user opted out of using precompiled binaries. In which case Cargokit will insist on building from source. Cargokit will also build from source if the configuration file is absent, but user has Rustup installed. + +2. Cargokit checks if there is `cargokit.yaml` file placed in the Rust crate. If there is one, it will be checked for `precompiled_binaries` section to see if crate supports precompiled binaries. The configuration section must contain a public key and URL prefix. + +3. Cargokit computes a `crate-hash`. This is a SHA256 hash value computed from all Rust files inside crate, `Cargo.toml`, `Cargo.lock` and `cargokit.yaml`. This uniquely identifies the crate and it is used to find the correct precompiled binaries. + +4. Cargokit will attempt to download the precompiled binaries for target platform and `crate_hash` combination and a signature file for each downloaded binary. If download succeeds, the binary content will be verified against the signature and public key included in `cargokit.yaml` (which is part of Rust crate and thus part of published Flutter package). + +5. If the verification succeeds, the precompiled binaries will be used. Otherwise the binary will be discarded and Cargokit will insist on building from source. + +## Providing precompiled binaries + +Note that this assumes that precompiled binaries will be generated during github actions and deployed as github releases. + +### Use `build_tool` to generate a key-pair: + +``` +dart run build_tool gen-key +``` + +This will print the private key and public key. Store the private key securely. It needs to be provided as a secret to github action. + +The public key should be included in `cargokit.yaml` file in the Rust crate. + +### Provide a `cargokit.yaml` file in the Rust crate + +The file must be placed alongside Cargo.toml. + +```yaml +precompiled_binaries: + # Uri prefix used when downloading precompiled binaries. + url_prefix: https://github.com///releases/download/precompiled_ + + # Public key for verifying downloaded precompiled binaries. + public_key: +``` + +### Configure a github action to build and upload precompiled binaries. + +The github action should be run at every commit to main branch (and possibly other branches). + +The action needs two secrets - private key for signing binaries and GitHub token for uploading binaries as releases. Here is example action that precompiles and uploads binaries for all supported targets. + +```yaml +on: + push: + branches: [ main ] + +name: Precompile Binaries + +jobs: + Precompile: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macOS-latest + - windows-latest + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v1 + - name: Install GTK + if: (matrix.os == 'ubuntu-latest') + run: sudo apt-get update && sudo apt-get install libgtk-3-dev + - name: Precompile + if: (matrix.os == 'macOS-latest') || (matrix.os == 'windows-latest') + run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=superlistapp/super_native_extensions + working-directory: super_native_extensions/cargokit/build_tool + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} + PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }} + - name: Precompile (with Android) + if: (matrix.os == 'ubuntu-latest') + run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=superlistapp/super_native_extensions --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 + working-directory: super_native_extensions/cargokit/build_tool + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} + PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }} +``` + +By default the `built_tool precompile-binaries` commands build and uploads the binaries for all targets buildable from current host. This can be overriden using the `--target ` argument. + +Android binaries will be built when `--android-sdk-location` and `--android-ndk-version` arguments are provided. + diff --git a/example/.gitignore b/example/.gitignore deleted file mode 100644 index 2aa6653f..00000000 --- a/example/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -/ios/Podfile.lock -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release \ No newline at end of file diff --git a/example/README.md b/example/README.md deleted file mode 100644 index 5b6ea12f..00000000 --- a/example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# bdk_flutter_example - -Demonstrates how to use the bdk_flutter plugin. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, samples, guidance on -mobile development, and a full API reference. diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml deleted file mode 100644 index ae08714c..00000000 --- a/example/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/example/android/.gitignore b/example/android/.gitignore deleted file mode 100644 index 6f568019..00000000 --- a/example/android/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties -**/*.keystore -**/*.jks diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle deleted file mode 100644 index 6036f812..00000000 --- a/example/android/app/build.gradle +++ /dev/null @@ -1,72 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "io.bdk.f.bdk_flutter_example" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 23 - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } - namespace 'io.bdk.f.bdk_flutter_example' -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 4d959102..00000000 --- a/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index d56a0b37..00000000 --- a/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/example/android/app/src/main/kotlin/io/bdk/f/bdk_flutter_example/MainActivity.kt b/example/android/app/src/main/kotlin/io/bdk/f/bdk_flutter_example/MainActivity.kt deleted file mode 100644 index ecb6d2f9..00000000 --- a/example/android/app/src/main/kotlin/io/bdk/f/bdk_flutter_example/MainActivity.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.bdk.f.bdk_flutter_example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity : FlutterActivity() diff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/example/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index c03a191c..00000000 --- a/example/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/example/android/app/src/main/res/drawable/launch_background.xml b/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 0db4a835..00000000 --- a/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7b0906d62b1847e87f15cdcacf6a4f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79bb8a35cc66c3c1fd44f5a5526c1b78be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34e7a88e3f88bea192c3a370d44689c3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eebdb28e45604e46eeda8dd24651419bc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` diff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be7..00000000 --- a/example/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef880..00000000 --- a/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 4d959102..00000000 --- a/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/example/android/build.gradle b/example/android/build.gradle deleted file mode 100644 index 5c8d9b8f..00000000 --- a/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/example/android/gradle.properties b/example/android/gradle.properties deleted file mode 100644 index 94adc3a3..00000000 --- a/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index cc5527d7..00000000 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle deleted file mode 100644 index 44e62bcf..00000000 --- a/example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/example/integration_test /multi_sig_test.dart b/example/integration_test /multi_sig_test.dart deleted file mode 100644 index d3ad408b..00000000 --- a/example/integration_test /multi_sig_test.dart +++ /dev/null @@ -1,167 +0,0 @@ -import 'package:bdk_flutter/bdk_flutter.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; - -/// Derives extended descriptor keys (secret and public) based on the provided -/// hardened and unhardened derivation paths and mnemonic. -Future<(DescriptorSecretKey, DescriptorPublicKey)> deriveDescriptorKeys( - DerivationPath hardenedPath, - DerivationPath unHardenedPath, - Mnemonic mnemonic, -) async { - // Create the root secret key from the mnemonic - final secretKey = await DescriptorSecretKey.create( - mnemonic: mnemonic, network: Network.signet); - - // Derive the key at the hardened path - final derivedSecretKey = await secretKey.derive(hardenedPath); - - // Extend the derived secret key further using the unhardened path - final derivedExtendedSecretKey = - await derivedSecretKey.extend(unHardenedPath); - - // Convert the derived secret key to its public counterpart - final publicKey = derivedSecretKey.toPublic(); - - // Extend the public key using the same unhardened path - final derivedExtendedPublicKey = await publicKey.extend(path: unHardenedPath); - - return (derivedExtendedSecretKey, derivedExtendedPublicKey); -} - -/// Constructs a wallet descriptor using timelock conditions and public keys. -String createWalletDescriptor( - String primaryReceivingSecret, // Alice's descriptor derived from m/0 - String secondaryReceivingPublic, // Bob's public key derived from m/0 - int primaryTimelock, // Alice's timelock - int secondaryTimelock, // Bob's timelock - String primaryChangePublic, // Alice's public key derived from m/1 - String secondaryChangePublic, // Bob's public key derived from m/1 -) { - // Define the multi-sig condition based on timelock priority - String multi = (primaryTimelock < secondaryTimelock) - ? 'multi(2,$primaryReceivingSecret,$secondaryReceivingPublic)' - : 'multi(2,$secondaryReceivingPublic,$primaryReceivingSecret)'; - - // Define the timelock conditions for Bob and Alice - String timelockBob = - 'and_v(v:older($secondaryTimelock),pk($secondaryChangePublic))'; - String timelockAlice = - 'and_v(v:older($primaryTimelock),pk($primaryChangePublic))'; - - // Combine the timelock conditions - String timelockCondition = (primaryTimelock < secondaryTimelock) - ? 'or_i($timelockAlice,$timelockBob)' - : 'or_i($timelockBob,$timelockAlice)'; - - // Return the final wallet descriptor - return 'wsh(or_d($multi,$timelockCondition))'; -} - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('Time-locked multi-sig wallet synchronization', () { - setUp(() async { - // Setup for test group - }); - - test("Alice and Bob should have the same initial address and balance", - () async { - // Define mnemonics for Alice and Bob - final alice = await Mnemonic.fromString( - 'thumb member wage display inherit music elevator need side setup tube panther broom giant auction banner split potato'); - final bob = await Mnemonic.fromString( - 'tired shine hat tired hover timber reward bridge verb aerobic safe economy'); - - // Define timelocks for Alice and Bob - const aliceTimelock = 25; - const bobTimeLock = 35; - - // Define derivation paths - final hardenedDerivationPath = - await DerivationPath.create(path: "m/84h/1h/0h"); - final receivingDerivationPath = await DerivationPath.create(path: "m/0"); - final changeDerivationPath = await DerivationPath.create(path: "m/1"); - - // Derive keys for Alice - final (aliceReceivingSecretKey, aliceReceivingPublicKey) = - await deriveDescriptorKeys( - hardenedDerivationPath, receivingDerivationPath, alice); - final (aliceChangeSecretKey, aliceChangePublicKey) = - await deriveDescriptorKeys( - hardenedDerivationPath, changeDerivationPath, alice); - - // Derive keys for Bob - final (bobReceivingSecretKey, bobReceivingPublicKey) = - await deriveDescriptorKeys( - hardenedDerivationPath, receivingDerivationPath, bob); - final (bobChangeSecretKey, bobChangePublicKey) = - await deriveDescriptorKeys( - hardenedDerivationPath, changeDerivationPath, bob); - - // Create wallet descriptors for Alice and Bob - final aliceDescriptor = createWalletDescriptor( - aliceReceivingSecretKey.toString(), - bobReceivingPublicKey.toString(), - aliceTimelock, - bobTimeLock, - aliceChangePublicKey.toString(), - bobChangePublicKey.toString()); - final bobDescriptor = createWalletDescriptor( - bobReceivingSecretKey.toString(), - aliceReceivingPublicKey.toString(), - bobTimeLock, - aliceTimelock, - bobChangePublicKey.toString(), - aliceChangePublicKey.toString()); - - // Debug print descriptors - debugPrint("Alice's descriptor: $aliceDescriptor"); - debugPrint("Bob's descriptor: $bobDescriptor"); - - // Create wallets - final aliceWallet = await Wallet.create( - descriptor: await Descriptor.create( - descriptor: aliceDescriptor, network: Network.signet), - network: Network.signet, - databaseConfig: const DatabaseConfig.memory()); - final bobWallet = await Wallet.create( - descriptor: await Descriptor.create( - descriptor: bobDescriptor, network: Network.signet), - network: Network.signet, - databaseConfig: const DatabaseConfig.memory()); - - // Get initial addresses - final aliceAddress = aliceWallet - .getAddress(addressIndex: const AddressIndex.peek(index: 0)) - .address - .toString(); - final bobAddress = bobWallet - .getAddress(addressIndex: const AddressIndex.peek(index: 0)) - .address - .toString(); - assert(aliceAddress == bobAddress, "Addresses should match"); - - debugPrint("Alice's receiving address: $aliceAddress"); - debugPrint("Bob's receiving address: $bobAddress"); - - // Sync wallets - final blockchain = await Blockchain.createMutinynet(); - debugPrint("Syncing Bob's wallet..."); - await bobWallet.sync(blockchain: blockchain); - debugPrint("Syncing Alice's wallet..."); - await aliceWallet.sync(blockchain: blockchain); - debugPrint("Synchronization complete"); - - // Check balances - final bobBalance = bobWallet.getBalance().total.toInt(); - final aliceBalance = aliceWallet.getBalance().total.toInt(); - assert(bobBalance == aliceBalance, "Balances should match"); - - debugPrint("Alice's balance: $aliceBalance"); - debugPrint("Bob's balance: $bobBalance"); - }); - }); -} diff --git a/example/ios/.gitignore b/example/ios/.gitignore deleted file mode 100644 index 7a7f9873..00000000 --- a/example/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 7c569640..00000000 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 12.0 - - diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f..00000000 --- a/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe..00000000 --- a/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/example/ios/Podfile b/example/ios/Podfile deleted file mode 100644 index 70212f20..00000000 --- a/example/ios/Podfile +++ /dev/null @@ -1,40 +0,0 @@ -platform :ios, '12.0' - -# 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', '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 Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 146ebe1c..00000000 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,557 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - DAD25A380C8D08DC402ECE34 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45B80BDED127BA4FBE468995 /* Pods_Runner.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 32F77E949DF1B3A3BF65C47D /* 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 42B600B2EA815C3C886B7896 /* 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 = ""; }; - 45B80BDED127BA4FBE468995 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9D82A3F5226CE72EC4665159 /* 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 */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DAD25A380C8D08DC402ECE34 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - DF292E499D171B0BBD72CC11 /* Pods */, - CFD36C00495802A0DEF4CE43 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - CFD36C00495802A0DEF4CE43 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 45B80BDED127BA4FBE468995 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - DF292E499D171B0BBD72CC11 /* Pods */ = { - isa = PBXGroup; - children = ( - 9D82A3F5226CE72EC4665159 /* Pods-Runner.debug.xcconfig */, - 32F77E949DF1B3A3BF65C47D /* Pods-Runner.release.xcconfig */, - 42B600B2EA815C3C886B7896 /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 77FC9EC9C7EB41059BB74F4A /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - F21923F72FCD31730B9E86ED /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 77FC9EC9C7EB41059BB74F4A /* [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; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - F21923F72FCD31730B9E86ED /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 6477GJYWXR; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.bdkFlutterExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 6477GJYWXR; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.bdkFlutterExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 6477GJYWXR; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.bdkFlutterExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 5e31d3d3..00000000 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index b6363034..00000000 --- a/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@main -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index e882ab98..00000000 --- a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images": [ - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "20x20", - "idiom": "iphone", - "filename": "Icon-App-20x20@3x.png", - "scale": "3x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "iphone", - "filename": "Icon-App-29x29@3x.png", - "scale": "3x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "iphone", - "filename": "Icon-App-40x40@3x.png", - "scale": "3x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@2x.png", - "scale": "2x" - }, - { - "size": "60x60", - "idiom": "iphone", - "filename": "Icon-App-60x60@3x.png", - "scale": "3x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@1x.png", - "scale": "1x" - }, - { - "size": "20x20", - "idiom": "ipad", - "filename": "Icon-App-20x20@2x.png", - "scale": "2x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@1x.png", - "scale": "1x" - }, - { - "size": "29x29", - "idiom": "ipad", - "filename": "Icon-App-29x29@2x.png", - "scale": "2x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@1x.png", - "scale": "1x" - }, - { - "size": "40x40", - "idiom": "ipad", - "filename": "Icon-App-40x40@2x.png", - "scale": "2x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@1x.png", - "scale": "1x" - }, - { - "size": "76x76", - "idiom": "ipad", - "filename": "Icon-App-76x76@2x.png", - "scale": "2x" - }, - { - "size": "83.5x83.5", - "idiom": "ipad", - "filename": "Icon-App-83.5x83.5@2x.png", - "scale": "2x" - }, - { - "size": "1024x1024", - "idiom": "ios-marketing", - "filename": "Icon-App-1024x1024@1x.png", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada4725e9b0ddb1deab583e5b5102493aa332..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10932 zcmeHN2~<R zh`|8`A_PQ1nSu(UMFx?8j8PC!!VDphaL#`F42fd#7Vlc`zIE4n%Y~eiz4y1j|NDpi z?<@|pSJ-HM`qifhf@m%MamgwK83`XpBA<+azdF#2QsT{X@z0A9Bq>~TVErigKH1~P zRX-!h-f0NJ4Mh++{D}J+K>~~rq}d%o%+4dogzXp7RxX4C>Km5XEI|PAFDmo;DFm6G zzjVoB`@qW98Yl0Kvc-9w09^PrsobmG*Eju^=3f?0o-t$U)TL1B3;sZ^!++3&bGZ!o-*6w?;oOhf z=A+Qb$scV5!RbG+&2S}BQ6YH!FKb0``VVX~T$dzzeSZ$&9=X$3)_7Z{SspSYJ!lGE z7yig_41zpQ)%5dr4ff0rh$@ky3-JLRk&DK)NEIHecf9c*?Z1bUB4%pZjQ7hD!A0r-@NF(^WKdr(LXj|=UE7?gBYGgGQV zidf2`ZT@pzXf7}!NH4q(0IMcxsUGDih(0{kRSez&z?CFA0RVXsVFw3^u=^KMtt95q z43q$b*6#uQDLoiCAF_{RFc{!H^moH_cmll#Fc^KXi{9GDl{>%+3qyfOE5;Zq|6#Hb zp^#1G+z^AXfRKaa9HK;%b3Ux~U@q?xg<2DXP%6k!3E)PA<#4$ui8eDy5|9hA5&{?v z(-;*1%(1~-NTQ`Is1_MGdQ{+i*ccd96ab$R$T3=% zw_KuNF@vI!A>>Y_2pl9L{9h1-C6H8<)J4gKI6{WzGBi<@u3P6hNsXG=bRq5c+z;Gc3VUCe;LIIFDmQAGy+=mRyF++u=drBWV8-^>0yE9N&*05XHZpPlE zxu@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`EW8rn}MqeI34nh zexFeA?&C3B2(E?0{drE@DA2pu(A#ElY&6el60Rn|Qpn-FkfQ8M93AfWIr)drgDFEU zghdWK)^71EWCP(@(=c4kfH1Y(4iugD4fve6;nSUpLT%!)MUHs1!zJYy4y||C+SwQ! z)KM&$7_tyM`sljP2fz6&Z;jxRn{Wup8IOUx8D4uh&(=O zx-7$a;U><*5L^!%xRlw)vAbh;sdlR||& ze}8_8%)c2Fwy=F&H|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}JeGuMZk~LPi7{cidvUGB zAJ4LVeNV%XO>LTrklB#^-;8nb;}6l;1oW&WS=Mz*Az!4cqqQzbOSFq`$Q%PfD7srM zpKgP-D_0XPTRX*hAqeq0TDkJ;5HB1%$3Np)99#16c{ zJImlNL(npL!W|Gr_kxl1GVmF5&^$^YherS7+~q$p zt}{a=*RiD2Ikv6o=IM1kgc7zqpaZ;OB)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0bca859a3f474b03065bef75ba58a9e4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1588 zcmV-42Fv-0P)C1SqPt}wig>|5Crh^=oyX$BK<}M8eLU3e2hGT;=G|!_SP)7zNI6fqUMB=)y zRAZ>eDe#*r`yDAVgB_R*LB*MAc)8(b{g{9McCXW!lq7r(btRoB9!8B-#AI6JMb~YFBEvdsV)`mEQO^&#eRKx@b&x- z5lZm*!WfD8oCLzfHGz#u7sT0^VLMI1MqGxF^v+`4YYnVYgk*=kU?HsSz{v({E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AOuptDflut!#^lnKqU md>ggs(5nOWAqO?umG&QVYK#ibz}*4>0000U6E9hRK9^#O7(mu>ETqrXGsduA8$)?`v2seloOCza43C{NQ$$gAOH**MCn0Q?+L7dl7qnbRdqZ8LSVp1ItDxhxD?t@5_yHg6A8yI zC*%Wgg22K|8E#!~cTNYR~@Y9KepMPrrB8cABapAFa=`H+UGhkXUZV1GnwR1*lPyZ;*K(i~2gp|@bzp8}og7e*#% zEnr|^CWdVV!-4*Y_7rFvlww2Ze+>j*!Z!pQ?2l->4q#nqRu9`ELo6RMS5=br47g_X zRw}P9a7RRYQ%2Vsd0Me{_(EggTnuN6j=-?uFS6j^u69elMypu?t>op*wBx<=Wx8?( ztpe^(fwM6jJX7M-l*k3kEpWOl_Vk3@(_w4oc}4YF4|Rt=2V^XU?#Yz`8(e?aZ@#li0n*=g^qOcVpd-Wbok=@b#Yw zqn8u9a)z>l(1kEaPYZ6hwubN6i<8QHgsu0oE) ziJ(p;Wxm>sf!K+cw>R-(^Y2_bahB+&KI9y^);#0qt}t-$C|Bo71lHi{_+lg#f%RFy z0um=e3$K3i6K{U_4K!EX?F&rExl^W|G8Z8;`5z-k}OGNZ0#WVb$WCpQu-_YsiqKP?BB# vzVHS-CTUF4Ozn5G+mq_~Qqto~ahA+K`|lyv3(-e}00000NkvXXu0mjfd`9t{ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7edb86cdfe0d15b4b0d98334a86163658..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1716 zcmds$`#;kQ7{|XelZftyR5~xW7?MLxS4^|Hw3&P7^y)@A9Fj{Xm1~_CIV^XZ%SLBn zA;!r`GqGHg=7>xrB{?psZQs88ZaedDoagm^KF{a*>G|dJWRSe^I$DNW008I^+;Kjt z>9p3GNR^I;v>5_`+91i(*G;u5|L+Bu6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(=c4kfH1Y(4iugD4fve6;nSUpLT%!)MUHs1!zJYy4y||C+SwQ! z)KM&$7_tyM`sljP2fz6&Z;jxRn{Wup8IOUx8D4uh&(=O zx-7$a;U><*5L^!%xRlw)vAbh;sdlR||& ze}8_8%)c2Fwy=F&H|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}JeGuMZk~LPi7{cidvUGB zAJ4LVeNV%XO>LTrklB#^-;8nb;}6l;1oW&WS=Mz*Az!4cqqQzbOSFq`$Q%PfD7srM zpKgP-D_0XPTRX*hAqeq0TDkJ;5HB1%$3Np)99#16c{ zJImlNL(npL!W|Gr_kxl1GVmF5&^$^YherS7+~q$p zt}{a=*RiD2Ikv6o=IM1kgc7zqpaZ;OB)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5cee1c98386d13b17e89f719e83555b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1895 zcmV-t2blPYP)FQtfgmafE#=YDCq`qUBt#QpG%*H6QHY765~R=q zZ6iudfM}q!Pz#~9JgOi8QJ|DSu?1-*(kSi1K4#~5?#|rh?sS)(-JQqX*}ciXJ56_H zdw=^s_srbAdqxlvGyrgGet#6T7_|j;95sL%MtM;q86vOxKM$f#puR)Bjv9Zvz9-di zXOTSsZkM83)E9PYBXC<$6(|>lNLVBb&&6y{NByFCp%6+^ALR@NCTse_wqvNmSWI-m z!$%KlHFH2omF!>#%1l3LTZg(s7eof$7*xB)ZQ0h?ejh?Ta9fDv59+u#MokW+1t8Zb zgHv%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F1+)o`&3r0colr}QJ3hcSdLu;9;td>kf@Tcn<@9sIx&=m z;AD;SCh95=&p;$r{Xz3iWCO^MX83AGJ(yH&eTXgv|0=34#-&WAmw{)U7OU9!Wz^!7 zZ%jZFi@JR;>Mhi7S>V7wQ176|FdW2m?&`qa(ScO^CFPR80HucLHOTy%5s*HR0^8)i h0WYBP*#0Ks^FNSabJA*5${_#%002ovPDHLkV1oKhTl@e3 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609df07bf62e5100a53a01510388bd2b22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`sk6!QYtBa ztlZI#nu$8lJ^q2Z79UTgZe>BU73(Aospiq+?SdMt8lDZ;*?@tyWVZVS_Q7S&*tJaiRlJ z+aSMOmbg3@h5}v;A*c8SbqM3icg-`Cnwl;7Ts%A1RkNIp+Txl-Ckkvg4oxrqGA5ewEgYqwtECD<_3Egu)xGllKt&J8g&+=ac@Jq4-?w6M3b*>w5 z69N3O%=I^6&UL5gZ!}trC7bUj*12xLdkNs~Bz4QdJJ*UDZox2UGR}SNg@lmOvhCc~ z*f_UeXv(=#I#*7>VZx2ObEN~UoGUTl=-@)E;YtCRZ>SVp$p9yG5hEFZ!`wI!spd)n zSk+vK0Vin7FL{7f&6OB%f;SH22dtbcF<|9fi2Fp%q4kxL!b1#l^)8dUwJ zwEf{(wJj@8iYDVnKB`eSU+;ml-t2`@%_)0jDM`+a46xhDbBj2+&Ih>1A>6aky#(-SYyE{R3f#y57wfLs z6w1p~$bp;6!9DX$M+J~S@D6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runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609df07bf62e5100a53a01510388bd2b22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`sk6!QYtBa ztlZI#nu$8lJ^q2Z79UTgZe>BU73(Aospiq+?SdMt8lDZ;*?@tyWVZVS_Q7S&*tJaiRlJ z+aSMOmbg3@h5}v;A*c8SbqM3icg-`Cnwl;7Ts%A1RkNIp+Txl-Ckkvg4oxrqGA5ewEgYqwtECD<_3Egu)xGllKt&J8g&+=ac@Jq4-?w6M3b*>w5 z69N3O%=I^6&UL5gZ!}trC7bUj*12xLdkNs~Bz4QdJJ*UDZox2UGR}SNg@lmOvhCc~ z*f_UeXv(=#I#*7>VZx2ObEN~UoGUTl=-@)E;YtCRZ>SVp$p9yG5hEFZ!`wI!spd)n zSk+vK0Vin7FL{7f&6OB%f;SH22dtbcF<|9fi2Fp%q4kxL!b1#l^)8dUwJ zwEf{(wJj@8iYDVnKB`eSU+;ml-t2`@%_)0jDM`+a46xhDbBj2+&Ih>1A>6aky#(-SYyE{R3f#y57wfLs z6w1p~$bp;6!9DX$M+J~S@D6vJAaElETnsX4h9a5tvPhC3L@qB~bOzkL@^z0k_hS{T4PF*TDrgdXp+dzsE? z>V|VR035Pl9n5&-RePFdS{7KAr2vPOqR9=M$vXA1Yy5>w;EsF`;OK{2pkn-kpp9Pw z)r;5JfJKKaT$4qCb{TaXHjb$QA{y0EYy*+b1XI;6Ah- zw13P)xT`>~eFoJC!>{2XL(a_#upp3gaR1#5+L(Jmzp4TBnx{~WHedpJ1ch8JFk~Sw z>F+gN+i+VD?gMXwcIhn8rz`>e>J^TI3E-MW>f}6R-pL}>WMOa0k#jN+`RyUVUC;#D zg|~oS^$6%wpF{^Qr+}X>0PKcr3Fc&>Z>uv@C);pwDs@2bZWhYP!rvGx?_|q{d`t<*XEb#=aOb=N+L@CVBGqImZf&+a zCQEa3$~@#kC);pasdG=f6tuIi0PO-y&tvX%>Mv=oY3U$nD zJ#gMegnQ46pq+3r=;zmgcG+zRc9D~c>z+jo9&D+`E6$LmyFqlmCYw;-Zooma{sR@~ z)_^|YL1&&@|GXo*pivH7k!msl+$Sew3%XJnxajt0K%3M6Bd&YFNy9}tWG^aovK2eX z1aL1%7;KRDrA@eG-Wr6w+;*H_VD~qLiVI`{_;>o)k`{8xa3EJT1O_>#iy_?va0eR? zDV=N%;Zjb%Z2s$@O>w@iqt!I}tLjGk!=p`D23I}N4Be@$(|iSA zf3Ih7b<{zqpDB4WF_5X1(peKe+rASze%u8eKLn#KKXt;UZ+Adf$_TO+vTqshLLJ5c z52HucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a5a98e212cca15ea7bf2ab5de5108680..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3831 zcmVjJBgitF5mAp-i>4+KS_oR{|13AP->1TD4=w)g|)JHOx|a2Wk1Va z!k)vP$UcQ#mdj%wNQoaJ!w>jv_6&JPyutpQps?s5dmDQ>`%?Bvj>o<%kYG!YW6H-z zu`g$@mp`;qDR!51QaS}|ZToSuAGcJ7$2HF0z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FkF9`eWrW zfr^D%LNfOcTNvtx0JXR35J0~Jpi2#P3Q&80w+nqNfc}&G0A~*)lGHKv=^FE+b(37|)zL;KLF>oiGfb(?&1 zV3XRu!Sw>@quKiab%g6jun#oZ%!>V#A%+lNc?q>6+VvyAn=kf_6z^(TZUa4Eelh{{ zqFX-#dY(EV@7l$NE&kv9u9BR8&Ojd#ZGJ6l8_BW}^r?DIS_rU2(XaGOK z225E@kH5Opf+CgD^{y29jD4gHbGf{1MD6ggQ&%>UG4WyPh5q_tb`{@_34B?xfSO*| zZv8!)q;^o-bz`MuxXk*G^}(6)ACb@=Lfs`Hxoh>`Y0NE8QRQ!*p|SH@{r8=%RKd4p z+#Ty^-0kb=-H-O`nAA3_6>2z(D=~Tbs(n8LHxD0`R0_ATFqp-SdY3(bZ3;VUM?J=O zKCNsxsgt@|&nKMC=*+ZqmLHhX1KHbAJs{nGVMs6~TiF%Q)P@>!koa$%oS zjXa=!5>P`vC-a}ln!uH1ooeI&v?=?v7?1n~P(wZ~0>xWxd_Aw;+}9#eULM7M8&E?Y zC-ZLhi3RoM92SXUb-5i-Lmt5_rfjE{6y^+24`y$1lywLyHO!)Boa7438K4#iLe?rh z2O~YGSgFUBH?og*6=r9rme=peP~ah`(8Zt7V)j5!V0KPFf_mebo3z95U8(up$-+EA^9dTRLq>Yl)YMBuch9%=e5B`Vnb>o zt03=kq;k2TgGe4|lGne&zJa~h(UGutjP_zr?a7~#b)@15XNA>Dj(m=gg2Q5V4-$)D|Q9}R#002ovPDHLkV1o7DH3k3x diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39da7941ef3f6dcb7f06a192d8dcb308d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1888 zcmV-m2cP(fP)x~L`~4d)Rspd&<9kFh{hn*KP1LP0~$;u(LfAu zp%fx&q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qcYj?^2sd8?N!_w~4v+f-HCF|a$TNZDoNl$I1Uq87euoNgKb6&r26TNrfkUa@o zfdiFA@p{K&mH3b8i!lcoz)V{n8Q@g(vR4ns4r6w;K z>1~ecQR0-<^J|Ndg5fvVUM9g;lbu-){#ghGw(fg>L zh)T5Ljb%lWE;V9L!;Cqk>AV1(rULYF07ZBJbGb9qbSoLAd;in9{)95YqX$J43-dY7YU*k~vrM25 zxh5_IqO0LYZW%oxQ5HOzmk4x{atE*vipUk}sh88$b2tn?!ujEHn`tQLe&vo}nMb&{ zio`xzZ&GG6&ZyN3jnaQy#iVqXE9VT(3tWY$n-)uWDQ|tc{`?fq2F`oQ{;d3aWPg4Hp-(iE{ry>MIPWL> iW8Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eacad3b03bb08bbddbbf4ac48dd78b3d838..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eacad3b03bb08bbddbbf4ac48dd78b3d838..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 2b467c8e..00000000 --- a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in -this directory. - -You can also do it by opening your Flutter project's Xcode project -with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and -dropping in the desired images. \ No newline at end of file diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist deleted file mode 100644 index c9c529c0..00000000 --- a/example/ios/Runner/Info.plist +++ /dev/null @@ -1,51 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Bdk Flutter - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - bdk_flutter_example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - - - diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/example/lib/bdk_library.dart b/example/lib/bdk_library.dart deleted file mode 100644 index db4ecce9..00000000 --- a/example/lib/bdk_library.dart +++ /dev/null @@ -1,119 +0,0 @@ -import 'package:bdk_flutter/bdk_flutter.dart'; -import 'package:flutter/foundation.dart'; - -class BdkLibrary { - Future createMnemonic() async { - final res = await Mnemonic.create(WordCount.words12); - return res; - } - - Future createDescriptor(Mnemonic mnemonic) async { - final descriptorSecretKey = await DescriptorSecretKey.create( - network: Network.signet, - mnemonic: mnemonic, - ); - if (kDebugMode) { - print(descriptorSecretKey.toPublic()); - print(descriptorSecretKey.secretBytes()); - print(descriptorSecretKey); - } - - final descriptor = await Descriptor.newBip84( - secretKey: descriptorSecretKey, - network: Network.signet, - keychain: KeychainKind.externalChain); - return descriptor; - } - - Future initializeBlockchain() async { - return Blockchain.createMutinynet(); - } - - Future restoreWallet(Descriptor descriptor) async { - final wallet = await Wallet.create( - descriptor: descriptor, - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory()); - return wallet; - } - - Future sync(Blockchain blockchain, Wallet wallet) async { - try { - await wallet.sync(blockchain: blockchain); - } on FormatException catch (e) { - debugPrint(e.message); - } - } - - AddressInfo getAddressInfo(Wallet wallet) { - return wallet.getAddress(addressIndex: const AddressIndex.increase()); - } - - Future getPsbtInput( - Wallet wallet, LocalUtxo utxo, bool onlyWitnessUtxo) async { - final input = - await wallet.getPsbtInput(utxo: utxo, onlyWitnessUtxo: onlyWitnessUtxo); - return input; - } - - List getUnConfirmedTransactions(Wallet wallet) { - List unConfirmed = []; - final res = wallet.listTransactions(includeRaw: true); - for (var e in res) { - if (e.confirmationTime == null) unConfirmed.add(e); - } - return unConfirmed; - } - - List getConfirmedTransactions(Wallet wallet) { - List confirmed = []; - final res = wallet.listTransactions(includeRaw: true); - - for (var e in res) { - if (e.confirmationTime != null) confirmed.add(e); - } - return confirmed; - } - - Future getBalance(Wallet wallet) async { - return wallet.getBalance(); - } - - List listUnspent(Wallet wallet) { - return wallet.listUnspent(); - } - - Future estimateFeeRate( - int blocks, - Blockchain blockchain, - ) async { - final feeRate = await blockchain.estimateFee(target: BigInt.from(blocks)); - return feeRate; - } - - sendBitcoin(Blockchain blockchain, Wallet wallet, String receiverAddress, - int amountSat) async { - try { - final txBuilder = TxBuilder(); - final address = await Address.fromString( - s: receiverAddress, network: wallet.network()); - final script = address.scriptPubkey(); - final feeRate = await estimateFeeRate(25, blockchain); - final (psbt, _) = await txBuilder - .addRecipient(script, BigInt.from(amountSat)) - .feeRate(feeRate.satPerVb) - .finish(wallet); - final isFinalized = await wallet.sign(psbt: psbt); - if (isFinalized) { - final tx = psbt.extractTx(); - final res = await blockchain.broadcast(transaction: tx); - debugPrint(res); - } else { - debugPrint("psbt not finalized!"); - } - // Isolate.run(() async => {}); - } on Exception catch (_) { - rethrow; - } - } -} diff --git a/example/lib/main.dart b/example/lib/main.dart deleted file mode 100644 index 3b7e0e3b..00000000 --- a/example/lib/main.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:bdk_flutter_example/wallet.dart'; -import 'package:flutter/material.dart'; - -void main() { - runApp(const ExampleWallet()); -} diff --git a/example/lib/wallet.dart b/example/lib/wallet.dart deleted file mode 100644 index 159e3685..00000000 --- a/example/lib/wallet.dart +++ /dev/null @@ -1,325 +0,0 @@ -import 'package:bdk_flutter/bdk_flutter.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; - -import 'bdk_library.dart'; - -class ExampleWallet extends StatefulWidget { - const ExampleWallet({super.key}); - - @override - State createState() => _ExampleWalletState(); -} - -class _ExampleWalletState extends State { - String displayText = ""; - BigInt balance = BigInt.zero; - late Wallet wallet; - Blockchain? blockchain; - BdkLibrary lib = BdkLibrary(); - @override - void initState() { - restoreWallet(); - super.initState(); - } - - generateMnemonicKeys() async { - final res = await lib.createMnemonic(); - setState(() { - displayText = res.toString(); - }); - if (kDebugMode) { - print(res.toString()); - } - } - - restoreWallet() async { - final aliceMnemonic = await Mnemonic.fromString( - 'give rate trigger race embrace dream wish column upon steel wrist rice'); - final aliceDescriptor = await lib.createDescriptor(aliceMnemonic); - wallet = await lib.restoreWallet(aliceDescriptor); - setState(() { - displayText = "Wallets restored"; - }); - } - - sync() async { - blockchain ??= await lib.initializeBlockchain(); - await lib.sync(blockchain!, wallet); - } - - getNewAddress() async { - final addressInfo = lib.getAddressInfo(wallet); - debugPrint(addressInfo.address.toString()); - - setState(() { - displayText = - "Address: ${addressInfo.address.toString()} \n Index: ${addressInfo.index}"; - }); - } - - getUnConfirmedTransactions() async { - final unConfirmed = lib.getUnConfirmedTransactions(wallet); - setState(() { - displayText = "You have ${unConfirmed.length} unConfirmed transactions"; - }); - for (var e in unConfirmed) { - final txOut = await e.transaction!.output(); - if (kDebugMode) { - print(" txid: ${e.txid}"); - print(" fee: ${e.fee}"); - print(" received: ${e.received}"); - print(" send: ${e.sent}"); - print(" output address: ${txOut.last.scriptPubkey.bytes}"); - print("==========================="); - } - } - } - - getConfirmedTransactions() async { - final confirmed = lib.getConfirmedTransactions(wallet); - setState(() { - displayText = "You have ${confirmed.length} confirmed transactions"; - }); - for (var e in confirmed) { - if (kDebugMode) { - print(" txid: ${e.txid}"); - print(" confirmationTime: ${e.confirmationTime?.timestamp}"); - print(" confirmationTime Height: ${e.confirmationTime?.height}"); - final txIn = await e.transaction!.input(); - final txOut = await e.transaction!.output(); - print("=============TxIn=============="); - for (var e in txIn) { - print(" previousOutout Txid: ${e.previousOutput.txid}"); - print(" previousOutout vout: ${e.previousOutput.vout}"); - print(" witness: ${e.witness}"); - } - print("=============TxOut=============="); - for (var e in txOut) { - print(" script: ${e.scriptPubkey.bytes}"); - print(" value: ${e.value}"); - } - print("========================================"); - } - } - } - - getBalance() async { - final alice = await lib.getBalance(wallet); - setState(() { - balance = alice.total; - displayText = - "Total Balance: ${alice.total} \n Immature Balance: ${alice.immature}"; - }); - } - - listUnspent() async { - final res = lib.listUnspent(wallet); - for (var e in res) { - setState(() { - displayText = - " OutPoint: { txid:${res.first.outpoint.txid}, vout: ${res.first.outpoint.vout} }"; - }); - if (kDebugMode) { - print("isSpent: ${e.isSpent}"); - print( - "outPoint: { txid:${e.outpoint.txid}, vout: ${e.outpoint.vout} } "); - print( - "txout: { address:${e.txout.scriptPubkey.bytes}, value: ${e.txout.value} }"); - print("==========================="); - } - } - } - - Future getBlockHeight() async { - final res = await blockchain!.getHeight(); - if (kDebugMode) { - print(res); - } - setState(() { - displayText = "Height: $res"; - }); - return res; - } - - getBlockHash() async { - final height = await getBlockHeight(); - final blockHash = await blockchain!.getBlockHash(height: height); - setState(() { - displayText = "BlockHash: $blockHash"; - }); - if (kDebugMode) { - print(blockHash); - } - } - - sendBit(int amountSat) async { - await lib.sendBitcoin(blockchain!, wallet, - "tb1qyhssajdx5vfxuatt082m9tsfmxrxludgqwe52f", amountSat); - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - debugShowCheckedModeBanner: false, - home: Scaffold( - appBar: AppBar( - backgroundColor: Colors.blue, - elevation: 0, - centerTitle: false, - title: const Text('Bdk Wallet', - style: TextStyle( - fontWeight: FontWeight.w900, - fontSize: 16, - color: Colors.white)), // Set this heigh - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - margin: const EdgeInsets.only(bottom: 50), - padding: const EdgeInsets.only(left: 15, right: 15, bottom: 20), - color: Colors.blue, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text("Response: ", - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.white, - fontSize: 12, - fontWeight: FontWeight.w700)), - Expanded( - child: SelectableText( - displayText, - maxLines: 3, - textAlign: TextAlign.start, - style: const TextStyle( - color: Colors.white, - fontSize: 12, - fontWeight: FontWeight.w700), - ), - ), - ], - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - balance.toString(), - style: const TextStyle( - fontWeight: FontWeight.w900, - fontSize: 40, - color: Colors.blue), - ), - const Text( - " sats", - style: TextStyle( - fontWeight: FontWeight.w900, - fontSize: 20, - color: Colors.blue), - ), - ], - ), - TextButton( - onPressed: () => getNewAddress(), - child: const Text( - 'Press to create new Address', - style: TextStyle( - color: Colors.indigoAccent, - fontSize: 12, - height: 1.5, - fontWeight: FontWeight.w800), - )), - TextButton( - onPressed: () async { - await sync(); - }, - child: const Text( - 'Press to sync', - style: TextStyle( - color: Colors.indigoAccent, - fontSize: 12, - height: 1.5, - fontWeight: FontWeight.w800), - )), - TextButton( - onPressed: () => getConfirmedTransactions(), - child: const Text( - 'Get ConfirmedTransactions', - style: TextStyle( - color: Colors.indigoAccent, - fontSize: 12, - height: 1.5, - fontWeight: FontWeight.w800), - )), - TextButton( - onPressed: () => getUnConfirmedTransactions(), - child: const Text( - 'getPendingTransactions', - style: TextStyle( - color: Colors.indigoAccent, - fontSize: 12, - height: 1.5, - fontWeight: FontWeight.w800), - )), - TextButton( - onPressed: () => getBalance(), - child: const Text( - 'get Balance', - style: TextStyle( - color: Colors.indigoAccent, - fontSize: 12, - height: 1.5, - fontWeight: FontWeight.w800), - )), - TextButton( - onPressed: () => listUnspent(), - child: const Text( - 'list Unspent', - style: TextStyle( - color: Colors.indigoAccent, - fontSize: 12, - height: 1.5, - fontWeight: FontWeight.w800), - )), - TextButton( - onPressed: () => sendBit(100000), - child: const Text( - 'Press to send 1200 satoshi', - style: TextStyle( - color: Colors.indigoAccent, - fontSize: 12, - height: 1.5, - fontWeight: FontWeight.w800), - )), - TextButton( - onPressed: () => getBlockHash(), - child: const Text( - 'get BlockHash', - style: TextStyle( - color: Colors.indigoAccent, - fontSize: 12, - height: 1.5, - fontWeight: FontWeight.w800), - )), - TextButton( - onPressed: () => generateMnemonicKeys(), - child: const Text( - 'generate Mnemonic', - style: TextStyle( - color: Colors.indigoAccent, - fontSize: 12, - height: 1.5, - fontWeight: FontWeight.w800), - )), - ], - ), - ), - ), - ); - } -} diff --git a/example/macos/.gitignore b/example/macos/.gitignore deleted file mode 100644 index 746adbb6..00000000 --- a/example/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# 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 deleted file mode 100644 index 4b81f9b2..00000000 --- a/example/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#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 deleted file mode 100644 index 5caa9d15..00000000 --- a/example/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#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 deleted file mode 100644 index cccf817a..00000000 --- a/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { -} diff --git a/example/macos/Podfile b/example/macos/Podfile deleted file mode 100644 index 1f811a92..00000000 --- a/example/macos/Podfile +++ /dev/null @@ -1,43 +0,0 @@ -platform :osx, '14.0' - -# 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 deleted file mode 100644 index 78c676da..00000000 --- a/example/macos/Podfile.lock +++ /dev/null @@ -1,22 +0,0 @@ -PODS: - - bdk_flutter (0.31.3): - - FlutterMacOS - - FlutterMacOS (1.0.0) - -DEPENDENCIES: - - bdk_flutter (from `Flutter/ephemeral/.symlinks/plugins/bdk_flutter/macos`) - - FlutterMacOS (from `Flutter/ephemeral`) - -EXTERNAL SOURCES: - bdk_flutter: - :path: Flutter/ephemeral/.symlinks/plugins/bdk_flutter/macos - FlutterMacOS: - :path: Flutter/ephemeral - -SPEC CHECKSUMS: - bdk_flutter: d0437c6116753242241fed48270587542a636d40 - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - -PODFILE CHECKSUM: 6acf97521436d16fc31cd5e1a02000905acdb3ae - -COCOAPODS: 1.15.2 diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 47e17ee2..00000000 --- a/example/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,791 +0,0 @@ -// !$*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 */; }; - 4DC9B7747876A0FFEB72561D /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45E5FCC6A0CC76E43C906CAE /* Pods_RunnerTests.framework */; }; - 5E9CE529825D65D7646BA6CE /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CF6D2678C9D71A16234D97A5 /* Pods_Runner.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 = ( - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 2776410C499C6CCE9E20D9CE /* 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 = ""; }; - 2E528ACB8C77AD5767B35CFE /* 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 = ""; }; - 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 /* bdk_flutter_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bdk_flutter_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 = ""; }; - 401216304B70411AE0A10C03 /* 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 = ""; }; - 45E5FCC6A0CC76E43C906CAE /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5888751D6342721B83E5C618 /* 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 = ""; }; - 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 = ""; }; - 9E06AB3C6C8CFA4961750B6D /* 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 = ""; }; - ABA8243B555D5099824DA8F1 /* 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 = ""; }; - CF6D2678C9D71A16234D97A5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 331C80D2294CF70F00263BE5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4DC9B7747876A0FFEB72561D /* Pods_RunnerTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E9CE529825D65D7646BA6CE /* 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 = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 331C80D6294CF71000263BE5 /* RunnerTests */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - 4A50BCE68C4903267FD48E25 /* Pods */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* bdk_flutter_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 = ""; - }; - 4A50BCE68C4903267FD48E25 /* Pods */ = { - isa = PBXGroup; - children = ( - 2E528ACB8C77AD5767B35CFE /* Pods-Runner.debug.xcconfig */, - 5888751D6342721B83E5C618 /* Pods-Runner.release.xcconfig */, - 2776410C499C6CCE9E20D9CE /* Pods-Runner.profile.xcconfig */, - 401216304B70411AE0A10C03 /* Pods-RunnerTests.debug.xcconfig */, - 9E06AB3C6C8CFA4961750B6D /* Pods-RunnerTests.release.xcconfig */, - ABA8243B555D5099824DA8F1 /* Pods-RunnerTests.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - CF6D2678C9D71A16234D97A5 /* Pods_Runner.framework */, - 45E5FCC6A0CC76E43C906CAE /* 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 = ( - 70DF19CD3A6839B68909FBF5 /* [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 = ( - 61AAF25F365A4673AA6344C5 /* [CP] Check Pods Manifest.lock */, - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - 3B883BDF694F6878DE26C2F9 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* bdk_flutter_example.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1510; - 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 */, - ); - 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"; - }; - 3B883BDF694F6878DE26C2F9 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 61AAF25F365A4673AA6344C5 /* [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; - }; - 70DF19CD3A6839B68909FBF5 /* [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; - }; -/* 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 = 401216304B70411AE0A10C03 /* 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.bdkFlutterExample.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bdk_flutter_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/bdk_flutter_example"; - }; - name = Debug; - }; - 331C80DC294CF71000263BE5 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9E06AB3C6C8CFA4961750B6D /* 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.bdkFlutterExample.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bdk_flutter_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/bdk_flutter_example"; - }; - name = Release; - }; - 331C80DD294CF71000263BE5 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ABA8243B555D5099824DA8F1 /* 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.bdkFlutterExample.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bdk_flutter_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/bdk_flutter_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", - ); - 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", - ); - 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 deleted file mode 100644 index 18d98100..00000000 --- a/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 4dc93e2a..00000000 --- a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/example/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/example/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/example/macos/Runner/AppDelegate.swift b/example/macos/Runner/AppDelegate.swift deleted file mode 100644 index 8e02df28..00000000 --- a/example/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Cocoa -import FlutterMacOS - -@main -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 deleted file mode 100644 index a2ec33f1..00000000 --- a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "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 deleted file mode 100644 index 82b6f9d9a33e198f5747104729e1fcef999772a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 102994 zcmeEugo5nb1G~3xi~y`}h6XHx5j$(L*3|5S2UfkG$|UCNI>}4f?MfqZ+HW-sRW5RKHEm z^unW*Xx{AH_X3Xdvb%C(Bh6POqg==@d9j=5*}oEny_IS;M3==J`P0R!eD6s~N<36C z*%-OGYqd0AdWClO!Z!}Y1@@RkfeiQ$Ib_ z&fk%T;K9h`{`cX3Hu#?({4WgtmkR!u3ICS~|NqH^fdNz>51-9)OF{|bRLy*RBv#&1 z3Oi_gk=Y5;>`KbHf~w!`u}!&O%ou*Jzf|Sf?J&*f*K8cftMOKswn6|nb1*|!;qSrlw= zr-@X;zGRKs&T$y8ENnFU@_Z~puu(4~Ir)>rbYp{zxcF*!EPS6{(&J}qYpWeqrPWW< zfaApz%<-=KqxrqLLFeV3w0-a0rEaz9&vv^0ZfU%g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zs3 z$sCTuzOye2GdTO;4@;wgJK@!ij-|c--insluCR}{#q=D6Xz#nL6;`rkc*UzLTR%Y{ zN2YK;Zcz4YY=+|(0_?E=#~3U@I1fIyRiBF zIeWj=id+b|L;kSMs>NMfeB^(={IdrC;NYJy_$L+olL`OdOqgH0OpSa?FTRhwb<|%A Pe7HEdAEg|=c=LY&YVNkY 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 deleted file mode 100644 index 13b35eba55c6dabc3aac36f33d859266c18fa0d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5680 zcmaiYXH?Tqu=Xz`p-L#B_gI#0we$cm_HcmYFP$?wjD#BaCN4mzC5#`>w9y6=ThxrYZc0WPXprg zYjB`UsV}0=eUtY$(P6YW}npdd;%9pi?zS3k-nqCob zSX_AQEf|=wYT3r?f!*Yt)ar^;l3Sro{z(7deUBPd2~(SzZ-s@0r&~Km2S?8r##9-< z)2UOSVaHqq6}%sA9Ww;V2LG=PnNAh6mA2iWOuV7T_lRDR z&N8-eN=U)-T|;wo^Wv=34wtV0g}sAAe}`Ph@~!|<;z7*K8(qkX0}o=!(+N*UWrkEja*$_H6mhK1u{P!AC39} z|3+Z(mAOq#XRYS)TLoHv<)d%$$I@+x+2)V{@o~~J-!YUI-Q9%!Ldi4Op&Lw&B>jj* zwAgC#Y>gbIqv!d|J5f!$dbCXoq(l3GR(S>(rtZ~Z*agXMMKN!@mWT_vmCbSd3dUUm z4M&+gz?@^#RRGal%G3dDvj7C5QTb@9+!MG+>0dcjtZEB45c+qx*c?)d<%htn1o!#1 zpIGonh>P1LHu3s)fGFF-qS}AXjW|M*2Xjkh7(~r(lN=o#mBD9?jt74=Rz85I4Nfx_ z7Z)q?!};>IUjMNM6ee2Thq7))a>My?iWFxQ&}WvsFP5LP+iGz+QiYek+K1`bZiTV- zHHYng?ct@Uw5!gquJ(tEv1wTr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L)^;;1SsI6Le+c^ULe;O@ zl+Z@OOAr4$a;=I~R0w4jO`*PKBp?3K+uJ+Tu8^%i<_~bU!p%so z^sjol^slR`W@jiqn!M~eClIIl+`A5%lGT{z^mRbpv}~AyO%R*jmG_Wrng{B9TwIuS z0!@fsM~!57K1l0%{yy(#no}roy#r!?0wm~HT!vLDfEBs9x#`9yCKgufm0MjVRfZ=f z4*ZRc2Lgr(P+j2zQE_JzYmP0*;trl7{*N341Cq}%^M^VC3gKG-hY zmPT>ECyrhIoFhnMB^qpdbiuI}pk{qPbK^}0?Rf7^{98+95zNq6!RuV_zAe&nDk0;f zez~oXlE5%ve^TmBEt*x_X#fs(-En$jXr-R4sb$b~`nS=iOy|OVrph(U&cVS!IhmZ~ zKIRA9X%Wp1J=vTvHZ~SDe_JXOe9*fa zgEPf;gD^|qE=dl>Qkx3(80#SE7oxXQ(n4qQ#by{uppSKoDbaq`U+fRqk0BwI>IXV3 zD#K%ASkzd7u>@|pA=)Z>rQr@dLH}*r7r0ng zxa^eME+l*s7{5TNu!+bD{Pp@2)v%g6^>yj{XP&mShhg9GszNu4ITW=XCIUp2Xro&1 zg_D=J3r)6hp$8+94?D$Yn2@Kp-3LDsci)<-H!wCeQt$e9Jk)K86hvV^*Nj-Ea*o;G zsuhRw$H{$o>8qByz1V!(yV{p_0X?Kmy%g#1oSmlHsw;FQ%j9S#}ha zm0Nx09@jmOtP8Q+onN^BAgd8QI^(y!n;-APUpo5WVdmp8!`yKTlF>cqn>ag`4;o>i zl!M0G-(S*fm6VjYy}J}0nX7nJ$h`|b&KuW4d&W5IhbR;-)*9Y0(Jj|@j`$xoPQ=Cl 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 deleted file mode 100644 index 0a3f5fa40fb3d1e0710331a48de5d256da3f275d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 520 zcmeAS@N?(olHy`u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3Rve&yVZ#{Q1*CO8c+qSr^Z#CN;)(X5>tGG5yUw3<+CfhaL z%bP;hZ?jvgJU67BWyiy74_)6r)_nSxttxn0`0?HE^5(uydHVgP+HE$V?Lv)Leti43 zWA|;f-RqX``95>)^P-fw!Vi{3KNsII-*5f){gdxqd%gVdB1sOBNe=nEW%;i~g_P8J w!5uhoe-Jcg1nPN%MiEAtgE$;km@@t6ukO)1^!cY^83Pb_y85}Sb4q9e0FIsP9{>OV 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 deleted file mode 100644 index 2f1632cfddf3d9dade342351e627a0a75609fb46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2218 zcmV;b2vzrqP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAuE6iGxuRCodHTWf3-RTMruyW6Fu zQYeUM04eX6D5c0FCjKKPrco1(K`<0SL=crI{PC3-^hZU0kQie$gh-5!7z6SH6Q0J% zqot*`H1q{R5fHFYS}dje@;kG=v$L0(yY0?wY2%*c?A&{2?!D*x?m71{of2gv!$5|C z3>qG_BW}7K_yUcT3A5C6QD<+{aq?x;MAUyAiJn#Jv8_zZtQ{P zTRzbL3U9!qVuZzS$xKU10KiW~Bgdcv1-!uAhQxf3a7q+dU6lj?yoO4Lq4TUN4}h{N z*fIM=SS8|C2$(T>w$`t@3Tka!(r!7W`x z-isCVgQD^mG-MJ;XtJuK3V{Vy72GQ83KRWsHU?e*wrhKk=ApIYeDqLi;JI1e zuvv}5^Dc=k7F7?nm3nIw$NVmU-+R>> zyqOR$-2SDpJ}Pt;^RkJytDVXNTsu|mI1`~G7yw`EJR?VkGfNdqK9^^8P`JdtTV&tX4CNcV4 z&N06nZa??Fw1AgQOUSE2AmPE@WO(Fvo`%m`cDgiv(fAeRA%3AGXUbsGw{7Q`cY;1BI#ac3iN$$Hw z0LT0;xc%=q)me?Y*$xI@GRAw?+}>=9D+KTk??-HJ4=A>`V&vKFS75@MKdSF1JTq{S zc1!^8?YA|t+uKigaq!sT;Z!&0F2=k7F0PIU;F$leJLaw2UI6FL^w}OG&!;+b%ya1c z1n+6-inU<0VM-Y_s5iTElq)ThyF?StVcebpGI znw#+zLx2@ah{$_2jn+@}(zJZ{+}_N9BM;z)0yr|gF-4=Iyu@hI*Lk=-A8f#bAzc9f z`Kd6K--x@t04swJVC3JK1cHY-Hq+=|PN-VO;?^_C#;coU6TDP7Bt`;{JTG;!+jj(` zw5cLQ-(Cz-Tlb`A^w7|R56Ce;Wmr0)$KWOUZ6ai0PhzPeHwdl0H(etP zUV`va_i0s-4#DkNM8lUlqI7>YQLf)(lz9Q3Uw`)nc(z3{m5ZE77Ul$V%m)E}3&8L0 z-XaU|eB~Is08eORPk;=<>!1w)Kf}FOVS2l&9~A+@R#koFJ$Czd%Y(ENTV&A~U(IPI z;UY+gf+&6ioZ=roly<0Yst8ck>(M=S?B-ys3mLdM&)ex!hbt+ol|T6CTS+Sc0jv(& z7ijdvFwBq;0a{%3GGwkDKTeG`b+lyj0jjS1OMkYnepCdoosNY`*zmBIo*981BU%%U z@~$z0V`OVtIbEx5pa|Tct|Lg#ZQf5OYMUMRD>Wdxm5SAqV2}3!ceE-M2 z@O~lQ0OiKQp}o9I;?uxCgYVV?FH|?Riri*U$Zi_`V2eiA>l zdSm6;SEm6#T+SpcE8Ro_f2AwxzI z44hfe^WE3!h@W3RDyA_H440cpmYkv*)6m1XazTqw%=E5Xv7^@^^T7Q2wxr+Z2kVYr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/macos/Runner/Configs/AppInfo.xcconfig b/example/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 2660ca3e..00000000 --- a/example/macos/Runner/Configs/AppInfo.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// 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 = bdk_flutter_example - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.bdkFlutterExample - -// 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 deleted file mode 100644 index 36b0fd94..00000000 --- a/example/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/example/macos/Runner/Configs/Release.xcconfig b/example/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f495..00000000 --- a/example/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/example/macos/Runner/Configs/Warnings.xcconfig b/example/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf47..00000000 --- a/example/macos/Runner/Configs/Warnings.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index c946719a..00000000 --- a/example/macos/Runner/DebugProfile.entitlements +++ /dev/null @@ -1,14 +0,0 @@ - - - - - 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 deleted file mode 100644 index 4789daa6..00000000 --- a/example/macos/Runner/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 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 deleted file mode 100644 index 3cc05eb2..00000000 --- a/example/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 852fa1a4..00000000 --- a/example/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/example/pubspec.yaml b/example/pubspec.yaml deleted file mode 100644 index 549e6f2f..00000000 --- a/example/pubspec.yaml +++ /dev/null @@ -1,86 +0,0 @@ -name: bdk_flutter_example -description: Demonstrates how to use the bdk_flutter plugin. - -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -environment: - sdk: '>=3.0.0 <4.0.0' - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - flutter: - sdk: flutter - - bdk_flutter: - # When depending on this package from a real application you should use: - # bdk_flutter: ^x.y.z - # See https://dart.dev/tools/pub/dependencies#version-constraints - # The example app is bundled with the plugin so we use a path dependency on - # the parent directory to use the current plugin's version. - path: ../ - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 -dev_dependencies: - flutter_test: - sdk: flutter - integration_test: - sdk: flutter - flutter_driver: - sdk: flutter - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^2.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/flutter_rust_bridge.yaml b/flutter_rust_bridge.yaml deleted file mode 100644 index 0a112455..00000000 --- a/flutter_rust_bridge.yaml +++ /dev/null @@ -1,10 +0,0 @@ -rust_input: crate::api -rust_root: rust/ -dart_output: lib/src/generated/ -full_dep: true -web: false -dart3: true -enable_lifetime: true -c_output: ios/Classes/frb_generated.h -duplicated_c_output: [macos/Classes/frb_generated.h] -dart_entrypoint_class_name: core \ No newline at end of file diff --git a/gradle/plugin.gradle b/gradle/plugin.gradle new file mode 100644 index 00000000..37dd086a --- /dev/null +++ b/gradle/plugin.gradle @@ -0,0 +1,176 @@ +import java.nio.file.Paths +import org.apache.tools.ant.taskdefs.condition.Os + +CargoKitPlugin.file = buildscript.sourceFile + +apply plugin: CargoKitPlugin + +class CargoKitExtension { + String manifestDir; // Relative path to folder containing Cargo.toml + String libname; // Library name within Cargo.toml. Must be a cdylib +} + +abstract class CargoKitBuildTask extends DefaultTask { + + @Input + String buildMode + + @Input + String buildDir + + @Input + String outputDir + + @Input + String ndkVersion + + @Input + String sdkDirectory + + @Input + int compileSdkVersion; + + @Input + int minSdkVersion; + + @Input + String pluginFile + + @Input + List targetPlatforms + + @TaskAction + def build() { + if (project.cargokit.manifestDir == null) { + throw new GradleException("Property 'manifestDir' must be set on cargokit extension"); + } + + if (project.cargokit.libname == null) { + throw new GradleException("Property 'libname' must be set on cargokit extension"); + } + + def executableName = Os.isFamily(Os.FAMILY_WINDOWS) ? "run_build_tool.cmd" : "run_build_tool.sh" + def path = Paths.get(new File(pluginFile).parent, "..", executableName); + + def manifestDir = Paths.get(project.buildscript.sourceFile.parent, project.cargokit.manifestDir) + + def rootProjectDir = project.rootProject.projectDir + + if (!Os.isFamily(Os.FAMILY_WINDOWS)) { + project.exec { + commandLine 'chmod', '+x', path + } + } + + project.exec { + executable path + args "build-gradle" + environment "CARGOKIT_ROOT_PROJECT_DIR", rootProjectDir + environment "CARGOKIT_TOOL_TEMP_DIR", "${buildDir}/build_tool" + environment "CARGOKIT_MANIFEST_DIR", manifestDir + environment "CARGOKIT_CONFIGURATION", buildMode + environment "CARGOKIT_TARGET_TEMP_DIR", buildDir + environment "CARGOKIT_OUTPUT_DIR", outputDir + environment "CARGOKIT_NDK_VERSION", ndkVersion + environment "CARGOKIT_SDK_DIR", sdkDirectory + environment "CARGOKIT_COMPILE_SDK_VERSION", compileSdkVersion + environment "CARGOKIT_MIN_SDK_VERSION", minSdkVersion + environment "CARGOKIT_TARGET_PLATFORMS", targetPlatforms.join(",") + environment "CARGOKIT_JAVA_HOME", System.properties['java.home'] + } + } +} + +class CargoKitPlugin implements Plugin { + + static String file; + + private Plugin findFlutterPlugin(Project rootProject) { + _findFlutterPlugin(rootProject.childProjects) + } + + private Plugin _findFlutterPlugin(Map projects) { + for (project in projects) { + for (plugin in project.value.getPlugins()) { + if (plugin.class.name == "FlutterPlugin") { + return plugin; + } + } + def plugin = _findFlutterPlugin(project.value.childProjects); + if (plugin != null) { + return plugin; + } + } + return null; + } + + @Override + void apply(Project project) { + def plugin = findFlutterPlugin(project.rootProject); + + project.extensions.create("cargokit", CargoKitExtension) + + if (plugin == null) { + print("Flutter plugin not found, CargoKit plugin will not be applied.") + return; + } + + def cargoBuildDir = "${project.buildDir}/build" + + // Determine if the project is an application or library + def isApplication = plugin.project.plugins.hasPlugin('com.android.application') + def variants = isApplication ? plugin.project.android.applicationVariants : plugin.project.android.libraryVariants + + variants.all { variant -> + + final buildType = variant.buildType.name + + def cargoOutputDir = "${project.buildDir}/jniLibs/${buildType}"; + def jniLibs = project.android.sourceSets.maybeCreate(buildType).jniLibs; + jniLibs.srcDir(new File(cargoOutputDir)) + + def platforms = plugin.getTargetPlatforms().collect() + + // Same thing addFlutterDependencies does in flutter.gradle + if (buildType == "debug") { + platforms.add("android-x86") + platforms.add("android-x64") + } + + // The task name depends on plugin properties, which are not available + // at this point + project.getGradle().afterProject { + def taskName = "cargokitCargoBuild${project.cargokit.libname.capitalize()}${buildType.capitalize()}"; + + if (project.tasks.findByName(taskName)) { + return + } + + if (plugin.project.android.ndkVersion == null) { + throw new GradleException("Please set 'android.ndkVersion' in 'app/build.gradle'.") + } + + def task = project.tasks.create(taskName, CargoKitBuildTask.class) { + buildMode = variant.buildType.name + buildDir = cargoBuildDir + outputDir = cargoOutputDir + ndkVersion = plugin.project.android.ndkVersion + sdkDirectory = plugin.project.android.sdkDirectory + minSdkVersion = plugin.project.android.defaultConfig.minSdkVersion.apiLevel as int + compileSdkVersion = plugin.project.android.compileSdkVersion.substring(8) as int + targetPlatforms = platforms + pluginFile = CargoKitPlugin.file + } + def onTask = { newTask -> + if (newTask.name == "merge${buildType.capitalize()}NativeLibs") { + newTask.dependsOn task + // Fix gradle 7.4.2 not picking up JNI library changes + newTask.outputs.upToDateWhen { false } + } + } + project.tasks.each onTask + project.tasks.whenTaskAdded onTask + } + } + } +} diff --git a/ios/.gitignore b/ios/.gitignore deleted file mode 100644 index 09a762be..00000000 --- a/ios/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/Generated.xcconfig -/Flutter/ephemeral/ -/Flutter/flutter_export_environment.sh -Flutter/ -Frameworks/* -!Frameworks/.gitkeep diff --git a/ios/Classes/EnforceBundling.swift b/ios/Classes/EnforceBundling.swift deleted file mode 100644 index f95cacb9..00000000 --- a/ios/Classes/EnforceBundling.swift +++ /dev/null @@ -1,4 +0,0 @@ -public func dummyMethodToEnforceBundling() -> Int64 { - return dummy_method_to_enforce_bundling() -} -let dummyVar = dummyMethodToEnforceBundling(); diff --git a/ios/Classes/bdk_flutter.c b/ios/Classes/bdk_flutter.c deleted file mode 100644 index e69de29b..00000000 diff --git a/ios/Classes/frb_generated.h b/ios/Classes/frb_generated.h deleted file mode 100644 index 2430b240..00000000 --- a/ios/Classes/frb_generated.h +++ /dev/null @@ -1,1542 +0,0 @@ -#include -#include -#include -// EXTRA BEGIN -typedef struct DartCObject *WireSyncRust2DartDco; -typedef struct WireSyncRust2DartSse { - uint8_t *ptr; - int32_t len; -} WireSyncRust2DartSse; - -typedef int64_t DartPort; -typedef bool (*DartPostCObjectFnType)(DartPort port_id, void *message); -void store_dart_post_cobject(DartPostCObjectFnType ptr); -// EXTRA END -typedef struct _Dart_Handle* Dart_Handle; - -typedef struct wire_cst_bdk_blockchain { - uintptr_t ptr; -} wire_cst_bdk_blockchain; - -typedef struct wire_cst_list_prim_u_8_strict { - uint8_t *ptr; - int32_t len; -} wire_cst_list_prim_u_8_strict; - -typedef struct wire_cst_bdk_transaction { - struct wire_cst_list_prim_u_8_strict *s; -} wire_cst_bdk_transaction; - -typedef struct wire_cst_electrum_config { - struct wire_cst_list_prim_u_8_strict *url; - struct wire_cst_list_prim_u_8_strict *socks5; - uint8_t retry; - uint8_t *timeout; - uint64_t stop_gap; - bool validate_domain; -} wire_cst_electrum_config; - -typedef struct wire_cst_BlockchainConfig_Electrum { - struct wire_cst_electrum_config *config; -} wire_cst_BlockchainConfig_Electrum; - -typedef struct wire_cst_esplora_config { - struct wire_cst_list_prim_u_8_strict *base_url; - struct wire_cst_list_prim_u_8_strict *proxy; - uint8_t *concurrency; - uint64_t stop_gap; - uint64_t *timeout; -} wire_cst_esplora_config; - -typedef struct wire_cst_BlockchainConfig_Esplora { - struct wire_cst_esplora_config *config; -} wire_cst_BlockchainConfig_Esplora; - -typedef struct wire_cst_Auth_UserPass { - struct wire_cst_list_prim_u_8_strict *username; - struct wire_cst_list_prim_u_8_strict *password; -} wire_cst_Auth_UserPass; - -typedef struct wire_cst_Auth_Cookie { - struct wire_cst_list_prim_u_8_strict *file; -} wire_cst_Auth_Cookie; - -typedef union AuthKind { - struct wire_cst_Auth_UserPass UserPass; - struct wire_cst_Auth_Cookie Cookie; -} AuthKind; - -typedef struct wire_cst_auth { - int32_t tag; - union AuthKind kind; -} wire_cst_auth; - -typedef struct wire_cst_rpc_sync_params { - uint64_t start_script_count; - uint64_t start_time; - bool force_start_time; - uint64_t poll_rate_sec; -} wire_cst_rpc_sync_params; - -typedef struct wire_cst_rpc_config { - struct wire_cst_list_prim_u_8_strict *url; - struct wire_cst_auth auth; - int32_t network; - struct wire_cst_list_prim_u_8_strict *wallet_name; - struct wire_cst_rpc_sync_params *sync_params; -} wire_cst_rpc_config; - -typedef struct wire_cst_BlockchainConfig_Rpc { - struct wire_cst_rpc_config *config; -} wire_cst_BlockchainConfig_Rpc; - -typedef union BlockchainConfigKind { - struct wire_cst_BlockchainConfig_Electrum Electrum; - struct wire_cst_BlockchainConfig_Esplora Esplora; - struct wire_cst_BlockchainConfig_Rpc Rpc; -} BlockchainConfigKind; - -typedef struct wire_cst_blockchain_config { - int32_t tag; - union BlockchainConfigKind kind; -} wire_cst_blockchain_config; - -typedef struct wire_cst_bdk_descriptor { - uintptr_t extended_descriptor; - uintptr_t key_map; -} wire_cst_bdk_descriptor; - -typedef struct wire_cst_bdk_descriptor_secret_key { - uintptr_t ptr; -} wire_cst_bdk_descriptor_secret_key; - -typedef struct wire_cst_bdk_descriptor_public_key { - uintptr_t ptr; -} wire_cst_bdk_descriptor_public_key; - -typedef struct wire_cst_bdk_derivation_path { - uintptr_t ptr; -} wire_cst_bdk_derivation_path; - -typedef struct wire_cst_bdk_mnemonic { - uintptr_t ptr; -} wire_cst_bdk_mnemonic; - -typedef struct wire_cst_list_prim_u_8_loose { - uint8_t *ptr; - int32_t len; -} wire_cst_list_prim_u_8_loose; - -typedef struct wire_cst_bdk_psbt { - uintptr_t ptr; -} wire_cst_bdk_psbt; - -typedef struct wire_cst_bdk_address { - uintptr_t ptr; -} wire_cst_bdk_address; - -typedef struct wire_cst_bdk_script_buf { - struct wire_cst_list_prim_u_8_strict *bytes; -} wire_cst_bdk_script_buf; - -typedef struct wire_cst_bdk_policy { - uintptr_t ptr; -} wire_cst_bdk_policy; - -typedef struct wire_cst_LockTime_Blocks { - uint32_t field0; -} wire_cst_LockTime_Blocks; - -typedef struct wire_cst_LockTime_Seconds { - uint32_t field0; -} wire_cst_LockTime_Seconds; - -typedef union LockTimeKind { - struct wire_cst_LockTime_Blocks Blocks; - struct wire_cst_LockTime_Seconds Seconds; -} LockTimeKind; - -typedef struct wire_cst_lock_time { - int32_t tag; - union LockTimeKind kind; -} wire_cst_lock_time; - -typedef struct wire_cst_out_point { - struct wire_cst_list_prim_u_8_strict *txid; - uint32_t vout; -} wire_cst_out_point; - -typedef struct wire_cst_list_list_prim_u_8_strict { - struct wire_cst_list_prim_u_8_strict **ptr; - int32_t len; -} wire_cst_list_list_prim_u_8_strict; - -typedef struct wire_cst_tx_in { - struct wire_cst_out_point previous_output; - struct wire_cst_bdk_script_buf script_sig; - uint32_t sequence; - struct wire_cst_list_list_prim_u_8_strict *witness; -} wire_cst_tx_in; - -typedef struct wire_cst_list_tx_in { - struct wire_cst_tx_in *ptr; - int32_t len; -} wire_cst_list_tx_in; - -typedef struct wire_cst_tx_out { - uint64_t value; - struct wire_cst_bdk_script_buf script_pubkey; -} wire_cst_tx_out; - -typedef struct wire_cst_list_tx_out { - struct wire_cst_tx_out *ptr; - int32_t len; -} wire_cst_list_tx_out; - -typedef struct wire_cst_bdk_wallet { - uintptr_t ptr; -} wire_cst_bdk_wallet; - -typedef struct wire_cst_AddressIndex_Peek { - uint32_t index; -} wire_cst_AddressIndex_Peek; - -typedef struct wire_cst_AddressIndex_Reset { - uint32_t index; -} wire_cst_AddressIndex_Reset; - -typedef union AddressIndexKind { - struct wire_cst_AddressIndex_Peek Peek; - struct wire_cst_AddressIndex_Reset Reset; -} AddressIndexKind; - -typedef struct wire_cst_address_index { - int32_t tag; - union AddressIndexKind kind; -} wire_cst_address_index; - -typedef struct wire_cst_local_utxo { - struct wire_cst_out_point outpoint; - struct wire_cst_tx_out txout; - int32_t keychain; - bool is_spent; -} wire_cst_local_utxo; - -typedef struct wire_cst_psbt_sig_hash_type { - uint32_t inner; -} wire_cst_psbt_sig_hash_type; - -typedef struct wire_cst_sqlite_db_configuration { - struct wire_cst_list_prim_u_8_strict *path; -} wire_cst_sqlite_db_configuration; - -typedef struct wire_cst_DatabaseConfig_Sqlite { - struct wire_cst_sqlite_db_configuration *config; -} wire_cst_DatabaseConfig_Sqlite; - -typedef struct wire_cst_sled_db_configuration { - struct wire_cst_list_prim_u_8_strict *path; - struct wire_cst_list_prim_u_8_strict *tree_name; -} wire_cst_sled_db_configuration; - -typedef struct wire_cst_DatabaseConfig_Sled { - struct wire_cst_sled_db_configuration *config; -} wire_cst_DatabaseConfig_Sled; - -typedef union DatabaseConfigKind { - struct wire_cst_DatabaseConfig_Sqlite Sqlite; - struct wire_cst_DatabaseConfig_Sled Sled; -} DatabaseConfigKind; - -typedef struct wire_cst_database_config { - int32_t tag; - union DatabaseConfigKind kind; -} wire_cst_database_config; - -typedef struct wire_cst_sign_options { - bool trust_witness_utxo; - uint32_t *assume_height; - bool allow_all_sighashes; - bool remove_partial_sigs; - bool try_finalize; - bool sign_with_tap_internal_key; - bool allow_grinding; -} wire_cst_sign_options; - -typedef struct wire_cst_script_amount { - struct wire_cst_bdk_script_buf script; - uint64_t amount; -} wire_cst_script_amount; - -typedef struct wire_cst_list_script_amount { - struct wire_cst_script_amount *ptr; - int32_t len; -} wire_cst_list_script_amount; - -typedef struct wire_cst_list_out_point { - struct wire_cst_out_point *ptr; - int32_t len; -} wire_cst_list_out_point; - -typedef struct wire_cst_input { - struct wire_cst_list_prim_u_8_strict *s; -} wire_cst_input; - -typedef struct wire_cst_record_out_point_input_usize { - struct wire_cst_out_point field0; - struct wire_cst_input field1; - uintptr_t field2; -} wire_cst_record_out_point_input_usize; - -typedef struct wire_cst_RbfValue_Value { - uint32_t field0; -} wire_cst_RbfValue_Value; - -typedef union RbfValueKind { - struct wire_cst_RbfValue_Value Value; -} RbfValueKind; - -typedef struct wire_cst_rbf_value { - int32_t tag; - union RbfValueKind kind; -} wire_cst_rbf_value; - -typedef struct wire_cst_list_prim_u_32_strict { - uint32_t *ptr; - int32_t len; -} wire_cst_list_prim_u_32_strict; - -typedef struct wire_cst_record_string_list_prim_u_32_strict { - struct wire_cst_list_prim_u_8_strict *field0; - struct wire_cst_list_prim_u_32_strict *field1; -} wire_cst_record_string_list_prim_u_32_strict; - -typedef struct wire_cst_list_record_string_list_prim_u_32_strict { - struct wire_cst_record_string_list_prim_u_32_strict *ptr; - int32_t len; -} wire_cst_list_record_string_list_prim_u_32_strict; - -typedef struct wire_cst_AddressError_Base58 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_Base58; - -typedef struct wire_cst_AddressError_Bech32 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_Bech32; - -typedef struct wire_cst_AddressError_InvalidBech32Variant { - int32_t expected; - int32_t found; -} wire_cst_AddressError_InvalidBech32Variant; - -typedef struct wire_cst_AddressError_InvalidWitnessVersion { - uint8_t field0; -} wire_cst_AddressError_InvalidWitnessVersion; - -typedef struct wire_cst_AddressError_UnparsableWitnessVersion { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_UnparsableWitnessVersion; - -typedef struct wire_cst_AddressError_InvalidWitnessProgramLength { - uintptr_t field0; -} wire_cst_AddressError_InvalidWitnessProgramLength; - -typedef struct wire_cst_AddressError_InvalidSegwitV0ProgramLength { - uintptr_t field0; -} wire_cst_AddressError_InvalidSegwitV0ProgramLength; - -typedef struct wire_cst_AddressError_UnknownAddressType { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_UnknownAddressType; - -typedef struct wire_cst_AddressError_NetworkValidation { - int32_t network_required; - int32_t network_found; - struct wire_cst_list_prim_u_8_strict *address; -} wire_cst_AddressError_NetworkValidation; - -typedef union AddressErrorKind { - struct wire_cst_AddressError_Base58 Base58; - struct wire_cst_AddressError_Bech32 Bech32; - struct wire_cst_AddressError_InvalidBech32Variant InvalidBech32Variant; - struct wire_cst_AddressError_InvalidWitnessVersion InvalidWitnessVersion; - struct wire_cst_AddressError_UnparsableWitnessVersion UnparsableWitnessVersion; - struct wire_cst_AddressError_InvalidWitnessProgramLength InvalidWitnessProgramLength; - struct wire_cst_AddressError_InvalidSegwitV0ProgramLength InvalidSegwitV0ProgramLength; - struct wire_cst_AddressError_UnknownAddressType UnknownAddressType; - struct wire_cst_AddressError_NetworkValidation NetworkValidation; -} AddressErrorKind; - -typedef struct wire_cst_address_error { - int32_t tag; - union AddressErrorKind kind; -} wire_cst_address_error; - -typedef struct wire_cst_block_time { - uint32_t height; - uint64_t timestamp; -} wire_cst_block_time; - -typedef struct wire_cst_condition { - uint32_t *csv; - struct wire_cst_lock_time *timelock; -} wire_cst_condition; - -typedef struct wire_cst_ConsensusError_Io { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_ConsensusError_Io; - -typedef struct wire_cst_ConsensusError_OversizedVectorAllocation { - uintptr_t requested; - uintptr_t max; -} wire_cst_ConsensusError_OversizedVectorAllocation; - -typedef struct wire_cst_ConsensusError_InvalidChecksum { - struct wire_cst_list_prim_u_8_strict *expected; - struct wire_cst_list_prim_u_8_strict *actual; -} wire_cst_ConsensusError_InvalidChecksum; - -typedef struct wire_cst_ConsensusError_ParseFailed { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_ConsensusError_ParseFailed; - -typedef struct wire_cst_ConsensusError_UnsupportedSegwitFlag { - uint8_t field0; -} wire_cst_ConsensusError_UnsupportedSegwitFlag; - -typedef union ConsensusErrorKind { - struct wire_cst_ConsensusError_Io Io; - struct wire_cst_ConsensusError_OversizedVectorAllocation OversizedVectorAllocation; - struct wire_cst_ConsensusError_InvalidChecksum InvalidChecksum; - struct wire_cst_ConsensusError_ParseFailed ParseFailed; - struct wire_cst_ConsensusError_UnsupportedSegwitFlag UnsupportedSegwitFlag; -} ConsensusErrorKind; - -typedef struct wire_cst_consensus_error { - int32_t tag; - union ConsensusErrorKind kind; -} wire_cst_consensus_error; - -typedef struct wire_cst_DescriptorError_Key { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Key; - -typedef struct wire_cst_DescriptorError_Policy { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Policy; - -typedef struct wire_cst_DescriptorError_InvalidDescriptorCharacter { - uint8_t field0; -} wire_cst_DescriptorError_InvalidDescriptorCharacter; - -typedef struct wire_cst_DescriptorError_Bip32 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Bip32; - -typedef struct wire_cst_DescriptorError_Base58 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Base58; - -typedef struct wire_cst_DescriptorError_Pk { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Pk; - -typedef struct wire_cst_DescriptorError_Miniscript { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Miniscript; - -typedef struct wire_cst_DescriptorError_Hex { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Hex; - -typedef union DescriptorErrorKind { - struct wire_cst_DescriptorError_Key Key; - struct wire_cst_DescriptorError_Policy Policy; - struct wire_cst_DescriptorError_InvalidDescriptorCharacter InvalidDescriptorCharacter; - struct wire_cst_DescriptorError_Bip32 Bip32; - struct wire_cst_DescriptorError_Base58 Base58; - struct wire_cst_DescriptorError_Pk Pk; - struct wire_cst_DescriptorError_Miniscript Miniscript; - struct wire_cst_DescriptorError_Hex Hex; -} DescriptorErrorKind; - -typedef struct wire_cst_descriptor_error { - int32_t tag; - union DescriptorErrorKind kind; -} wire_cst_descriptor_error; - -typedef struct wire_cst_fee_rate { - float sat_per_vb; -} wire_cst_fee_rate; - -typedef struct wire_cst_HexError_InvalidChar { - uint8_t field0; -} wire_cst_HexError_InvalidChar; - -typedef struct wire_cst_HexError_OddLengthString { - uintptr_t field0; -} wire_cst_HexError_OddLengthString; - -typedef struct wire_cst_HexError_InvalidLength { - uintptr_t field0; - uintptr_t field1; -} wire_cst_HexError_InvalidLength; - -typedef union HexErrorKind { - struct wire_cst_HexError_InvalidChar InvalidChar; - struct wire_cst_HexError_OddLengthString OddLengthString; - struct wire_cst_HexError_InvalidLength InvalidLength; -} HexErrorKind; - -typedef struct wire_cst_hex_error { - int32_t tag; - union HexErrorKind kind; -} wire_cst_hex_error; - -typedef struct wire_cst_PkOrF_Pubkey { - struct wire_cst_list_prim_u_8_strict *value; -} wire_cst_PkOrF_Pubkey; - -typedef struct wire_cst_PkOrF_XOnlyPubkey { - struct wire_cst_list_prim_u_8_strict *value; -} wire_cst_PkOrF_XOnlyPubkey; - -typedef struct wire_cst_PkOrF_Fingerprint { - struct wire_cst_list_prim_u_8_strict *value; -} wire_cst_PkOrF_Fingerprint; - -typedef union PkOrFKind { - struct wire_cst_PkOrF_Pubkey Pubkey; - struct wire_cst_PkOrF_XOnlyPubkey XOnlyPubkey; - struct wire_cst_PkOrF_Fingerprint Fingerprint; -} PkOrFKind; - -typedef struct wire_cst_pk_or_f { - int32_t tag; - union PkOrFKind kind; -} wire_cst_pk_or_f; - -typedef struct wire_cst_list_bdk_policy { - struct wire_cst_bdk_policy *ptr; - int32_t len; -} wire_cst_list_bdk_policy; - -typedef struct wire_cst_list_condition { - struct wire_cst_condition *ptr; - int32_t len; -} wire_cst_list_condition; - -typedef struct wire_cst_list_local_utxo { - struct wire_cst_local_utxo *ptr; - int32_t len; -} wire_cst_list_local_utxo; - -typedef struct wire_cst_list_pk_or_f { - struct wire_cst_pk_or_f *ptr; - int32_t len; -} wire_cst_list_pk_or_f; - -typedef struct wire_cst_list_prim_u_64_strict { - uint64_t *ptr; - int32_t len; -} wire_cst_list_prim_u_64_strict; - -typedef struct wire_cst_record_list_prim_u_32_strict_list_condition { - struct wire_cst_list_prim_u_32_strict *field0; - struct wire_cst_list_condition *field1; -} wire_cst_record_list_prim_u_32_strict_list_condition; - -typedef struct wire_cst_list_record_list_prim_u_32_strict_list_condition { - struct wire_cst_record_list_prim_u_32_strict_list_condition *ptr; - int32_t len; -} wire_cst_list_record_list_prim_u_32_strict_list_condition; - -typedef struct wire_cst_record_u_32_list_condition { - uint32_t field0; - struct wire_cst_list_condition *field1; -} wire_cst_record_u_32_list_condition; - -typedef struct wire_cst_list_record_u_32_list_condition { - struct wire_cst_record_u_32_list_condition *ptr; - int32_t len; -} wire_cst_list_record_u_32_list_condition; - -typedef struct wire_cst_transaction_details { - struct wire_cst_bdk_transaction *transaction; - struct wire_cst_list_prim_u_8_strict *txid; - uint64_t received; - uint64_t sent; - uint64_t *fee; - struct wire_cst_block_time *confirmation_time; -} wire_cst_transaction_details; - -typedef struct wire_cst_list_transaction_details { - struct wire_cst_transaction_details *ptr; - int32_t len; -} wire_cst_list_transaction_details; - -typedef struct wire_cst_balance { - uint64_t immature; - uint64_t trusted_pending; - uint64_t untrusted_pending; - uint64_t confirmed; - uint64_t spendable; - uint64_t total; -} wire_cst_balance; - -typedef struct wire_cst_BdkError_Hex { - struct wire_cst_hex_error *field0; -} wire_cst_BdkError_Hex; - -typedef struct wire_cst_BdkError_Consensus { - struct wire_cst_consensus_error *field0; -} wire_cst_BdkError_Consensus; - -typedef struct wire_cst_BdkError_VerifyTransaction { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_VerifyTransaction; - -typedef struct wire_cst_BdkError_Address { - struct wire_cst_address_error *field0; -} wire_cst_BdkError_Address; - -typedef struct wire_cst_BdkError_Descriptor { - struct wire_cst_descriptor_error *field0; -} wire_cst_BdkError_Descriptor; - -typedef struct wire_cst_BdkError_InvalidU32Bytes { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidU32Bytes; - -typedef struct wire_cst_BdkError_Generic { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Generic; - -typedef struct wire_cst_BdkError_OutputBelowDustLimit { - uintptr_t field0; -} wire_cst_BdkError_OutputBelowDustLimit; - -typedef struct wire_cst_BdkError_InsufficientFunds { - uint64_t needed; - uint64_t available; -} wire_cst_BdkError_InsufficientFunds; - -typedef struct wire_cst_BdkError_FeeRateTooLow { - float needed; -} wire_cst_BdkError_FeeRateTooLow; - -typedef struct wire_cst_BdkError_FeeTooLow { - uint64_t needed; -} wire_cst_BdkError_FeeTooLow; - -typedef struct wire_cst_BdkError_MissingKeyOrigin { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_MissingKeyOrigin; - -typedef struct wire_cst_BdkError_Key { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Key; - -typedef struct wire_cst_BdkError_SpendingPolicyRequired { - int32_t field0; -} wire_cst_BdkError_SpendingPolicyRequired; - -typedef struct wire_cst_BdkError_InvalidPolicyPathError { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidPolicyPathError; - -typedef struct wire_cst_BdkError_Signer { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Signer; - -typedef struct wire_cst_BdkError_InvalidNetwork { - int32_t requested; - int32_t found; -} wire_cst_BdkError_InvalidNetwork; - -typedef struct wire_cst_BdkError_InvalidOutpoint { - struct wire_cst_out_point *field0; -} wire_cst_BdkError_InvalidOutpoint; - -typedef struct wire_cst_BdkError_Encode { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Encode; - -typedef struct wire_cst_BdkError_Miniscript { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Miniscript; - -typedef struct wire_cst_BdkError_MiniscriptPsbt { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_MiniscriptPsbt; - -typedef struct wire_cst_BdkError_Bip32 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Bip32; - -typedef struct wire_cst_BdkError_Bip39 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Bip39; - -typedef struct wire_cst_BdkError_Secp256k1 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Secp256k1; - -typedef struct wire_cst_BdkError_Json { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Json; - -typedef struct wire_cst_BdkError_Psbt { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Psbt; - -typedef struct wire_cst_BdkError_PsbtParse { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_PsbtParse; - -typedef struct wire_cst_BdkError_MissingCachedScripts { - uintptr_t field0; - uintptr_t field1; -} wire_cst_BdkError_MissingCachedScripts; - -typedef struct wire_cst_BdkError_Electrum { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Electrum; - -typedef struct wire_cst_BdkError_Esplora { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Esplora; - -typedef struct wire_cst_BdkError_Sled { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Sled; - -typedef struct wire_cst_BdkError_Rpc { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Rpc; - -typedef struct wire_cst_BdkError_Rusqlite { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Rusqlite; - -typedef struct wire_cst_BdkError_InvalidInput { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidInput; - -typedef struct wire_cst_BdkError_InvalidLockTime { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidLockTime; - -typedef struct wire_cst_BdkError_InvalidTransaction { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidTransaction; - -typedef union BdkErrorKind { - struct wire_cst_BdkError_Hex Hex; - struct wire_cst_BdkError_Consensus Consensus; - struct wire_cst_BdkError_VerifyTransaction VerifyTransaction; - struct wire_cst_BdkError_Address Address; - struct wire_cst_BdkError_Descriptor Descriptor; - struct wire_cst_BdkError_InvalidU32Bytes InvalidU32Bytes; - struct wire_cst_BdkError_Generic Generic; - struct wire_cst_BdkError_OutputBelowDustLimit OutputBelowDustLimit; - struct wire_cst_BdkError_InsufficientFunds InsufficientFunds; - struct wire_cst_BdkError_FeeRateTooLow FeeRateTooLow; - struct wire_cst_BdkError_FeeTooLow FeeTooLow; - struct wire_cst_BdkError_MissingKeyOrigin MissingKeyOrigin; - struct wire_cst_BdkError_Key Key; - struct wire_cst_BdkError_SpendingPolicyRequired SpendingPolicyRequired; - struct wire_cst_BdkError_InvalidPolicyPathError InvalidPolicyPathError; - struct wire_cst_BdkError_Signer Signer; - struct wire_cst_BdkError_InvalidNetwork InvalidNetwork; - struct wire_cst_BdkError_InvalidOutpoint InvalidOutpoint; - struct wire_cst_BdkError_Encode Encode; - struct wire_cst_BdkError_Miniscript Miniscript; - struct wire_cst_BdkError_MiniscriptPsbt MiniscriptPsbt; - struct wire_cst_BdkError_Bip32 Bip32; - struct wire_cst_BdkError_Bip39 Bip39; - struct wire_cst_BdkError_Secp256k1 Secp256k1; - struct wire_cst_BdkError_Json Json; - struct wire_cst_BdkError_Psbt Psbt; - struct wire_cst_BdkError_PsbtParse PsbtParse; - struct wire_cst_BdkError_MissingCachedScripts MissingCachedScripts; - struct wire_cst_BdkError_Electrum Electrum; - struct wire_cst_BdkError_Esplora Esplora; - struct wire_cst_BdkError_Sled Sled; - struct wire_cst_BdkError_Rpc Rpc; - struct wire_cst_BdkError_Rusqlite Rusqlite; - struct wire_cst_BdkError_InvalidInput InvalidInput; - struct wire_cst_BdkError_InvalidLockTime InvalidLockTime; - struct wire_cst_BdkError_InvalidTransaction InvalidTransaction; -} BdkErrorKind; - -typedef struct wire_cst_bdk_error { - int32_t tag; - union BdkErrorKind kind; -} wire_cst_bdk_error; - -typedef struct wire_cst_Payload_PubkeyHash { - struct wire_cst_list_prim_u_8_strict *pubkey_hash; -} wire_cst_Payload_PubkeyHash; - -typedef struct wire_cst_Payload_ScriptHash { - struct wire_cst_list_prim_u_8_strict *script_hash; -} wire_cst_Payload_ScriptHash; - -typedef struct wire_cst_Payload_WitnessProgram { - int32_t version; - struct wire_cst_list_prim_u_8_strict *program; -} wire_cst_Payload_WitnessProgram; - -typedef union PayloadKind { - struct wire_cst_Payload_PubkeyHash PubkeyHash; - struct wire_cst_Payload_ScriptHash ScriptHash; - struct wire_cst_Payload_WitnessProgram WitnessProgram; -} PayloadKind; - -typedef struct wire_cst_payload { - int32_t tag; - union PayloadKind kind; -} wire_cst_payload; - -typedef struct wire_cst_record_bdk_address_u_32 { - struct wire_cst_bdk_address field0; - uint32_t field1; -} wire_cst_record_bdk_address_u_32; - -typedef struct wire_cst_record_bdk_psbt_transaction_details { - struct wire_cst_bdk_psbt field0; - struct wire_cst_transaction_details field1; -} wire_cst_record_bdk_psbt_transaction_details; - -typedef struct wire_cst_Satisfaction_Partial { - uint64_t n; - uint64_t m; - struct wire_cst_list_prim_u_64_strict *items; - bool *sorted; - struct wire_cst_list_record_u_32_list_condition *conditions; -} wire_cst_Satisfaction_Partial; - -typedef struct wire_cst_Satisfaction_PartialComplete { - uint64_t n; - uint64_t m; - struct wire_cst_list_prim_u_64_strict *items; - bool *sorted; - struct wire_cst_list_record_list_prim_u_32_strict_list_condition *conditions; -} wire_cst_Satisfaction_PartialComplete; - -typedef struct wire_cst_Satisfaction_Complete { - struct wire_cst_condition *condition; -} wire_cst_Satisfaction_Complete; - -typedef struct wire_cst_Satisfaction_None { - struct wire_cst_list_prim_u_8_strict *msg; -} wire_cst_Satisfaction_None; - -typedef union SatisfactionKind { - struct wire_cst_Satisfaction_Partial Partial; - struct wire_cst_Satisfaction_PartialComplete PartialComplete; - struct wire_cst_Satisfaction_Complete Complete; - struct wire_cst_Satisfaction_None None; -} SatisfactionKind; - -typedef struct wire_cst_satisfaction { - int32_t tag; - union SatisfactionKind kind; -} wire_cst_satisfaction; - -typedef struct wire_cst_SatisfiableItem_EcdsaSignature { - struct wire_cst_pk_or_f *key; -} wire_cst_SatisfiableItem_EcdsaSignature; - -typedef struct wire_cst_SatisfiableItem_SchnorrSignature { - struct wire_cst_pk_or_f *key; -} wire_cst_SatisfiableItem_SchnorrSignature; - -typedef struct wire_cst_SatisfiableItem_Sha256Preimage { - struct wire_cst_list_prim_u_8_strict *hash; -} wire_cst_SatisfiableItem_Sha256Preimage; - -typedef struct wire_cst_SatisfiableItem_Hash256Preimage { - struct wire_cst_list_prim_u_8_strict *hash; -} wire_cst_SatisfiableItem_Hash256Preimage; - -typedef struct wire_cst_SatisfiableItem_Ripemd160Preimage { - struct wire_cst_list_prim_u_8_strict *hash; -} wire_cst_SatisfiableItem_Ripemd160Preimage; - -typedef struct wire_cst_SatisfiableItem_Hash160Preimage { - struct wire_cst_list_prim_u_8_strict *hash; -} wire_cst_SatisfiableItem_Hash160Preimage; - -typedef struct wire_cst_SatisfiableItem_AbsoluteTimelock { - struct wire_cst_lock_time *value; -} wire_cst_SatisfiableItem_AbsoluteTimelock; - -typedef struct wire_cst_SatisfiableItem_RelativeTimelock { - uint32_t value; -} wire_cst_SatisfiableItem_RelativeTimelock; - -typedef struct wire_cst_SatisfiableItem_Multisig { - struct wire_cst_list_pk_or_f *keys; - uint64_t threshold; -} wire_cst_SatisfiableItem_Multisig; - -typedef struct wire_cst_SatisfiableItem_Thresh { - struct wire_cst_list_bdk_policy *items; - uint64_t threshold; -} wire_cst_SatisfiableItem_Thresh; - -typedef union SatisfiableItemKind { - struct wire_cst_SatisfiableItem_EcdsaSignature EcdsaSignature; - struct wire_cst_SatisfiableItem_SchnorrSignature SchnorrSignature; - struct wire_cst_SatisfiableItem_Sha256Preimage Sha256Preimage; - struct wire_cst_SatisfiableItem_Hash256Preimage Hash256Preimage; - struct wire_cst_SatisfiableItem_Ripemd160Preimage Ripemd160Preimage; - struct wire_cst_SatisfiableItem_Hash160Preimage Hash160Preimage; - struct wire_cst_SatisfiableItem_AbsoluteTimelock AbsoluteTimelock; - struct wire_cst_SatisfiableItem_RelativeTimelock RelativeTimelock; - struct wire_cst_SatisfiableItem_Multisig Multisig; - struct wire_cst_SatisfiableItem_Thresh Thresh; -} SatisfiableItemKind; - -typedef struct wire_cst_satisfiable_item { - int32_t tag; - union SatisfiableItemKind kind; -} wire_cst_satisfiable_item; - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast(int64_t port_, - struct wire_cst_bdk_blockchain *ptr, - struct wire_cst_bdk_transaction *transaction); - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create(int64_t port_, - struct wire_cst_blockchain_config *blockchain_config); - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint64_t target); - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint32_t height); - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height(int64_t port_, - struct wire_cst_bdk_blockchain *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string(struct wire_cst_bdk_descriptor *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight(struct wire_cst_bdk_descriptor *that); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new(int64_t port_, - struct wire_cst_list_prim_u_8_strict *descriptor, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, - struct wire_cst_list_prim_u_8_strict *fingerprint, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, - struct wire_cst_list_prim_u_8_strict *fingerprint, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, - struct wire_cst_list_prim_u_8_strict *fingerprint, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, - struct wire_cst_list_prim_u_8_strict *fingerprint, - int32_t keychain_kind, - int32_t network); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private(struct wire_cst_bdk_descriptor *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string(struct wire_cst_bdk_derivation_path *that); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *path); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string(struct wire_cst_bdk_descriptor_public_key *that); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *ptr, - struct wire_cst_bdk_derivation_path *path); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *ptr, - struct wire_cst_bdk_derivation_path *path); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *public_key); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public(struct wire_cst_bdk_descriptor_secret_key *ptr); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string(struct wire_cst_bdk_descriptor_secret_key *that); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create(int64_t port_, - int32_t network, - struct wire_cst_bdk_mnemonic *mnemonic, - struct wire_cst_list_prim_u_8_strict *password); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr, - struct wire_cst_bdk_derivation_path *path); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr, - struct wire_cst_bdk_derivation_path *path); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *secret_key); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes(struct wire_cst_bdk_descriptor_secret_key *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string(struct wire_cst_bdk_mnemonic *that); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy(int64_t port_, - struct wire_cst_list_prim_u_8_loose *entropy); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *mnemonic); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new(int64_t port_, int32_t word_count); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string(struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine(int64_t port_, - struct wire_cst_bdk_psbt *ptr, - struct wire_cst_bdk_psbt *other); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx(struct wire_cst_bdk_psbt *ptr); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate(struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str(int64_t port_, - struct wire_cst_list_prim_u_8_strict *psbt_base64); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string(struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script(int64_t port_, - struct wire_cst_bdk_script_buf *script, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *address, - int32_t network); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network(struct wire_cst_bdk_address *that, - int32_t network); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network(struct wire_cst_bdk_address *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload(struct wire_cst_bdk_address *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script(struct wire_cst_bdk_address *ptr); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri(struct wire_cst_bdk_address *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string(struct wire_cst_bdk_script_buf *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty(void); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity(int64_t port_, - uintptr_t capacity); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes(int64_t port_, - struct wire_cst_list_prim_u_8_loose *transaction_bytes); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new(int64_t port_, - int32_t version, - struct wire_cst_lock_time *lock_time, - struct wire_cst_list_tx_in *input, - struct wire_cst_list_tx_out *output); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight(int64_t port_, - struct wire_cst_bdk_transaction *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance(struct wire_cst_bdk_wallet *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain(struct wire_cst_bdk_wallet *ptr, - int32_t keychain); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); - -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(int64_t port_, - struct wire_cst_bdk_wallet *that, - struct wire_cst_local_utxo *utxo, - bool only_witness_utxo, - struct wire_cst_psbt_sig_hash_type *sighash_type); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_script_buf *script); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions(struct wire_cst_bdk_wallet *that, - bool include_raw); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent(struct wire_cst_bdk_wallet *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network(struct wire_cst_bdk_wallet *that); - -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new(int64_t port_, - struct wire_cst_bdk_descriptor *descriptor, - struct wire_cst_bdk_descriptor *change_descriptor, - int32_t network, - struct wire_cst_database_config *database_config); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies(struct wire_cst_bdk_wallet *ptr, - int32_t keychain); - -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_psbt *psbt, - struct wire_cst_sign_options *sign_options); - -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_blockchain *blockchain); - -void frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder(int64_t port_, - struct wire_cst_list_prim_u_8_strict *txid, - float fee_rate, - struct wire_cst_bdk_address *allow_shrinking, - struct wire_cst_bdk_wallet *wallet, - bool enable_rbf, - uint32_t *n_sequence); - -void frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish(int64_t port_, - struct wire_cst_bdk_wallet *wallet, - struct wire_cst_list_script_amount *recipients, - struct wire_cst_list_out_point *utxos, - struct wire_cst_record_out_point_input_usize *foreign_utxo, - struct wire_cst_list_out_point *un_spendable, - int32_t change_policy, - bool manually_selected_only, - float *fee_rate, - uint64_t *fee_absolute, - bool drain_wallet, - struct wire_cst_bdk_script_buf *drain_to, - struct wire_cst_rbf_value *rbf, - struct wire_cst_list_record_string_list_prim_u_32_strict *internal_policy_path, - struct wire_cst_list_record_string_list_prim_u_32_strict *external_policy_path, - struct wire_cst_list_prim_u_8_loose *data); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); - -struct wire_cst_address_error *frbgen_bdk_flutter_cst_new_box_autoadd_address_error(void); - -struct wire_cst_address_index *frbgen_bdk_flutter_cst_new_box_autoadd_address_index(void); - -struct wire_cst_bdk_address *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address(void); - -struct wire_cst_bdk_blockchain *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain(void); - -struct wire_cst_bdk_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path(void); - -struct wire_cst_bdk_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor(void); - -struct wire_cst_bdk_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key(void); - -struct wire_cst_bdk_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key(void); - -struct wire_cst_bdk_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic(void); - -struct wire_cst_bdk_policy *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy(void); - -struct wire_cst_bdk_psbt *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt(void); - -struct wire_cst_bdk_script_buf *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf(void); - -struct wire_cst_bdk_transaction *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction(void); - -struct wire_cst_bdk_wallet *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet(void); - -struct wire_cst_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_block_time(void); - -struct wire_cst_blockchain_config *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config(void); - -bool *frbgen_bdk_flutter_cst_new_box_autoadd_bool(bool value); - -struct wire_cst_condition *frbgen_bdk_flutter_cst_new_box_autoadd_condition(void); - -struct wire_cst_consensus_error *frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error(void); - -struct wire_cst_database_config *frbgen_bdk_flutter_cst_new_box_autoadd_database_config(void); - -struct wire_cst_descriptor_error *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error(void); - -struct wire_cst_electrum_config *frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config(void); - -struct wire_cst_esplora_config *frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config(void); - -float *frbgen_bdk_flutter_cst_new_box_autoadd_f_32(float value); - -struct wire_cst_fee_rate *frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate(void); - -struct wire_cst_hex_error *frbgen_bdk_flutter_cst_new_box_autoadd_hex_error(void); - -struct wire_cst_local_utxo *frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo(void); - -struct wire_cst_lock_time *frbgen_bdk_flutter_cst_new_box_autoadd_lock_time(void); - -struct wire_cst_out_point *frbgen_bdk_flutter_cst_new_box_autoadd_out_point(void); - -struct wire_cst_pk_or_f *frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f(void); - -struct wire_cst_psbt_sig_hash_type *frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type(void); - -struct wire_cst_rbf_value *frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value(void); - -struct wire_cst_record_out_point_input_usize *frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize(void); - -struct wire_cst_rpc_config *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config(void); - -struct wire_cst_rpc_sync_params *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params(void); - -struct wire_cst_sign_options *frbgen_bdk_flutter_cst_new_box_autoadd_sign_options(void); - -struct wire_cst_sled_db_configuration *frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration(void); - -struct wire_cst_sqlite_db_configuration *frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration(void); - -uint32_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_32(uint32_t value); - -uint64_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_64(uint64_t value); - -uint8_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_8(uint8_t value); - -struct wire_cst_list_bdk_policy *frbgen_bdk_flutter_cst_new_list_bdk_policy(int32_t len); - -struct wire_cst_list_condition *frbgen_bdk_flutter_cst_new_list_condition(int32_t len); - -struct wire_cst_list_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict(int32_t len); - -struct wire_cst_list_local_utxo *frbgen_bdk_flutter_cst_new_list_local_utxo(int32_t len); - -struct wire_cst_list_out_point *frbgen_bdk_flutter_cst_new_list_out_point(int32_t len); - -struct wire_cst_list_pk_or_f *frbgen_bdk_flutter_cst_new_list_pk_or_f(int32_t len); - -struct wire_cst_list_prim_u_32_strict *frbgen_bdk_flutter_cst_new_list_prim_u_32_strict(int32_t len); - -struct wire_cst_list_prim_u_64_strict *frbgen_bdk_flutter_cst_new_list_prim_u_64_strict(int32_t len); - -struct wire_cst_list_prim_u_8_loose *frbgen_bdk_flutter_cst_new_list_prim_u_8_loose(int32_t len); - -struct wire_cst_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_prim_u_8_strict(int32_t len); - -struct wire_cst_list_record_list_prim_u_32_strict_list_condition *frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition(int32_t len); - -struct wire_cst_list_record_string_list_prim_u_32_strict *frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict(int32_t len); - -struct wire_cst_list_record_u_32_list_condition *frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition(int32_t len); - -struct wire_cst_list_script_amount *frbgen_bdk_flutter_cst_new_list_script_amount(int32_t len); - -struct wire_cst_list_transaction_details *frbgen_bdk_flutter_cst_new_list_transaction_details(int32_t len); - -struct wire_cst_list_tx_in *frbgen_bdk_flutter_cst_new_list_tx_in(int32_t len); - -struct wire_cst_list_tx_out *frbgen_bdk_flutter_cst_new_list_tx_out(int32_t len); -static int64_t dummy_method_to_enforce_bundling(void) { - int64_t dummy_var = 0; - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_address_error); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_address_index); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_block_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bool); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_condition); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_database_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_f_32); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_hex_error); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_out_point); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sign_options); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_32); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_64); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_8); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_bdk_policy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_condition); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_local_utxo); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_out_point); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_pk_or_f); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_32_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_64_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_loose); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_script_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_transaction_details); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_in); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_out); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish); - dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); - return dummy_var; -} diff --git a/ios/bdk_flutter.podspec b/ios/bdk_flutter.podspec deleted file mode 100644 index a4dfcd45..00000000 --- a/ios/bdk_flutter.podspec +++ /dev/null @@ -1,31 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'bdk_flutter' - s.version = "0.31.3" - s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' - s.description = <<-DESC -A new Flutter plugin 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' - s.platform = :ios, '12.0' - s.script_phase = { - :name => 'Build Rust library', - # First argument is relative path to the `rust` folder, second is name of rust library - :script => 'sh "$PODS_TARGET_SRCROOT/../cargokit/build_pod.sh" ../rust bdk_flutter', - :execution_position => :before_compile, - :input_files => ['${BUILT_PRODUCTS_DIR}/cargokit_phony'], - # Let XCode know that the static library referenced in -force_load below is - # created by this build step. - :output_files => ["${BUILT_PRODUCTS_DIR}/libbdk_flutter.a"], - } - s.pod_target_xcconfig = { - 'DEFINES_MODULE' => 'YES', - # Flutter.framework does not contain a i386 slice. - 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386', - 'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/libbdk_flutter.a', - } -end diff --git a/lefthook.yml b/lefthook.yml deleted file mode 100644 index e909d5b2..00000000 --- a/lefthook.yml +++ /dev/null @@ -1,16 +0,0 @@ -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 - static_code_analysis: - run: flutter analyze \ No newline at end of file diff --git a/lib/bdk_flutter.dart b/lib/bdk_flutter.dart deleted file mode 100644 index 3f8a0457..00000000 --- a/lib/bdk_flutter.dart +++ /dev/null @@ -1,50 +0,0 @@ -///A Flutter library for the [Bitcoin Development Kit](https://bitcoindevkit.org/). -library bdk_flutter; - -export './src/generated/api/blockchain.dart' - show - Auth, - BlockchainConfig, - ElectrumConfig, - EsploraConfig, - RpcConfig, - RpcSyncParams; - -export './src/generated/api/types.dart' - show - AddressIndex, - Balance, - BlockTime, - ChangeSpendPolicy, - Condition, - DatabaseConfig, - FeeRate, - Input, - KeychainKind, - LocalUtxo, - LockTime, - Network, - OutPoint, - Payload, - PkOrF, - PsbtSigHashType, - RbfValue, - Satisfaction, - SatisfiableItem, - SignOptions, - SledDbConfiguration, - SqliteDbConfiguration, - Variant, - WitnessVersion, - WordCount; -export './src/generated/api/wallet.dart' - hide BdkWallet, finishBumpFeeTxBuilder, txBuilderFinish; -export './src/root.dart'; -export 'src/utils/exceptions.dart' - hide - mapBdkError, - mapAddressError, - mapConsensusError, - mapDescriptorError, - mapHexError, - BdkFfiException; diff --git a/lib/src/generated/api/blockchain.dart b/lib/src/generated/api/blockchain.dart deleted file mode 100644 index 469d95ee..00000000 --- a/lib/src/generated/api/blockchain.dart +++ /dev/null @@ -1,289 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import '../lib.dart'; -import 'error.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; -import 'types.dart'; -part 'blockchain.freezed.dart'; - -// These functions are ignored because they are not marked as `pub`: `get_blockchain` -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `from`, `from`, `from` - -@freezed -sealed class Auth with _$Auth { - const Auth._(); - - /// No authentication - const factory Auth.none() = Auth_None; - - /// Authentication with username and password. - const factory Auth.userPass({ - /// Username - required String username, - - /// Password - required String password, - }) = Auth_UserPass; - - /// Authentication with a cookie file - const factory Auth.cookie({ - /// Cookie file - required String file, - }) = Auth_Cookie; -} - -class BdkBlockchain { - final AnyBlockchain ptr; - - const BdkBlockchain({ - required this.ptr, - }); - - static Future broadcast( - {required BdkBlockchain ptr, required BdkTransaction transaction}) => - core.instance.api.crateApiBlockchainBdkBlockchainBroadcast( - ptr: ptr, transaction: transaction); - - static Future create( - {required BlockchainConfig blockchainConfig}) => - core.instance.api.crateApiBlockchainBdkBlockchainCreate( - blockchainConfig: blockchainConfig); - - Future estimateFee({required BigInt target}) => core.instance.api - .crateApiBlockchainBdkBlockchainEstimateFee(that: this, target: target); - - Future getBlockHash({required int height}) => core.instance.api - .crateApiBlockchainBdkBlockchainGetBlockHash(that: this, height: height); - - Future getHeight() => - core.instance.api.crateApiBlockchainBdkBlockchainGetHeight( - that: this, - ); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkBlockchain && - runtimeType == other.runtimeType && - ptr == other.ptr; -} - -@freezed -sealed class BlockchainConfig with _$BlockchainConfig { - const BlockchainConfig._(); - - /// Electrum client - const factory BlockchainConfig.electrum({ - required ElectrumConfig config, - }) = BlockchainConfig_Electrum; - - /// Esplora client - const factory BlockchainConfig.esplora({ - required EsploraConfig config, - }) = BlockchainConfig_Esplora; - - /// Bitcoin Core RPC client - const factory BlockchainConfig.rpc({ - required RpcConfig config, - }) = BlockchainConfig_Rpc; -} - -/// Configuration for an ElectrumBlockchain -class ElectrumConfig { - /// URL of the Electrum server (such as ElectrumX, Esplora, BWT) may start with ssl:// or tcp:// and include a port - /// e.g. ssl://electrum.blockstream.info:60002 - final String url; - - /// URL of the socks5 proxy server or a Tor service - final String? socks5; - - /// Request retry count - final int retry; - - /// Request timeout (seconds) - final int? timeout; - - /// Stop searching addresses for transactions after finding an unused gap of this length - final BigInt stopGap; - - /// Validate the domain when using SSL - final bool validateDomain; - - const ElectrumConfig({ - required this.url, - this.socks5, - required this.retry, - this.timeout, - required this.stopGap, - required this.validateDomain, - }); - - @override - int get hashCode => - url.hashCode ^ - socks5.hashCode ^ - retry.hashCode ^ - timeout.hashCode ^ - stopGap.hashCode ^ - validateDomain.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ElectrumConfig && - runtimeType == other.runtimeType && - url == other.url && - socks5 == other.socks5 && - retry == other.retry && - timeout == other.timeout && - stopGap == other.stopGap && - validateDomain == other.validateDomain; -} - -/// Configuration for an EsploraBlockchain -class EsploraConfig { - /// Base URL of the esplora service - /// e.g. https://blockstream.info/api/ - final String baseUrl; - - /// Optional URL of the proxy to use to make requests to the Esplora server - /// The string should be formatted as: ://:@host:. - /// Note that the format of this value and the supported protocols change slightly between the - /// sync version of esplora (using ureq) and the async version (using reqwest). For more - /// details check with the documentation of the two crates. Both of them are compiled with - /// the socks feature enabled. - /// The proxy is ignored when targeting wasm32. - final String? proxy; - - /// Number of parallel requests sent to the esplora service (default: 4) - final int? concurrency; - - /// Stop searching addresses for transactions after finding an unused gap of this length. - final BigInt stopGap; - - /// Socket timeout. - final BigInt? timeout; - - const EsploraConfig({ - required this.baseUrl, - this.proxy, - this.concurrency, - required this.stopGap, - this.timeout, - }); - - @override - int get hashCode => - baseUrl.hashCode ^ - proxy.hashCode ^ - concurrency.hashCode ^ - stopGap.hashCode ^ - timeout.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is EsploraConfig && - runtimeType == other.runtimeType && - baseUrl == other.baseUrl && - proxy == other.proxy && - concurrency == other.concurrency && - stopGap == other.stopGap && - timeout == other.timeout; -} - -/// RpcBlockchain configuration options -class RpcConfig { - /// The bitcoin node url - final String url; - - /// The bitcoin node authentication mechanism - final Auth auth; - - /// The network we are using (it will be checked the bitcoin node network matches this) - final Network network; - - /// The wallet name in the bitcoin node. - final String walletName; - - /// Sync parameters - final RpcSyncParams? syncParams; - - const RpcConfig({ - required this.url, - required this.auth, - required this.network, - required this.walletName, - this.syncParams, - }); - - @override - int get hashCode => - url.hashCode ^ - auth.hashCode ^ - network.hashCode ^ - walletName.hashCode ^ - syncParams.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RpcConfig && - runtimeType == other.runtimeType && - url == other.url && - auth == other.auth && - network == other.network && - walletName == other.walletName && - syncParams == other.syncParams; -} - -/// Sync parameters for Bitcoin Core RPC. -/// -/// In general, BDK tries to sync `scriptPubKey`s cached in `Database` with -/// `scriptPubKey`s imported in the Bitcoin Core Wallet. These parameters are used for determining -/// how the `importdescriptors` RPC calls are to be made. -class RpcSyncParams { - /// The minimum number of scripts to scan for on initial sync. - final BigInt startScriptCount; - - /// Time in unix seconds in which initial sync will start scanning from (0 to start from genesis). - final BigInt startTime; - - /// Forces every sync to use `start_time` as import timestamp. - final bool forceStartTime; - - /// RPC poll rate (in seconds) to get state updates. - final BigInt pollRateSec; - - const RpcSyncParams({ - required this.startScriptCount, - required this.startTime, - required this.forceStartTime, - required this.pollRateSec, - }); - - @override - int get hashCode => - startScriptCount.hashCode ^ - startTime.hashCode ^ - forceStartTime.hashCode ^ - pollRateSec.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RpcSyncParams && - runtimeType == other.runtimeType && - startScriptCount == other.startScriptCount && - startTime == other.startTime && - forceStartTime == other.forceStartTime && - pollRateSec == other.pollRateSec; -} diff --git a/lib/src/generated/api/blockchain.freezed.dart b/lib/src/generated/api/blockchain.freezed.dart deleted file mode 100644 index 1ddb778a..00000000 --- a/lib/src/generated/api/blockchain.freezed.dart +++ /dev/null @@ -1,993 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'blockchain.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -/// @nodoc -mixin _$Auth { - @optionalTypeArgs - TResult when({ - required TResult Function() none, - required TResult Function(String username, String password) userPass, - required TResult Function(String file) cookie, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? none, - TResult? Function(String username, String password)? userPass, - TResult? Function(String file)? cookie, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? none, - TResult Function(String username, String password)? userPass, - TResult Function(String file)? cookie, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Auth_None value) none, - required TResult Function(Auth_UserPass value) userPass, - required TResult Function(Auth_Cookie value) cookie, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Auth_None value)? none, - TResult? Function(Auth_UserPass value)? userPass, - TResult? Function(Auth_Cookie value)? cookie, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Auth_None value)? none, - TResult Function(Auth_UserPass value)? userPass, - TResult Function(Auth_Cookie value)? cookie, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AuthCopyWith<$Res> { - factory $AuthCopyWith(Auth value, $Res Function(Auth) then) = - _$AuthCopyWithImpl<$Res, Auth>; -} - -/// @nodoc -class _$AuthCopyWithImpl<$Res, $Val extends Auth> - implements $AuthCopyWith<$Res> { - _$AuthCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$Auth_NoneImplCopyWith<$Res> { - factory _$$Auth_NoneImplCopyWith( - _$Auth_NoneImpl value, $Res Function(_$Auth_NoneImpl) then) = - __$$Auth_NoneImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$Auth_NoneImplCopyWithImpl<$Res> - extends _$AuthCopyWithImpl<$Res, _$Auth_NoneImpl> - implements _$$Auth_NoneImplCopyWith<$Res> { - __$$Auth_NoneImplCopyWithImpl( - _$Auth_NoneImpl _value, $Res Function(_$Auth_NoneImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$Auth_NoneImpl extends Auth_None { - const _$Auth_NoneImpl() : super._(); - - @override - String toString() { - return 'Auth.none()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$Auth_NoneImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() none, - required TResult Function(String username, String password) userPass, - required TResult Function(String file) cookie, - }) { - return none(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? none, - TResult? Function(String username, String password)? userPass, - TResult? Function(String file)? cookie, - }) { - return none?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? none, - TResult Function(String username, String password)? userPass, - TResult Function(String file)? cookie, - required TResult orElse(), - }) { - if (none != null) { - return none(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Auth_None value) none, - required TResult Function(Auth_UserPass value) userPass, - required TResult Function(Auth_Cookie value) cookie, - }) { - return none(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Auth_None value)? none, - TResult? Function(Auth_UserPass value)? userPass, - TResult? Function(Auth_Cookie value)? cookie, - }) { - return none?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Auth_None value)? none, - TResult Function(Auth_UserPass value)? userPass, - TResult Function(Auth_Cookie value)? cookie, - required TResult orElse(), - }) { - if (none != null) { - return none(this); - } - return orElse(); - } -} - -abstract class Auth_None extends Auth { - const factory Auth_None() = _$Auth_NoneImpl; - const Auth_None._() : super._(); -} - -/// @nodoc -abstract class _$$Auth_UserPassImplCopyWith<$Res> { - factory _$$Auth_UserPassImplCopyWith( - _$Auth_UserPassImpl value, $Res Function(_$Auth_UserPassImpl) then) = - __$$Auth_UserPassImplCopyWithImpl<$Res>; - @useResult - $Res call({String username, String password}); -} - -/// @nodoc -class __$$Auth_UserPassImplCopyWithImpl<$Res> - extends _$AuthCopyWithImpl<$Res, _$Auth_UserPassImpl> - implements _$$Auth_UserPassImplCopyWith<$Res> { - __$$Auth_UserPassImplCopyWithImpl( - _$Auth_UserPassImpl _value, $Res Function(_$Auth_UserPassImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? username = null, - Object? password = null, - }) { - return _then(_$Auth_UserPassImpl( - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Auth_UserPassImpl extends Auth_UserPass { - const _$Auth_UserPassImpl({required this.username, required this.password}) - : super._(); - - /// Username - @override - final String username; - - /// Password - @override - final String password; - - @override - String toString() { - return 'Auth.userPass(username: $username, password: $password)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Auth_UserPassImpl && - (identical(other.username, username) || - other.username == username) && - (identical(other.password, password) || - other.password == password)); - } - - @override - int get hashCode => Object.hash(runtimeType, username, password); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Auth_UserPassImplCopyWith<_$Auth_UserPassImpl> get copyWith => - __$$Auth_UserPassImplCopyWithImpl<_$Auth_UserPassImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() none, - required TResult Function(String username, String password) userPass, - required TResult Function(String file) cookie, - }) { - return userPass(username, password); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? none, - TResult? Function(String username, String password)? userPass, - TResult? Function(String file)? cookie, - }) { - return userPass?.call(username, password); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? none, - TResult Function(String username, String password)? userPass, - TResult Function(String file)? cookie, - required TResult orElse(), - }) { - if (userPass != null) { - return userPass(username, password); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Auth_None value) none, - required TResult Function(Auth_UserPass value) userPass, - required TResult Function(Auth_Cookie value) cookie, - }) { - return userPass(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Auth_None value)? none, - TResult? Function(Auth_UserPass value)? userPass, - TResult? Function(Auth_Cookie value)? cookie, - }) { - return userPass?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Auth_None value)? none, - TResult Function(Auth_UserPass value)? userPass, - TResult Function(Auth_Cookie value)? cookie, - required TResult orElse(), - }) { - if (userPass != null) { - return userPass(this); - } - return orElse(); - } -} - -abstract class Auth_UserPass extends Auth { - const factory Auth_UserPass( - {required final String username, - required final String password}) = _$Auth_UserPassImpl; - const Auth_UserPass._() : super._(); - - /// Username - String get username; - - /// Password - String get password; - @JsonKey(ignore: true) - _$$Auth_UserPassImplCopyWith<_$Auth_UserPassImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$Auth_CookieImplCopyWith<$Res> { - factory _$$Auth_CookieImplCopyWith( - _$Auth_CookieImpl value, $Res Function(_$Auth_CookieImpl) then) = - __$$Auth_CookieImplCopyWithImpl<$Res>; - @useResult - $Res call({String file}); -} - -/// @nodoc -class __$$Auth_CookieImplCopyWithImpl<$Res> - extends _$AuthCopyWithImpl<$Res, _$Auth_CookieImpl> - implements _$$Auth_CookieImplCopyWith<$Res> { - __$$Auth_CookieImplCopyWithImpl( - _$Auth_CookieImpl _value, $Res Function(_$Auth_CookieImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? file = null, - }) { - return _then(_$Auth_CookieImpl( - file: null == file - ? _value.file - : file // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Auth_CookieImpl extends Auth_Cookie { - const _$Auth_CookieImpl({required this.file}) : super._(); - - /// Cookie file - @override - final String file; - - @override - String toString() { - return 'Auth.cookie(file: $file)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Auth_CookieImpl && - (identical(other.file, file) || other.file == file)); - } - - @override - int get hashCode => Object.hash(runtimeType, file); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Auth_CookieImplCopyWith<_$Auth_CookieImpl> get copyWith => - __$$Auth_CookieImplCopyWithImpl<_$Auth_CookieImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() none, - required TResult Function(String username, String password) userPass, - required TResult Function(String file) cookie, - }) { - return cookie(file); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? none, - TResult? Function(String username, String password)? userPass, - TResult? Function(String file)? cookie, - }) { - return cookie?.call(file); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? none, - TResult Function(String username, String password)? userPass, - TResult Function(String file)? cookie, - required TResult orElse(), - }) { - if (cookie != null) { - return cookie(file); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Auth_None value) none, - required TResult Function(Auth_UserPass value) userPass, - required TResult Function(Auth_Cookie value) cookie, - }) { - return cookie(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Auth_None value)? none, - TResult? Function(Auth_UserPass value)? userPass, - TResult? Function(Auth_Cookie value)? cookie, - }) { - return cookie?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Auth_None value)? none, - TResult Function(Auth_UserPass value)? userPass, - TResult Function(Auth_Cookie value)? cookie, - required TResult orElse(), - }) { - if (cookie != null) { - return cookie(this); - } - return orElse(); - } -} - -abstract class Auth_Cookie extends Auth { - const factory Auth_Cookie({required final String file}) = _$Auth_CookieImpl; - const Auth_Cookie._() : super._(); - - /// Cookie file - String get file; - @JsonKey(ignore: true) - _$$Auth_CookieImplCopyWith<_$Auth_CookieImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$BlockchainConfig { - Object get config => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(ElectrumConfig config) electrum, - required TResult Function(EsploraConfig config) esplora, - required TResult Function(RpcConfig config) rpc, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ElectrumConfig config)? electrum, - TResult? Function(EsploraConfig config)? esplora, - TResult? Function(RpcConfig config)? rpc, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ElectrumConfig config)? electrum, - TResult Function(EsploraConfig config)? esplora, - TResult Function(RpcConfig config)? rpc, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(BlockchainConfig_Electrum value) electrum, - required TResult Function(BlockchainConfig_Esplora value) esplora, - required TResult Function(BlockchainConfig_Rpc value) rpc, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BlockchainConfig_Electrum value)? electrum, - TResult? Function(BlockchainConfig_Esplora value)? esplora, - TResult? Function(BlockchainConfig_Rpc value)? rpc, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BlockchainConfig_Electrum value)? electrum, - TResult Function(BlockchainConfig_Esplora value)? esplora, - TResult Function(BlockchainConfig_Rpc value)? rpc, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $BlockchainConfigCopyWith<$Res> { - factory $BlockchainConfigCopyWith( - BlockchainConfig value, $Res Function(BlockchainConfig) then) = - _$BlockchainConfigCopyWithImpl<$Res, BlockchainConfig>; -} - -/// @nodoc -class _$BlockchainConfigCopyWithImpl<$Res, $Val extends BlockchainConfig> - implements $BlockchainConfigCopyWith<$Res> { - _$BlockchainConfigCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$BlockchainConfig_ElectrumImplCopyWith<$Res> { - factory _$$BlockchainConfig_ElectrumImplCopyWith( - _$BlockchainConfig_ElectrumImpl value, - $Res Function(_$BlockchainConfig_ElectrumImpl) then) = - __$$BlockchainConfig_ElectrumImplCopyWithImpl<$Res>; - @useResult - $Res call({ElectrumConfig config}); -} - -/// @nodoc -class __$$BlockchainConfig_ElectrumImplCopyWithImpl<$Res> - extends _$BlockchainConfigCopyWithImpl<$Res, - _$BlockchainConfig_ElectrumImpl> - implements _$$BlockchainConfig_ElectrumImplCopyWith<$Res> { - __$$BlockchainConfig_ElectrumImplCopyWithImpl( - _$BlockchainConfig_ElectrumImpl _value, - $Res Function(_$BlockchainConfig_ElectrumImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$BlockchainConfig_ElectrumImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as ElectrumConfig, - )); - } -} - -/// @nodoc - -class _$BlockchainConfig_ElectrumImpl extends BlockchainConfig_Electrum { - const _$BlockchainConfig_ElectrumImpl({required this.config}) : super._(); - - @override - final ElectrumConfig config; - - @override - String toString() { - return 'BlockchainConfig.electrum(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BlockchainConfig_ElectrumImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BlockchainConfig_ElectrumImplCopyWith<_$BlockchainConfig_ElectrumImpl> - get copyWith => __$$BlockchainConfig_ElectrumImplCopyWithImpl< - _$BlockchainConfig_ElectrumImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(ElectrumConfig config) electrum, - required TResult Function(EsploraConfig config) esplora, - required TResult Function(RpcConfig config) rpc, - }) { - return electrum(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ElectrumConfig config)? electrum, - TResult? Function(EsploraConfig config)? esplora, - TResult? Function(RpcConfig config)? rpc, - }) { - return electrum?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ElectrumConfig config)? electrum, - TResult Function(EsploraConfig config)? esplora, - TResult Function(RpcConfig config)? rpc, - required TResult orElse(), - }) { - if (electrum != null) { - return electrum(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BlockchainConfig_Electrum value) electrum, - required TResult Function(BlockchainConfig_Esplora value) esplora, - required TResult Function(BlockchainConfig_Rpc value) rpc, - }) { - return electrum(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BlockchainConfig_Electrum value)? electrum, - TResult? Function(BlockchainConfig_Esplora value)? esplora, - TResult? Function(BlockchainConfig_Rpc value)? rpc, - }) { - return electrum?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BlockchainConfig_Electrum value)? electrum, - TResult Function(BlockchainConfig_Esplora value)? esplora, - TResult Function(BlockchainConfig_Rpc value)? rpc, - required TResult orElse(), - }) { - if (electrum != null) { - return electrum(this); - } - return orElse(); - } -} - -abstract class BlockchainConfig_Electrum extends BlockchainConfig { - const factory BlockchainConfig_Electrum( - {required final ElectrumConfig config}) = _$BlockchainConfig_ElectrumImpl; - const BlockchainConfig_Electrum._() : super._(); - - @override - ElectrumConfig get config; - @JsonKey(ignore: true) - _$$BlockchainConfig_ElectrumImplCopyWith<_$BlockchainConfig_ElectrumImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BlockchainConfig_EsploraImplCopyWith<$Res> { - factory _$$BlockchainConfig_EsploraImplCopyWith( - _$BlockchainConfig_EsploraImpl value, - $Res Function(_$BlockchainConfig_EsploraImpl) then) = - __$$BlockchainConfig_EsploraImplCopyWithImpl<$Res>; - @useResult - $Res call({EsploraConfig config}); -} - -/// @nodoc -class __$$BlockchainConfig_EsploraImplCopyWithImpl<$Res> - extends _$BlockchainConfigCopyWithImpl<$Res, _$BlockchainConfig_EsploraImpl> - implements _$$BlockchainConfig_EsploraImplCopyWith<$Res> { - __$$BlockchainConfig_EsploraImplCopyWithImpl( - _$BlockchainConfig_EsploraImpl _value, - $Res Function(_$BlockchainConfig_EsploraImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$BlockchainConfig_EsploraImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as EsploraConfig, - )); - } -} - -/// @nodoc - -class _$BlockchainConfig_EsploraImpl extends BlockchainConfig_Esplora { - const _$BlockchainConfig_EsploraImpl({required this.config}) : super._(); - - @override - final EsploraConfig config; - - @override - String toString() { - return 'BlockchainConfig.esplora(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BlockchainConfig_EsploraImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BlockchainConfig_EsploraImplCopyWith<_$BlockchainConfig_EsploraImpl> - get copyWith => __$$BlockchainConfig_EsploraImplCopyWithImpl< - _$BlockchainConfig_EsploraImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(ElectrumConfig config) electrum, - required TResult Function(EsploraConfig config) esplora, - required TResult Function(RpcConfig config) rpc, - }) { - return esplora(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ElectrumConfig config)? electrum, - TResult? Function(EsploraConfig config)? esplora, - TResult? Function(RpcConfig config)? rpc, - }) { - return esplora?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ElectrumConfig config)? electrum, - TResult Function(EsploraConfig config)? esplora, - TResult Function(RpcConfig config)? rpc, - required TResult orElse(), - }) { - if (esplora != null) { - return esplora(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BlockchainConfig_Electrum value) electrum, - required TResult Function(BlockchainConfig_Esplora value) esplora, - required TResult Function(BlockchainConfig_Rpc value) rpc, - }) { - return esplora(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BlockchainConfig_Electrum value)? electrum, - TResult? Function(BlockchainConfig_Esplora value)? esplora, - TResult? Function(BlockchainConfig_Rpc value)? rpc, - }) { - return esplora?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BlockchainConfig_Electrum value)? electrum, - TResult Function(BlockchainConfig_Esplora value)? esplora, - TResult Function(BlockchainConfig_Rpc value)? rpc, - required TResult orElse(), - }) { - if (esplora != null) { - return esplora(this); - } - return orElse(); - } -} - -abstract class BlockchainConfig_Esplora extends BlockchainConfig { - const factory BlockchainConfig_Esplora( - {required final EsploraConfig config}) = _$BlockchainConfig_EsploraImpl; - const BlockchainConfig_Esplora._() : super._(); - - @override - EsploraConfig get config; - @JsonKey(ignore: true) - _$$BlockchainConfig_EsploraImplCopyWith<_$BlockchainConfig_EsploraImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BlockchainConfig_RpcImplCopyWith<$Res> { - factory _$$BlockchainConfig_RpcImplCopyWith(_$BlockchainConfig_RpcImpl value, - $Res Function(_$BlockchainConfig_RpcImpl) then) = - __$$BlockchainConfig_RpcImplCopyWithImpl<$Res>; - @useResult - $Res call({RpcConfig config}); -} - -/// @nodoc -class __$$BlockchainConfig_RpcImplCopyWithImpl<$Res> - extends _$BlockchainConfigCopyWithImpl<$Res, _$BlockchainConfig_RpcImpl> - implements _$$BlockchainConfig_RpcImplCopyWith<$Res> { - __$$BlockchainConfig_RpcImplCopyWithImpl(_$BlockchainConfig_RpcImpl _value, - $Res Function(_$BlockchainConfig_RpcImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$BlockchainConfig_RpcImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as RpcConfig, - )); - } -} - -/// @nodoc - -class _$BlockchainConfig_RpcImpl extends BlockchainConfig_Rpc { - const _$BlockchainConfig_RpcImpl({required this.config}) : super._(); - - @override - final RpcConfig config; - - @override - String toString() { - return 'BlockchainConfig.rpc(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BlockchainConfig_RpcImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BlockchainConfig_RpcImplCopyWith<_$BlockchainConfig_RpcImpl> - get copyWith => - __$$BlockchainConfig_RpcImplCopyWithImpl<_$BlockchainConfig_RpcImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(ElectrumConfig config) electrum, - required TResult Function(EsploraConfig config) esplora, - required TResult Function(RpcConfig config) rpc, - }) { - return rpc(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ElectrumConfig config)? electrum, - TResult? Function(EsploraConfig config)? esplora, - TResult? Function(RpcConfig config)? rpc, - }) { - return rpc?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ElectrumConfig config)? electrum, - TResult Function(EsploraConfig config)? esplora, - TResult Function(RpcConfig config)? rpc, - required TResult orElse(), - }) { - if (rpc != null) { - return rpc(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BlockchainConfig_Electrum value) electrum, - required TResult Function(BlockchainConfig_Esplora value) esplora, - required TResult Function(BlockchainConfig_Rpc value) rpc, - }) { - return rpc(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BlockchainConfig_Electrum value)? electrum, - TResult? Function(BlockchainConfig_Esplora value)? esplora, - TResult? Function(BlockchainConfig_Rpc value)? rpc, - }) { - return rpc?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BlockchainConfig_Electrum value)? electrum, - TResult Function(BlockchainConfig_Esplora value)? esplora, - TResult Function(BlockchainConfig_Rpc value)? rpc, - required TResult orElse(), - }) { - if (rpc != null) { - return rpc(this); - } - return orElse(); - } -} - -abstract class BlockchainConfig_Rpc extends BlockchainConfig { - const factory BlockchainConfig_Rpc({required final RpcConfig config}) = - _$BlockchainConfig_RpcImpl; - const BlockchainConfig_Rpc._() : super._(); - - @override - RpcConfig get config; - @JsonKey(ignore: true) - _$$BlockchainConfig_RpcImplCopyWith<_$BlockchainConfig_RpcImpl> - get copyWith => throw _privateConstructorUsedError; -} diff --git a/lib/src/generated/api/descriptor.dart b/lib/src/generated/api/descriptor.dart deleted file mode 100644 index 83ace5cf..00000000 --- a/lib/src/generated/api/descriptor.dart +++ /dev/null @@ -1,127 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import '../lib.dart'; -import 'error.dart'; -import 'key.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'types.dart'; - -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt` - -class BdkDescriptor { - final ExtendedDescriptor extendedDescriptor; - final KeyMap keyMap; - - const BdkDescriptor({ - required this.extendedDescriptor, - required this.keyMap, - }); - - String asString() => - core.instance.api.crateApiDescriptorBdkDescriptorAsString( - that: this, - ); - - BigInt maxSatisfactionWeight() => - core.instance.api.crateApiDescriptorBdkDescriptorMaxSatisfactionWeight( - that: this, - ); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required String descriptor, required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNew( - descriptor: descriptor, network: network); - - static Future newBip44( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip44( - secretKey: secretKey, keychainKind: keychainKind, network: network); - - static Future newBip44Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip44Public( - publicKey: publicKey, - fingerprint: fingerprint, - keychainKind: keychainKind, - network: network); - - static Future newBip49( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip49( - secretKey: secretKey, keychainKind: keychainKind, network: network); - - static Future newBip49Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip49Public( - publicKey: publicKey, - fingerprint: fingerprint, - keychainKind: keychainKind, - network: network); - - static Future newBip84( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip84( - secretKey: secretKey, keychainKind: keychainKind, network: network); - - static Future newBip84Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip84Public( - publicKey: publicKey, - fingerprint: fingerprint, - keychainKind: keychainKind, - network: network); - - static Future newBip86( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip86( - secretKey: secretKey, keychainKind: keychainKind, network: network); - - static Future newBip86Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip86Public( - publicKey: publicKey, - fingerprint: fingerprint, - keychainKind: keychainKind, - network: network); - - String toStringPrivate() => - core.instance.api.crateApiDescriptorBdkDescriptorToStringPrivate( - that: this, - ); - - @override - int get hashCode => extendedDescriptor.hashCode ^ keyMap.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkDescriptor && - runtimeType == other.runtimeType && - extendedDescriptor == other.extendedDescriptor && - keyMap == other.keyMap; -} diff --git a/lib/src/generated/api/error.dart b/lib/src/generated/api/error.dart deleted file mode 100644 index 03733e53..00000000 --- a/lib/src/generated/api/error.dart +++ /dev/null @@ -1,362 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import '../lib.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; -import 'types.dart'; -part 'error.freezed.dart'; - -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from` - -@freezed -sealed class AddressError with _$AddressError { - const AddressError._(); - - const factory AddressError.base58( - String field0, - ) = AddressError_Base58; - const factory AddressError.bech32( - String field0, - ) = AddressError_Bech32; - const factory AddressError.emptyBech32Payload() = - AddressError_EmptyBech32Payload; - const factory AddressError.invalidBech32Variant({ - required Variant expected, - required Variant found, - }) = AddressError_InvalidBech32Variant; - const factory AddressError.invalidWitnessVersion( - int field0, - ) = AddressError_InvalidWitnessVersion; - const factory AddressError.unparsableWitnessVersion( - String field0, - ) = AddressError_UnparsableWitnessVersion; - const factory AddressError.malformedWitnessVersion() = - AddressError_MalformedWitnessVersion; - const factory AddressError.invalidWitnessProgramLength( - BigInt field0, - ) = AddressError_InvalidWitnessProgramLength; - const factory AddressError.invalidSegwitV0ProgramLength( - BigInt field0, - ) = AddressError_InvalidSegwitV0ProgramLength; - const factory AddressError.uncompressedPubkey() = - AddressError_UncompressedPubkey; - const factory AddressError.excessiveScriptSize() = - AddressError_ExcessiveScriptSize; - const factory AddressError.unrecognizedScript() = - AddressError_UnrecognizedScript; - const factory AddressError.unknownAddressType( - String field0, - ) = AddressError_UnknownAddressType; - const factory AddressError.networkValidation({ - required Network networkRequired, - required Network networkFound, - required String address, - }) = AddressError_NetworkValidation; -} - -@freezed -sealed class BdkError with _$BdkError implements FrbException { - const BdkError._(); - - /// Hex decoding error - const factory BdkError.hex( - HexError field0, - ) = BdkError_Hex; - - /// Encoding error - const factory BdkError.consensus( - ConsensusError field0, - ) = BdkError_Consensus; - const factory BdkError.verifyTransaction( - String field0, - ) = BdkError_VerifyTransaction; - - /// Address error. - const factory BdkError.address( - AddressError field0, - ) = BdkError_Address; - - /// Error related to the parsing and usage of descriptors - const factory BdkError.descriptor( - DescriptorError field0, - ) = BdkError_Descriptor; - - /// Wrong number of bytes found when trying to convert to u32 - const factory BdkError.invalidU32Bytes( - Uint8List field0, - ) = BdkError_InvalidU32Bytes; - - /// Generic error - const factory BdkError.generic( - String field0, - ) = BdkError_Generic; - - /// This error is thrown when trying to convert Bare and Public key script to address - const factory BdkError.scriptDoesntHaveAddressForm() = - BdkError_ScriptDoesntHaveAddressForm; - - /// Cannot build a tx without recipients - const factory BdkError.noRecipients() = BdkError_NoRecipients; - - /// `manually_selected_only` option is selected but no utxo has been passed - const factory BdkError.noUtxosSelected() = BdkError_NoUtxosSelected; - - /// Output created is under the dust limit, 546 satoshis - const factory BdkError.outputBelowDustLimit( - BigInt field0, - ) = BdkError_OutputBelowDustLimit; - - /// Wallet's UTXO set is not enough to cover recipient's requested plus fee - const factory BdkError.insufficientFunds({ - /// Sats needed for some transaction - required BigInt needed, - - /// Sats available for spending - required BigInt available, - }) = BdkError_InsufficientFunds; - - /// Branch and bound coin selection possible attempts with sufficiently big UTXO set could grow - /// exponentially, thus a limit is set, and when hit, this error is thrown - const factory BdkError.bnBTotalTriesExceeded() = - BdkError_BnBTotalTriesExceeded; - - /// Branch and bound coin selection tries to avoid needing a change by finding the right inputs for - /// the desired outputs plus fee, if there is not such combination this error is thrown - const factory BdkError.bnBNoExactMatch() = BdkError_BnBNoExactMatch; - - /// Happens when trying to spend an UTXO that is not in the internal database - const factory BdkError.unknownUtxo() = BdkError_UnknownUtxo; - - /// Thrown when a tx is not found in the internal database - const factory BdkError.transactionNotFound() = BdkError_TransactionNotFound; - - /// Happens when trying to bump a transaction that is already confirmed - const factory BdkError.transactionConfirmed() = BdkError_TransactionConfirmed; - - /// Trying to replace a tx that has a sequence >= `0xFFFFFFFE` - const factory BdkError.irreplaceableTransaction() = - BdkError_IrreplaceableTransaction; - - /// When bumping a tx the fee rate requested is lower than required - const factory BdkError.feeRateTooLow({ - /// Required fee rate (satoshi/vbyte) - required double needed, - }) = BdkError_FeeRateTooLow; - - /// When bumping a tx the absolute fee requested is lower than replaced tx absolute fee - const factory BdkError.feeTooLow({ - /// Required fee absolute value (satoshi) - required BigInt needed, - }) = BdkError_FeeTooLow; - - /// Node doesn't have data to estimate a fee rate - const factory BdkError.feeRateUnavailable() = BdkError_FeeRateUnavailable; - const factory BdkError.missingKeyOrigin( - String field0, - ) = BdkError_MissingKeyOrigin; - - /// Error while working with keys - const factory BdkError.key( - String field0, - ) = BdkError_Key; - - /// Descriptor checksum mismatch - const factory BdkError.checksumMismatch() = BdkError_ChecksumMismatch; - - /// Spending policy is not compatible with this [KeychainKind] - const factory BdkError.spendingPolicyRequired( - KeychainKind field0, - ) = BdkError_SpendingPolicyRequired; - - /// Error while extracting and manipulating policies - const factory BdkError.invalidPolicyPathError( - String field0, - ) = BdkError_InvalidPolicyPathError; - - /// Signing error - const factory BdkError.signer( - String field0, - ) = BdkError_Signer; - - /// Invalid network - const factory BdkError.invalidNetwork({ - /// requested network, for example what is given as bdk-cli option - required Network requested, - - /// found network, for example the network of the bitcoin node - required Network found, - }) = BdkError_InvalidNetwork; - - /// Requested outpoint doesn't exist in the tx (vout greater than available outputs) - const factory BdkError.invalidOutpoint( - OutPoint field0, - ) = BdkError_InvalidOutpoint; - - /// Encoding error - const factory BdkError.encode( - String field0, - ) = BdkError_Encode; - - /// Miniscript error - const factory BdkError.miniscript( - String field0, - ) = BdkError_Miniscript; - - /// Miniscript PSBT error - const factory BdkError.miniscriptPsbt( - String field0, - ) = BdkError_MiniscriptPsbt; - - /// BIP32 error - const factory BdkError.bip32( - String field0, - ) = BdkError_Bip32; - - /// BIP39 error - const factory BdkError.bip39( - String field0, - ) = BdkError_Bip39; - - /// A secp256k1 error - const factory BdkError.secp256K1( - String field0, - ) = BdkError_Secp256k1; - - /// Error serializing or deserializing JSON data - const factory BdkError.json( - String field0, - ) = BdkError_Json; - - /// Partially signed bitcoin transaction error - const factory BdkError.psbt( - String field0, - ) = BdkError_Psbt; - - /// Partially signed bitcoin transaction parse error - const factory BdkError.psbtParse( - String field0, - ) = BdkError_PsbtParse; - - /// sync attempt failed due to missing scripts in cache which - /// are needed to satisfy `stop_gap`. - const factory BdkError.missingCachedScripts( - BigInt field0, - BigInt field1, - ) = BdkError_MissingCachedScripts; - - /// Electrum client error - const factory BdkError.electrum( - String field0, - ) = BdkError_Electrum; - - /// Esplora client error - const factory BdkError.esplora( - String field0, - ) = BdkError_Esplora; - - /// Sled database error - const factory BdkError.sled( - String field0, - ) = BdkError_Sled; - - /// Rpc client error - const factory BdkError.rpc( - String field0, - ) = BdkError_Rpc; - - /// Rusqlite client error - const factory BdkError.rusqlite( - String field0, - ) = BdkError_Rusqlite; - const factory BdkError.invalidInput( - String field0, - ) = BdkError_InvalidInput; - const factory BdkError.invalidLockTime( - String field0, - ) = BdkError_InvalidLockTime; - const factory BdkError.invalidTransaction( - String field0, - ) = BdkError_InvalidTransaction; -} - -@freezed -sealed class ConsensusError with _$ConsensusError { - const ConsensusError._(); - - const factory ConsensusError.io( - String field0, - ) = ConsensusError_Io; - const factory ConsensusError.oversizedVectorAllocation({ - required BigInt requested, - required BigInt max, - }) = ConsensusError_OversizedVectorAllocation; - const factory ConsensusError.invalidChecksum({ - required U8Array4 expected, - required U8Array4 actual, - }) = ConsensusError_InvalidChecksum; - const factory ConsensusError.nonMinimalVarInt() = - ConsensusError_NonMinimalVarInt; - const factory ConsensusError.parseFailed( - String field0, - ) = ConsensusError_ParseFailed; - const factory ConsensusError.unsupportedSegwitFlag( - int field0, - ) = ConsensusError_UnsupportedSegwitFlag; -} - -@freezed -sealed class DescriptorError with _$DescriptorError { - const DescriptorError._(); - - const factory DescriptorError.invalidHdKeyPath() = - DescriptorError_InvalidHdKeyPath; - const factory DescriptorError.invalidDescriptorChecksum() = - DescriptorError_InvalidDescriptorChecksum; - const factory DescriptorError.hardenedDerivationXpub() = - DescriptorError_HardenedDerivationXpub; - const factory DescriptorError.multiPath() = DescriptorError_MultiPath; - const factory DescriptorError.key( - String field0, - ) = DescriptorError_Key; - const factory DescriptorError.policy( - String field0, - ) = DescriptorError_Policy; - const factory DescriptorError.invalidDescriptorCharacter( - int field0, - ) = DescriptorError_InvalidDescriptorCharacter; - const factory DescriptorError.bip32( - String field0, - ) = DescriptorError_Bip32; - const factory DescriptorError.base58( - String field0, - ) = DescriptorError_Base58; - const factory DescriptorError.pk( - String field0, - ) = DescriptorError_Pk; - const factory DescriptorError.miniscript( - String field0, - ) = DescriptorError_Miniscript; - const factory DescriptorError.hex( - String field0, - ) = DescriptorError_Hex; -} - -@freezed -sealed class HexError with _$HexError { - const HexError._(); - - const factory HexError.invalidChar( - int field0, - ) = HexError_InvalidChar; - const factory HexError.oddLengthString( - BigInt field0, - ) = HexError_OddLengthString; - const factory HexError.invalidLength( - BigInt field0, - BigInt field1, - ) = HexError_InvalidLength; -} diff --git a/lib/src/generated/api/error.freezed.dart b/lib/src/generated/api/error.freezed.dart deleted file mode 100644 index 72d8139e..00000000 --- a/lib/src/generated/api/error.freezed.dart +++ /dev/null @@ -1,28272 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'error.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -/// @nodoc -mixin _$AddressError { - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AddressErrorCopyWith<$Res> { - factory $AddressErrorCopyWith( - AddressError value, $Res Function(AddressError) then) = - _$AddressErrorCopyWithImpl<$Res, AddressError>; -} - -/// @nodoc -class _$AddressErrorCopyWithImpl<$Res, $Val extends AddressError> - implements $AddressErrorCopyWith<$Res> { - _$AddressErrorCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$AddressError_Base58ImplCopyWith<$Res> { - factory _$$AddressError_Base58ImplCopyWith(_$AddressError_Base58Impl value, - $Res Function(_$AddressError_Base58Impl) then) = - __$$AddressError_Base58ImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$AddressError_Base58ImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, _$AddressError_Base58Impl> - implements _$$AddressError_Base58ImplCopyWith<$Res> { - __$$AddressError_Base58ImplCopyWithImpl(_$AddressError_Base58Impl _value, - $Res Function(_$AddressError_Base58Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$AddressError_Base58Impl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$AddressError_Base58Impl extends AddressError_Base58 { - const _$AddressError_Base58Impl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'AddressError.base58(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_Base58Impl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressError_Base58ImplCopyWith<_$AddressError_Base58Impl> get copyWith => - __$$AddressError_Base58ImplCopyWithImpl<_$AddressError_Base58Impl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return base58(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return base58?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (base58 != null) { - return base58(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return base58(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return base58?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (base58 != null) { - return base58(this); - } - return orElse(); - } -} - -abstract class AddressError_Base58 extends AddressError { - const factory AddressError_Base58(final String field0) = - _$AddressError_Base58Impl; - const AddressError_Base58._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$AddressError_Base58ImplCopyWith<_$AddressError_Base58Impl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressError_Bech32ImplCopyWith<$Res> { - factory _$$AddressError_Bech32ImplCopyWith(_$AddressError_Bech32Impl value, - $Res Function(_$AddressError_Bech32Impl) then) = - __$$AddressError_Bech32ImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$AddressError_Bech32ImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, _$AddressError_Bech32Impl> - implements _$$AddressError_Bech32ImplCopyWith<$Res> { - __$$AddressError_Bech32ImplCopyWithImpl(_$AddressError_Bech32Impl _value, - $Res Function(_$AddressError_Bech32Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$AddressError_Bech32Impl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$AddressError_Bech32Impl extends AddressError_Bech32 { - const _$AddressError_Bech32Impl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'AddressError.bech32(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_Bech32Impl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressError_Bech32ImplCopyWith<_$AddressError_Bech32Impl> get copyWith => - __$$AddressError_Bech32ImplCopyWithImpl<_$AddressError_Bech32Impl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return bech32(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return bech32?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (bech32 != null) { - return bech32(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return bech32(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return bech32?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (bech32 != null) { - return bech32(this); - } - return orElse(); - } -} - -abstract class AddressError_Bech32 extends AddressError { - const factory AddressError_Bech32(final String field0) = - _$AddressError_Bech32Impl; - const AddressError_Bech32._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$AddressError_Bech32ImplCopyWith<_$AddressError_Bech32Impl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressError_EmptyBech32PayloadImplCopyWith<$Res> { - factory _$$AddressError_EmptyBech32PayloadImplCopyWith( - _$AddressError_EmptyBech32PayloadImpl value, - $Res Function(_$AddressError_EmptyBech32PayloadImpl) then) = - __$$AddressError_EmptyBech32PayloadImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$AddressError_EmptyBech32PayloadImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_EmptyBech32PayloadImpl> - implements _$$AddressError_EmptyBech32PayloadImplCopyWith<$Res> { - __$$AddressError_EmptyBech32PayloadImplCopyWithImpl( - _$AddressError_EmptyBech32PayloadImpl _value, - $Res Function(_$AddressError_EmptyBech32PayloadImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$AddressError_EmptyBech32PayloadImpl - extends AddressError_EmptyBech32Payload { - const _$AddressError_EmptyBech32PayloadImpl() : super._(); - - @override - String toString() { - return 'AddressError.emptyBech32Payload()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_EmptyBech32PayloadImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return emptyBech32Payload(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return emptyBech32Payload?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (emptyBech32Payload != null) { - return emptyBech32Payload(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return emptyBech32Payload(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return emptyBech32Payload?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (emptyBech32Payload != null) { - return emptyBech32Payload(this); - } - return orElse(); - } -} - -abstract class AddressError_EmptyBech32Payload extends AddressError { - const factory AddressError_EmptyBech32Payload() = - _$AddressError_EmptyBech32PayloadImpl; - const AddressError_EmptyBech32Payload._() : super._(); -} - -/// @nodoc -abstract class _$$AddressError_InvalidBech32VariantImplCopyWith<$Res> { - factory _$$AddressError_InvalidBech32VariantImplCopyWith( - _$AddressError_InvalidBech32VariantImpl value, - $Res Function(_$AddressError_InvalidBech32VariantImpl) then) = - __$$AddressError_InvalidBech32VariantImplCopyWithImpl<$Res>; - @useResult - $Res call({Variant expected, Variant found}); -} - -/// @nodoc -class __$$AddressError_InvalidBech32VariantImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_InvalidBech32VariantImpl> - implements _$$AddressError_InvalidBech32VariantImplCopyWith<$Res> { - __$$AddressError_InvalidBech32VariantImplCopyWithImpl( - _$AddressError_InvalidBech32VariantImpl _value, - $Res Function(_$AddressError_InvalidBech32VariantImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? expected = null, - Object? found = null, - }) { - return _then(_$AddressError_InvalidBech32VariantImpl( - expected: null == expected - ? _value.expected - : expected // ignore: cast_nullable_to_non_nullable - as Variant, - found: null == found - ? _value.found - : found // ignore: cast_nullable_to_non_nullable - as Variant, - )); - } -} - -/// @nodoc - -class _$AddressError_InvalidBech32VariantImpl - extends AddressError_InvalidBech32Variant { - const _$AddressError_InvalidBech32VariantImpl( - {required this.expected, required this.found}) - : super._(); - - @override - final Variant expected; - @override - final Variant found; - - @override - String toString() { - return 'AddressError.invalidBech32Variant(expected: $expected, found: $found)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_InvalidBech32VariantImpl && - (identical(other.expected, expected) || - other.expected == expected) && - (identical(other.found, found) || other.found == found)); - } - - @override - int get hashCode => Object.hash(runtimeType, expected, found); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressError_InvalidBech32VariantImplCopyWith< - _$AddressError_InvalidBech32VariantImpl> - get copyWith => __$$AddressError_InvalidBech32VariantImplCopyWithImpl< - _$AddressError_InvalidBech32VariantImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return invalidBech32Variant(expected, found); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return invalidBech32Variant?.call(expected, found); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (invalidBech32Variant != null) { - return invalidBech32Variant(expected, found); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return invalidBech32Variant(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return invalidBech32Variant?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (invalidBech32Variant != null) { - return invalidBech32Variant(this); - } - return orElse(); - } -} - -abstract class AddressError_InvalidBech32Variant extends AddressError { - const factory AddressError_InvalidBech32Variant( - {required final Variant expected, - required final Variant found}) = _$AddressError_InvalidBech32VariantImpl; - const AddressError_InvalidBech32Variant._() : super._(); - - Variant get expected; - Variant get found; - @JsonKey(ignore: true) - _$$AddressError_InvalidBech32VariantImplCopyWith< - _$AddressError_InvalidBech32VariantImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressError_InvalidWitnessVersionImplCopyWith<$Res> { - factory _$$AddressError_InvalidWitnessVersionImplCopyWith( - _$AddressError_InvalidWitnessVersionImpl value, - $Res Function(_$AddressError_InvalidWitnessVersionImpl) then) = - __$$AddressError_InvalidWitnessVersionImplCopyWithImpl<$Res>; - @useResult - $Res call({int field0}); -} - -/// @nodoc -class __$$AddressError_InvalidWitnessVersionImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_InvalidWitnessVersionImpl> - implements _$$AddressError_InvalidWitnessVersionImplCopyWith<$Res> { - __$$AddressError_InvalidWitnessVersionImplCopyWithImpl( - _$AddressError_InvalidWitnessVersionImpl _value, - $Res Function(_$AddressError_InvalidWitnessVersionImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$AddressError_InvalidWitnessVersionImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$AddressError_InvalidWitnessVersionImpl - extends AddressError_InvalidWitnessVersion { - const _$AddressError_InvalidWitnessVersionImpl(this.field0) : super._(); - - @override - final int field0; - - @override - String toString() { - return 'AddressError.invalidWitnessVersion(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_InvalidWitnessVersionImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressError_InvalidWitnessVersionImplCopyWith< - _$AddressError_InvalidWitnessVersionImpl> - get copyWith => __$$AddressError_InvalidWitnessVersionImplCopyWithImpl< - _$AddressError_InvalidWitnessVersionImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return invalidWitnessVersion(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return invalidWitnessVersion?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (invalidWitnessVersion != null) { - return invalidWitnessVersion(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return invalidWitnessVersion(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return invalidWitnessVersion?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (invalidWitnessVersion != null) { - return invalidWitnessVersion(this); - } - return orElse(); - } -} - -abstract class AddressError_InvalidWitnessVersion extends AddressError { - const factory AddressError_InvalidWitnessVersion(final int field0) = - _$AddressError_InvalidWitnessVersionImpl; - const AddressError_InvalidWitnessVersion._() : super._(); - - int get field0; - @JsonKey(ignore: true) - _$$AddressError_InvalidWitnessVersionImplCopyWith< - _$AddressError_InvalidWitnessVersionImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressError_UnparsableWitnessVersionImplCopyWith<$Res> { - factory _$$AddressError_UnparsableWitnessVersionImplCopyWith( - _$AddressError_UnparsableWitnessVersionImpl value, - $Res Function(_$AddressError_UnparsableWitnessVersionImpl) then) = - __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_UnparsableWitnessVersionImpl> - implements _$$AddressError_UnparsableWitnessVersionImplCopyWith<$Res> { - __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl( - _$AddressError_UnparsableWitnessVersionImpl _value, - $Res Function(_$AddressError_UnparsableWitnessVersionImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$AddressError_UnparsableWitnessVersionImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$AddressError_UnparsableWitnessVersionImpl - extends AddressError_UnparsableWitnessVersion { - const _$AddressError_UnparsableWitnessVersionImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'AddressError.unparsableWitnessVersion(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_UnparsableWitnessVersionImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressError_UnparsableWitnessVersionImplCopyWith< - _$AddressError_UnparsableWitnessVersionImpl> - get copyWith => __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl< - _$AddressError_UnparsableWitnessVersionImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return unparsableWitnessVersion(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return unparsableWitnessVersion?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (unparsableWitnessVersion != null) { - return unparsableWitnessVersion(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return unparsableWitnessVersion(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return unparsableWitnessVersion?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (unparsableWitnessVersion != null) { - return unparsableWitnessVersion(this); - } - return orElse(); - } -} - -abstract class AddressError_UnparsableWitnessVersion extends AddressError { - const factory AddressError_UnparsableWitnessVersion(final String field0) = - _$AddressError_UnparsableWitnessVersionImpl; - const AddressError_UnparsableWitnessVersion._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$AddressError_UnparsableWitnessVersionImplCopyWith< - _$AddressError_UnparsableWitnessVersionImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressError_MalformedWitnessVersionImplCopyWith<$Res> { - factory _$$AddressError_MalformedWitnessVersionImplCopyWith( - _$AddressError_MalformedWitnessVersionImpl value, - $Res Function(_$AddressError_MalformedWitnessVersionImpl) then) = - __$$AddressError_MalformedWitnessVersionImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$AddressError_MalformedWitnessVersionImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_MalformedWitnessVersionImpl> - implements _$$AddressError_MalformedWitnessVersionImplCopyWith<$Res> { - __$$AddressError_MalformedWitnessVersionImplCopyWithImpl( - _$AddressError_MalformedWitnessVersionImpl _value, - $Res Function(_$AddressError_MalformedWitnessVersionImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$AddressError_MalformedWitnessVersionImpl - extends AddressError_MalformedWitnessVersion { - const _$AddressError_MalformedWitnessVersionImpl() : super._(); - - @override - String toString() { - return 'AddressError.malformedWitnessVersion()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_MalformedWitnessVersionImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return malformedWitnessVersion(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return malformedWitnessVersion?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (malformedWitnessVersion != null) { - return malformedWitnessVersion(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return malformedWitnessVersion(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return malformedWitnessVersion?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (malformedWitnessVersion != null) { - return malformedWitnessVersion(this); - } - return orElse(); - } -} - -abstract class AddressError_MalformedWitnessVersion extends AddressError { - const factory AddressError_MalformedWitnessVersion() = - _$AddressError_MalformedWitnessVersionImpl; - const AddressError_MalformedWitnessVersion._() : super._(); -} - -/// @nodoc -abstract class _$$AddressError_InvalidWitnessProgramLengthImplCopyWith<$Res> { - factory _$$AddressError_InvalidWitnessProgramLengthImplCopyWith( - _$AddressError_InvalidWitnessProgramLengthImpl value, - $Res Function(_$AddressError_InvalidWitnessProgramLengthImpl) then) = - __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt field0}); -} - -/// @nodoc -class __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_InvalidWitnessProgramLengthImpl> - implements _$$AddressError_InvalidWitnessProgramLengthImplCopyWith<$Res> { - __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl( - _$AddressError_InvalidWitnessProgramLengthImpl _value, - $Res Function(_$AddressError_InvalidWitnessProgramLengthImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$AddressError_InvalidWitnessProgramLengthImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$AddressError_InvalidWitnessProgramLengthImpl - extends AddressError_InvalidWitnessProgramLength { - const _$AddressError_InvalidWitnessProgramLengthImpl(this.field0) : super._(); - - @override - final BigInt field0; - - @override - String toString() { - return 'AddressError.invalidWitnessProgramLength(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_InvalidWitnessProgramLengthImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressError_InvalidWitnessProgramLengthImplCopyWith< - _$AddressError_InvalidWitnessProgramLengthImpl> - get copyWith => - __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl< - _$AddressError_InvalidWitnessProgramLengthImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return invalidWitnessProgramLength(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return invalidWitnessProgramLength?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (invalidWitnessProgramLength != null) { - return invalidWitnessProgramLength(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return invalidWitnessProgramLength(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return invalidWitnessProgramLength?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (invalidWitnessProgramLength != null) { - return invalidWitnessProgramLength(this); - } - return orElse(); - } -} - -abstract class AddressError_InvalidWitnessProgramLength extends AddressError { - const factory AddressError_InvalidWitnessProgramLength(final BigInt field0) = - _$AddressError_InvalidWitnessProgramLengthImpl; - const AddressError_InvalidWitnessProgramLength._() : super._(); - - BigInt get field0; - @JsonKey(ignore: true) - _$$AddressError_InvalidWitnessProgramLengthImplCopyWith< - _$AddressError_InvalidWitnessProgramLengthImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith<$Res> { - factory _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith( - _$AddressError_InvalidSegwitV0ProgramLengthImpl value, - $Res Function(_$AddressError_InvalidSegwitV0ProgramLengthImpl) then) = - __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt field0}); -} - -/// @nodoc -class __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_InvalidSegwitV0ProgramLengthImpl> - implements _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith<$Res> { - __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl( - _$AddressError_InvalidSegwitV0ProgramLengthImpl _value, - $Res Function(_$AddressError_InvalidSegwitV0ProgramLengthImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$AddressError_InvalidSegwitV0ProgramLengthImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$AddressError_InvalidSegwitV0ProgramLengthImpl - extends AddressError_InvalidSegwitV0ProgramLength { - const _$AddressError_InvalidSegwitV0ProgramLengthImpl(this.field0) - : super._(); - - @override - final BigInt field0; - - @override - String toString() { - return 'AddressError.invalidSegwitV0ProgramLength(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_InvalidSegwitV0ProgramLengthImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith< - _$AddressError_InvalidSegwitV0ProgramLengthImpl> - get copyWith => - __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl< - _$AddressError_InvalidSegwitV0ProgramLengthImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return invalidSegwitV0ProgramLength(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return invalidSegwitV0ProgramLength?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (invalidSegwitV0ProgramLength != null) { - return invalidSegwitV0ProgramLength(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return invalidSegwitV0ProgramLength(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return invalidSegwitV0ProgramLength?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (invalidSegwitV0ProgramLength != null) { - return invalidSegwitV0ProgramLength(this); - } - return orElse(); - } -} - -abstract class AddressError_InvalidSegwitV0ProgramLength extends AddressError { - const factory AddressError_InvalidSegwitV0ProgramLength(final BigInt field0) = - _$AddressError_InvalidSegwitV0ProgramLengthImpl; - const AddressError_InvalidSegwitV0ProgramLength._() : super._(); - - BigInt get field0; - @JsonKey(ignore: true) - _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith< - _$AddressError_InvalidSegwitV0ProgramLengthImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressError_UncompressedPubkeyImplCopyWith<$Res> { - factory _$$AddressError_UncompressedPubkeyImplCopyWith( - _$AddressError_UncompressedPubkeyImpl value, - $Res Function(_$AddressError_UncompressedPubkeyImpl) then) = - __$$AddressError_UncompressedPubkeyImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$AddressError_UncompressedPubkeyImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_UncompressedPubkeyImpl> - implements _$$AddressError_UncompressedPubkeyImplCopyWith<$Res> { - __$$AddressError_UncompressedPubkeyImplCopyWithImpl( - _$AddressError_UncompressedPubkeyImpl _value, - $Res Function(_$AddressError_UncompressedPubkeyImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$AddressError_UncompressedPubkeyImpl - extends AddressError_UncompressedPubkey { - const _$AddressError_UncompressedPubkeyImpl() : super._(); - - @override - String toString() { - return 'AddressError.uncompressedPubkey()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_UncompressedPubkeyImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return uncompressedPubkey(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return uncompressedPubkey?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (uncompressedPubkey != null) { - return uncompressedPubkey(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return uncompressedPubkey(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return uncompressedPubkey?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (uncompressedPubkey != null) { - return uncompressedPubkey(this); - } - return orElse(); - } -} - -abstract class AddressError_UncompressedPubkey extends AddressError { - const factory AddressError_UncompressedPubkey() = - _$AddressError_UncompressedPubkeyImpl; - const AddressError_UncompressedPubkey._() : super._(); -} - -/// @nodoc -abstract class _$$AddressError_ExcessiveScriptSizeImplCopyWith<$Res> { - factory _$$AddressError_ExcessiveScriptSizeImplCopyWith( - _$AddressError_ExcessiveScriptSizeImpl value, - $Res Function(_$AddressError_ExcessiveScriptSizeImpl) then) = - __$$AddressError_ExcessiveScriptSizeImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$AddressError_ExcessiveScriptSizeImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_ExcessiveScriptSizeImpl> - implements _$$AddressError_ExcessiveScriptSizeImplCopyWith<$Res> { - __$$AddressError_ExcessiveScriptSizeImplCopyWithImpl( - _$AddressError_ExcessiveScriptSizeImpl _value, - $Res Function(_$AddressError_ExcessiveScriptSizeImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$AddressError_ExcessiveScriptSizeImpl - extends AddressError_ExcessiveScriptSize { - const _$AddressError_ExcessiveScriptSizeImpl() : super._(); - - @override - String toString() { - return 'AddressError.excessiveScriptSize()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_ExcessiveScriptSizeImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return excessiveScriptSize(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return excessiveScriptSize?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (excessiveScriptSize != null) { - return excessiveScriptSize(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return excessiveScriptSize(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return excessiveScriptSize?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (excessiveScriptSize != null) { - return excessiveScriptSize(this); - } - return orElse(); - } -} - -abstract class AddressError_ExcessiveScriptSize extends AddressError { - const factory AddressError_ExcessiveScriptSize() = - _$AddressError_ExcessiveScriptSizeImpl; - const AddressError_ExcessiveScriptSize._() : super._(); -} - -/// @nodoc -abstract class _$$AddressError_UnrecognizedScriptImplCopyWith<$Res> { - factory _$$AddressError_UnrecognizedScriptImplCopyWith( - _$AddressError_UnrecognizedScriptImpl value, - $Res Function(_$AddressError_UnrecognizedScriptImpl) then) = - __$$AddressError_UnrecognizedScriptImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$AddressError_UnrecognizedScriptImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_UnrecognizedScriptImpl> - implements _$$AddressError_UnrecognizedScriptImplCopyWith<$Res> { - __$$AddressError_UnrecognizedScriptImplCopyWithImpl( - _$AddressError_UnrecognizedScriptImpl _value, - $Res Function(_$AddressError_UnrecognizedScriptImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$AddressError_UnrecognizedScriptImpl - extends AddressError_UnrecognizedScript { - const _$AddressError_UnrecognizedScriptImpl() : super._(); - - @override - String toString() { - return 'AddressError.unrecognizedScript()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_UnrecognizedScriptImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return unrecognizedScript(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return unrecognizedScript?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (unrecognizedScript != null) { - return unrecognizedScript(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return unrecognizedScript(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return unrecognizedScript?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (unrecognizedScript != null) { - return unrecognizedScript(this); - } - return orElse(); - } -} - -abstract class AddressError_UnrecognizedScript extends AddressError { - const factory AddressError_UnrecognizedScript() = - _$AddressError_UnrecognizedScriptImpl; - const AddressError_UnrecognizedScript._() : super._(); -} - -/// @nodoc -abstract class _$$AddressError_UnknownAddressTypeImplCopyWith<$Res> { - factory _$$AddressError_UnknownAddressTypeImplCopyWith( - _$AddressError_UnknownAddressTypeImpl value, - $Res Function(_$AddressError_UnknownAddressTypeImpl) then) = - __$$AddressError_UnknownAddressTypeImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$AddressError_UnknownAddressTypeImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_UnknownAddressTypeImpl> - implements _$$AddressError_UnknownAddressTypeImplCopyWith<$Res> { - __$$AddressError_UnknownAddressTypeImplCopyWithImpl( - _$AddressError_UnknownAddressTypeImpl _value, - $Res Function(_$AddressError_UnknownAddressTypeImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$AddressError_UnknownAddressTypeImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$AddressError_UnknownAddressTypeImpl - extends AddressError_UnknownAddressType { - const _$AddressError_UnknownAddressTypeImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'AddressError.unknownAddressType(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_UnknownAddressTypeImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressError_UnknownAddressTypeImplCopyWith< - _$AddressError_UnknownAddressTypeImpl> - get copyWith => __$$AddressError_UnknownAddressTypeImplCopyWithImpl< - _$AddressError_UnknownAddressTypeImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return unknownAddressType(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return unknownAddressType?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (unknownAddressType != null) { - return unknownAddressType(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return unknownAddressType(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return unknownAddressType?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (unknownAddressType != null) { - return unknownAddressType(this); - } - return orElse(); - } -} - -abstract class AddressError_UnknownAddressType extends AddressError { - const factory AddressError_UnknownAddressType(final String field0) = - _$AddressError_UnknownAddressTypeImpl; - const AddressError_UnknownAddressType._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$AddressError_UnknownAddressTypeImplCopyWith< - _$AddressError_UnknownAddressTypeImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressError_NetworkValidationImplCopyWith<$Res> { - factory _$$AddressError_NetworkValidationImplCopyWith( - _$AddressError_NetworkValidationImpl value, - $Res Function(_$AddressError_NetworkValidationImpl) then) = - __$$AddressError_NetworkValidationImplCopyWithImpl<$Res>; - @useResult - $Res call({Network networkRequired, Network networkFound, String address}); -} - -/// @nodoc -class __$$AddressError_NetworkValidationImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_NetworkValidationImpl> - implements _$$AddressError_NetworkValidationImplCopyWith<$Res> { - __$$AddressError_NetworkValidationImplCopyWithImpl( - _$AddressError_NetworkValidationImpl _value, - $Res Function(_$AddressError_NetworkValidationImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? networkRequired = null, - Object? networkFound = null, - Object? address = null, - }) { - return _then(_$AddressError_NetworkValidationImpl( - networkRequired: null == networkRequired - ? _value.networkRequired - : networkRequired // ignore: cast_nullable_to_non_nullable - as Network, - networkFound: null == networkFound - ? _value.networkFound - : networkFound // ignore: cast_nullable_to_non_nullable - as Network, - address: null == address - ? _value.address - : address // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$AddressError_NetworkValidationImpl - extends AddressError_NetworkValidation { - const _$AddressError_NetworkValidationImpl( - {required this.networkRequired, - required this.networkFound, - required this.address}) - : super._(); - - @override - final Network networkRequired; - @override - final Network networkFound; - @override - final String address; - - @override - String toString() { - return 'AddressError.networkValidation(networkRequired: $networkRequired, networkFound: $networkFound, address: $address)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressError_NetworkValidationImpl && - (identical(other.networkRequired, networkRequired) || - other.networkRequired == networkRequired) && - (identical(other.networkFound, networkFound) || - other.networkFound == networkFound) && - (identical(other.address, address) || other.address == address)); - } - - @override - int get hashCode => - Object.hash(runtimeType, networkRequired, networkFound, address); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressError_NetworkValidationImplCopyWith< - _$AddressError_NetworkValidationImpl> - get copyWith => __$$AddressError_NetworkValidationImplCopyWithImpl< - _$AddressError_NetworkValidationImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, - }) { - return networkValidation(networkRequired, networkFound, address); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - }) { - return networkValidation?.call(networkRequired, networkFound, address); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, - required TResult orElse(), - }) { - if (networkValidation != null) { - return networkValidation(networkRequired, networkFound, address); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressError_Base58 value) base58, - required TResult Function(AddressError_Bech32 value) bech32, - required TResult Function(AddressError_EmptyBech32Payload value) - emptyBech32Payload, - required TResult Function(AddressError_InvalidBech32Variant value) - invalidBech32Variant, - required TResult Function(AddressError_InvalidWitnessVersion value) - invalidWitnessVersion, - required TResult Function(AddressError_UnparsableWitnessVersion value) - unparsableWitnessVersion, - required TResult Function(AddressError_MalformedWitnessVersion value) - malformedWitnessVersion, - required TResult Function(AddressError_InvalidWitnessProgramLength value) - invalidWitnessProgramLength, - required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) - invalidSegwitV0ProgramLength, - required TResult Function(AddressError_UncompressedPubkey value) - uncompressedPubkey, - required TResult Function(AddressError_ExcessiveScriptSize value) - excessiveScriptSize, - required TResult Function(AddressError_UnrecognizedScript value) - unrecognizedScript, - required TResult Function(AddressError_UnknownAddressType value) - unknownAddressType, - required TResult Function(AddressError_NetworkValidation value) - networkValidation, - }) { - return networkValidation(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressError_Base58 value)? base58, - TResult? Function(AddressError_Bech32 value)? bech32, - TResult? Function(AddressError_EmptyBech32Payload value)? - emptyBech32Payload, - TResult? Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult? Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult? Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult? Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult? Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult? Function(AddressError_UncompressedPubkey value)? - uncompressedPubkey, - TResult? Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult? Function(AddressError_UnrecognizedScript value)? - unrecognizedScript, - TResult? Function(AddressError_UnknownAddressType value)? - unknownAddressType, - TResult? Function(AddressError_NetworkValidation value)? networkValidation, - }) { - return networkValidation?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (networkValidation != null) { - return networkValidation(this); - } - return orElse(); - } -} - -abstract class AddressError_NetworkValidation extends AddressError { - const factory AddressError_NetworkValidation( - {required final Network networkRequired, - required final Network networkFound, - required final String address}) = _$AddressError_NetworkValidationImpl; - const AddressError_NetworkValidation._() : super._(); - - Network get networkRequired; - Network get networkFound; - String get address; - @JsonKey(ignore: true) - _$$AddressError_NetworkValidationImplCopyWith< - _$AddressError_NetworkValidationImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$BdkError { - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $BdkErrorCopyWith<$Res> { - factory $BdkErrorCopyWith(BdkError value, $Res Function(BdkError) then) = - _$BdkErrorCopyWithImpl<$Res, BdkError>; -} - -/// @nodoc -class _$BdkErrorCopyWithImpl<$Res, $Val extends BdkError> - implements $BdkErrorCopyWith<$Res> { - _$BdkErrorCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$BdkError_HexImplCopyWith<$Res> { - factory _$$BdkError_HexImplCopyWith( - _$BdkError_HexImpl value, $Res Function(_$BdkError_HexImpl) then) = - __$$BdkError_HexImplCopyWithImpl<$Res>; - @useResult - $Res call({HexError field0}); - - $HexErrorCopyWith<$Res> get field0; -} - -/// @nodoc -class __$$BdkError_HexImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_HexImpl> - implements _$$BdkError_HexImplCopyWith<$Res> { - __$$BdkError_HexImplCopyWithImpl( - _$BdkError_HexImpl _value, $Res Function(_$BdkError_HexImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_HexImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as HexError, - )); - } - - @override - @pragma('vm:prefer-inline') - $HexErrorCopyWith<$Res> get field0 { - return $HexErrorCopyWith<$Res>(_value.field0, (value) { - return _then(_value.copyWith(field0: value)); - }); - } -} - -/// @nodoc - -class _$BdkError_HexImpl extends BdkError_Hex { - const _$BdkError_HexImpl(this.field0) : super._(); - - @override - final HexError field0; - - @override - String toString() { - return 'BdkError.hex(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_HexImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_HexImplCopyWith<_$BdkError_HexImpl> get copyWith => - __$$BdkError_HexImplCopyWithImpl<_$BdkError_HexImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return hex(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return hex?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (hex != null) { - return hex(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return hex(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return hex?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (hex != null) { - return hex(this); - } - return orElse(); - } -} - -abstract class BdkError_Hex extends BdkError { - const factory BdkError_Hex(final HexError field0) = _$BdkError_HexImpl; - const BdkError_Hex._() : super._(); - - HexError get field0; - @JsonKey(ignore: true) - _$$BdkError_HexImplCopyWith<_$BdkError_HexImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_ConsensusImplCopyWith<$Res> { - factory _$$BdkError_ConsensusImplCopyWith(_$BdkError_ConsensusImpl value, - $Res Function(_$BdkError_ConsensusImpl) then) = - __$$BdkError_ConsensusImplCopyWithImpl<$Res>; - @useResult - $Res call({ConsensusError field0}); - - $ConsensusErrorCopyWith<$Res> get field0; -} - -/// @nodoc -class __$$BdkError_ConsensusImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_ConsensusImpl> - implements _$$BdkError_ConsensusImplCopyWith<$Res> { - __$$BdkError_ConsensusImplCopyWithImpl(_$BdkError_ConsensusImpl _value, - $Res Function(_$BdkError_ConsensusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_ConsensusImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as ConsensusError, - )); - } - - @override - @pragma('vm:prefer-inline') - $ConsensusErrorCopyWith<$Res> get field0 { - return $ConsensusErrorCopyWith<$Res>(_value.field0, (value) { - return _then(_value.copyWith(field0: value)); - }); - } -} - -/// @nodoc - -class _$BdkError_ConsensusImpl extends BdkError_Consensus { - const _$BdkError_ConsensusImpl(this.field0) : super._(); - - @override - final ConsensusError field0; - - @override - String toString() { - return 'BdkError.consensus(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_ConsensusImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_ConsensusImplCopyWith<_$BdkError_ConsensusImpl> get copyWith => - __$$BdkError_ConsensusImplCopyWithImpl<_$BdkError_ConsensusImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return consensus(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return consensus?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (consensus != null) { - return consensus(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return consensus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return consensus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (consensus != null) { - return consensus(this); - } - return orElse(); - } -} - -abstract class BdkError_Consensus extends BdkError { - const factory BdkError_Consensus(final ConsensusError field0) = - _$BdkError_ConsensusImpl; - const BdkError_Consensus._() : super._(); - - ConsensusError get field0; - @JsonKey(ignore: true) - _$$BdkError_ConsensusImplCopyWith<_$BdkError_ConsensusImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_VerifyTransactionImplCopyWith<$Res> { - factory _$$BdkError_VerifyTransactionImplCopyWith( - _$BdkError_VerifyTransactionImpl value, - $Res Function(_$BdkError_VerifyTransactionImpl) then) = - __$$BdkError_VerifyTransactionImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_VerifyTransactionImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_VerifyTransactionImpl> - implements _$$BdkError_VerifyTransactionImplCopyWith<$Res> { - __$$BdkError_VerifyTransactionImplCopyWithImpl( - _$BdkError_VerifyTransactionImpl _value, - $Res Function(_$BdkError_VerifyTransactionImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_VerifyTransactionImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_VerifyTransactionImpl extends BdkError_VerifyTransaction { - const _$BdkError_VerifyTransactionImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.verifyTransaction(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_VerifyTransactionImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_VerifyTransactionImplCopyWith<_$BdkError_VerifyTransactionImpl> - get copyWith => __$$BdkError_VerifyTransactionImplCopyWithImpl< - _$BdkError_VerifyTransactionImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return verifyTransaction(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return verifyTransaction?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (verifyTransaction != null) { - return verifyTransaction(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return verifyTransaction(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return verifyTransaction?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (verifyTransaction != null) { - return verifyTransaction(this); - } - return orElse(); - } -} - -abstract class BdkError_VerifyTransaction extends BdkError { - const factory BdkError_VerifyTransaction(final String field0) = - _$BdkError_VerifyTransactionImpl; - const BdkError_VerifyTransaction._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_VerifyTransactionImplCopyWith<_$BdkError_VerifyTransactionImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_AddressImplCopyWith<$Res> { - factory _$$BdkError_AddressImplCopyWith(_$BdkError_AddressImpl value, - $Res Function(_$BdkError_AddressImpl) then) = - __$$BdkError_AddressImplCopyWithImpl<$Res>; - @useResult - $Res call({AddressError field0}); - - $AddressErrorCopyWith<$Res> get field0; -} - -/// @nodoc -class __$$BdkError_AddressImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_AddressImpl> - implements _$$BdkError_AddressImplCopyWith<$Res> { - __$$BdkError_AddressImplCopyWithImpl(_$BdkError_AddressImpl _value, - $Res Function(_$BdkError_AddressImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_AddressImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as AddressError, - )); - } - - @override - @pragma('vm:prefer-inline') - $AddressErrorCopyWith<$Res> get field0 { - return $AddressErrorCopyWith<$Res>(_value.field0, (value) { - return _then(_value.copyWith(field0: value)); - }); - } -} - -/// @nodoc - -class _$BdkError_AddressImpl extends BdkError_Address { - const _$BdkError_AddressImpl(this.field0) : super._(); - - @override - final AddressError field0; - - @override - String toString() { - return 'BdkError.address(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_AddressImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_AddressImplCopyWith<_$BdkError_AddressImpl> get copyWith => - __$$BdkError_AddressImplCopyWithImpl<_$BdkError_AddressImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return address(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return address?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (address != null) { - return address(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return address(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return address?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (address != null) { - return address(this); - } - return orElse(); - } -} - -abstract class BdkError_Address extends BdkError { - const factory BdkError_Address(final AddressError field0) = - _$BdkError_AddressImpl; - const BdkError_Address._() : super._(); - - AddressError get field0; - @JsonKey(ignore: true) - _$$BdkError_AddressImplCopyWith<_$BdkError_AddressImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_DescriptorImplCopyWith<$Res> { - factory _$$BdkError_DescriptorImplCopyWith(_$BdkError_DescriptorImpl value, - $Res Function(_$BdkError_DescriptorImpl) then) = - __$$BdkError_DescriptorImplCopyWithImpl<$Res>; - @useResult - $Res call({DescriptorError field0}); - - $DescriptorErrorCopyWith<$Res> get field0; -} - -/// @nodoc -class __$$BdkError_DescriptorImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_DescriptorImpl> - implements _$$BdkError_DescriptorImplCopyWith<$Res> { - __$$BdkError_DescriptorImplCopyWithImpl(_$BdkError_DescriptorImpl _value, - $Res Function(_$BdkError_DescriptorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_DescriptorImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as DescriptorError, - )); - } - - @override - @pragma('vm:prefer-inline') - $DescriptorErrorCopyWith<$Res> get field0 { - return $DescriptorErrorCopyWith<$Res>(_value.field0, (value) { - return _then(_value.copyWith(field0: value)); - }); - } -} - -/// @nodoc - -class _$BdkError_DescriptorImpl extends BdkError_Descriptor { - const _$BdkError_DescriptorImpl(this.field0) : super._(); - - @override - final DescriptorError field0; - - @override - String toString() { - return 'BdkError.descriptor(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_DescriptorImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_DescriptorImplCopyWith<_$BdkError_DescriptorImpl> get copyWith => - __$$BdkError_DescriptorImplCopyWithImpl<_$BdkError_DescriptorImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return descriptor(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return descriptor?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (descriptor != null) { - return descriptor(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return descriptor(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return descriptor?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (descriptor != null) { - return descriptor(this); - } - return orElse(); - } -} - -abstract class BdkError_Descriptor extends BdkError { - const factory BdkError_Descriptor(final DescriptorError field0) = - _$BdkError_DescriptorImpl; - const BdkError_Descriptor._() : super._(); - - DescriptorError get field0; - @JsonKey(ignore: true) - _$$BdkError_DescriptorImplCopyWith<_$BdkError_DescriptorImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_InvalidU32BytesImplCopyWith<$Res> { - factory _$$BdkError_InvalidU32BytesImplCopyWith( - _$BdkError_InvalidU32BytesImpl value, - $Res Function(_$BdkError_InvalidU32BytesImpl) then) = - __$$BdkError_InvalidU32BytesImplCopyWithImpl<$Res>; - @useResult - $Res call({Uint8List field0}); -} - -/// @nodoc -class __$$BdkError_InvalidU32BytesImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidU32BytesImpl> - implements _$$BdkError_InvalidU32BytesImplCopyWith<$Res> { - __$$BdkError_InvalidU32BytesImplCopyWithImpl( - _$BdkError_InvalidU32BytesImpl _value, - $Res Function(_$BdkError_InvalidU32BytesImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_InvalidU32BytesImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as Uint8List, - )); - } -} - -/// @nodoc - -class _$BdkError_InvalidU32BytesImpl extends BdkError_InvalidU32Bytes { - const _$BdkError_InvalidU32BytesImpl(this.field0) : super._(); - - @override - final Uint8List field0; - - @override - String toString() { - return 'BdkError.invalidU32Bytes(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_InvalidU32BytesImpl && - const DeepCollectionEquality().equals(other.field0, field0)); - } - - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_InvalidU32BytesImplCopyWith<_$BdkError_InvalidU32BytesImpl> - get copyWith => __$$BdkError_InvalidU32BytesImplCopyWithImpl< - _$BdkError_InvalidU32BytesImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidU32Bytes(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidU32Bytes?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidU32Bytes != null) { - return invalidU32Bytes(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidU32Bytes(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidU32Bytes?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidU32Bytes != null) { - return invalidU32Bytes(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidU32Bytes extends BdkError { - const factory BdkError_InvalidU32Bytes(final Uint8List field0) = - _$BdkError_InvalidU32BytesImpl; - const BdkError_InvalidU32Bytes._() : super._(); - - Uint8List get field0; - @JsonKey(ignore: true) - _$$BdkError_InvalidU32BytesImplCopyWith<_$BdkError_InvalidU32BytesImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_GenericImplCopyWith<$Res> { - factory _$$BdkError_GenericImplCopyWith(_$BdkError_GenericImpl value, - $Res Function(_$BdkError_GenericImpl) then) = - __$$BdkError_GenericImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_GenericImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_GenericImpl> - implements _$$BdkError_GenericImplCopyWith<$Res> { - __$$BdkError_GenericImplCopyWithImpl(_$BdkError_GenericImpl _value, - $Res Function(_$BdkError_GenericImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_GenericImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_GenericImpl extends BdkError_Generic { - const _$BdkError_GenericImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.generic(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_GenericImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_GenericImplCopyWith<_$BdkError_GenericImpl> get copyWith => - __$$BdkError_GenericImplCopyWithImpl<_$BdkError_GenericImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return generic(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return generic?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (generic != null) { - return generic(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return generic(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return generic?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (generic != null) { - return generic(this); - } - return orElse(); - } -} - -abstract class BdkError_Generic extends BdkError { - const factory BdkError_Generic(final String field0) = _$BdkError_GenericImpl; - const BdkError_Generic._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_GenericImplCopyWith<_$BdkError_GenericImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_ScriptDoesntHaveAddressFormImplCopyWith<$Res> { - factory _$$BdkError_ScriptDoesntHaveAddressFormImplCopyWith( - _$BdkError_ScriptDoesntHaveAddressFormImpl value, - $Res Function(_$BdkError_ScriptDoesntHaveAddressFormImpl) then) = - __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, - _$BdkError_ScriptDoesntHaveAddressFormImpl> - implements _$$BdkError_ScriptDoesntHaveAddressFormImplCopyWith<$Res> { - __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl( - _$BdkError_ScriptDoesntHaveAddressFormImpl _value, - $Res Function(_$BdkError_ScriptDoesntHaveAddressFormImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_ScriptDoesntHaveAddressFormImpl - extends BdkError_ScriptDoesntHaveAddressForm { - const _$BdkError_ScriptDoesntHaveAddressFormImpl() : super._(); - - @override - String toString() { - return 'BdkError.scriptDoesntHaveAddressForm()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_ScriptDoesntHaveAddressFormImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return scriptDoesntHaveAddressForm(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return scriptDoesntHaveAddressForm?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (scriptDoesntHaveAddressForm != null) { - return scriptDoesntHaveAddressForm(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return scriptDoesntHaveAddressForm(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return scriptDoesntHaveAddressForm?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (scriptDoesntHaveAddressForm != null) { - return scriptDoesntHaveAddressForm(this); - } - return orElse(); - } -} - -abstract class BdkError_ScriptDoesntHaveAddressForm extends BdkError { - const factory BdkError_ScriptDoesntHaveAddressForm() = - _$BdkError_ScriptDoesntHaveAddressFormImpl; - const BdkError_ScriptDoesntHaveAddressForm._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_NoRecipientsImplCopyWith<$Res> { - factory _$$BdkError_NoRecipientsImplCopyWith( - _$BdkError_NoRecipientsImpl value, - $Res Function(_$BdkError_NoRecipientsImpl) then) = - __$$BdkError_NoRecipientsImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_NoRecipientsImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_NoRecipientsImpl> - implements _$$BdkError_NoRecipientsImplCopyWith<$Res> { - __$$BdkError_NoRecipientsImplCopyWithImpl(_$BdkError_NoRecipientsImpl _value, - $Res Function(_$BdkError_NoRecipientsImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_NoRecipientsImpl extends BdkError_NoRecipients { - const _$BdkError_NoRecipientsImpl() : super._(); - - @override - String toString() { - return 'BdkError.noRecipients()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_NoRecipientsImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return noRecipients(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return noRecipients?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (noRecipients != null) { - return noRecipients(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return noRecipients(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return noRecipients?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (noRecipients != null) { - return noRecipients(this); - } - return orElse(); - } -} - -abstract class BdkError_NoRecipients extends BdkError { - const factory BdkError_NoRecipients() = _$BdkError_NoRecipientsImpl; - const BdkError_NoRecipients._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_NoUtxosSelectedImplCopyWith<$Res> { - factory _$$BdkError_NoUtxosSelectedImplCopyWith( - _$BdkError_NoUtxosSelectedImpl value, - $Res Function(_$BdkError_NoUtxosSelectedImpl) then) = - __$$BdkError_NoUtxosSelectedImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_NoUtxosSelectedImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_NoUtxosSelectedImpl> - implements _$$BdkError_NoUtxosSelectedImplCopyWith<$Res> { - __$$BdkError_NoUtxosSelectedImplCopyWithImpl( - _$BdkError_NoUtxosSelectedImpl _value, - $Res Function(_$BdkError_NoUtxosSelectedImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_NoUtxosSelectedImpl extends BdkError_NoUtxosSelected { - const _$BdkError_NoUtxosSelectedImpl() : super._(); - - @override - String toString() { - return 'BdkError.noUtxosSelected()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_NoUtxosSelectedImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return noUtxosSelected(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return noUtxosSelected?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (noUtxosSelected != null) { - return noUtxosSelected(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return noUtxosSelected(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return noUtxosSelected?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (noUtxosSelected != null) { - return noUtxosSelected(this); - } - return orElse(); - } -} - -abstract class BdkError_NoUtxosSelected extends BdkError { - const factory BdkError_NoUtxosSelected() = _$BdkError_NoUtxosSelectedImpl; - const BdkError_NoUtxosSelected._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_OutputBelowDustLimitImplCopyWith<$Res> { - factory _$$BdkError_OutputBelowDustLimitImplCopyWith( - _$BdkError_OutputBelowDustLimitImpl value, - $Res Function(_$BdkError_OutputBelowDustLimitImpl) then) = - __$$BdkError_OutputBelowDustLimitImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt field0}); -} - -/// @nodoc -class __$$BdkError_OutputBelowDustLimitImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_OutputBelowDustLimitImpl> - implements _$$BdkError_OutputBelowDustLimitImplCopyWith<$Res> { - __$$BdkError_OutputBelowDustLimitImplCopyWithImpl( - _$BdkError_OutputBelowDustLimitImpl _value, - $Res Function(_$BdkError_OutputBelowDustLimitImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_OutputBelowDustLimitImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$BdkError_OutputBelowDustLimitImpl - extends BdkError_OutputBelowDustLimit { - const _$BdkError_OutputBelowDustLimitImpl(this.field0) : super._(); - - @override - final BigInt field0; - - @override - String toString() { - return 'BdkError.outputBelowDustLimit(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_OutputBelowDustLimitImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_OutputBelowDustLimitImplCopyWith< - _$BdkError_OutputBelowDustLimitImpl> - get copyWith => __$$BdkError_OutputBelowDustLimitImplCopyWithImpl< - _$BdkError_OutputBelowDustLimitImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return outputBelowDustLimit(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return outputBelowDustLimit?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (outputBelowDustLimit != null) { - return outputBelowDustLimit(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return outputBelowDustLimit(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return outputBelowDustLimit?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (outputBelowDustLimit != null) { - return outputBelowDustLimit(this); - } - return orElse(); - } -} - -abstract class BdkError_OutputBelowDustLimit extends BdkError { - const factory BdkError_OutputBelowDustLimit(final BigInt field0) = - _$BdkError_OutputBelowDustLimitImpl; - const BdkError_OutputBelowDustLimit._() : super._(); - - BigInt get field0; - @JsonKey(ignore: true) - _$$BdkError_OutputBelowDustLimitImplCopyWith< - _$BdkError_OutputBelowDustLimitImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_InsufficientFundsImplCopyWith<$Res> { - factory _$$BdkError_InsufficientFundsImplCopyWith( - _$BdkError_InsufficientFundsImpl value, - $Res Function(_$BdkError_InsufficientFundsImpl) then) = - __$$BdkError_InsufficientFundsImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt needed, BigInt available}); -} - -/// @nodoc -class __$$BdkError_InsufficientFundsImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InsufficientFundsImpl> - implements _$$BdkError_InsufficientFundsImplCopyWith<$Res> { - __$$BdkError_InsufficientFundsImplCopyWithImpl( - _$BdkError_InsufficientFundsImpl _value, - $Res Function(_$BdkError_InsufficientFundsImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? needed = null, - Object? available = null, - }) { - return _then(_$BdkError_InsufficientFundsImpl( - needed: null == needed - ? _value.needed - : needed // ignore: cast_nullable_to_non_nullable - as BigInt, - available: null == available - ? _value.available - : available // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$BdkError_InsufficientFundsImpl extends BdkError_InsufficientFunds { - const _$BdkError_InsufficientFundsImpl( - {required this.needed, required this.available}) - : super._(); - - /// Sats needed for some transaction - @override - final BigInt needed; - - /// Sats available for spending - @override - final BigInt available; - - @override - String toString() { - return 'BdkError.insufficientFunds(needed: $needed, available: $available)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_InsufficientFundsImpl && - (identical(other.needed, needed) || other.needed == needed) && - (identical(other.available, available) || - other.available == available)); - } - - @override - int get hashCode => Object.hash(runtimeType, needed, available); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_InsufficientFundsImplCopyWith<_$BdkError_InsufficientFundsImpl> - get copyWith => __$$BdkError_InsufficientFundsImplCopyWithImpl< - _$BdkError_InsufficientFundsImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return insufficientFunds(needed, available); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return insufficientFunds?.call(needed, available); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (insufficientFunds != null) { - return insufficientFunds(needed, available); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return insufficientFunds(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return insufficientFunds?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (insufficientFunds != null) { - return insufficientFunds(this); - } - return orElse(); - } -} - -abstract class BdkError_InsufficientFunds extends BdkError { - const factory BdkError_InsufficientFunds( - {required final BigInt needed, - required final BigInt available}) = _$BdkError_InsufficientFundsImpl; - const BdkError_InsufficientFunds._() : super._(); - - /// Sats needed for some transaction - BigInt get needed; - - /// Sats available for spending - BigInt get available; - @JsonKey(ignore: true) - _$$BdkError_InsufficientFundsImplCopyWith<_$BdkError_InsufficientFundsImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_BnBTotalTriesExceededImplCopyWith<$Res> { - factory _$$BdkError_BnBTotalTriesExceededImplCopyWith( - _$BdkError_BnBTotalTriesExceededImpl value, - $Res Function(_$BdkError_BnBTotalTriesExceededImpl) then) = - __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_BnBTotalTriesExceededImpl> - implements _$$BdkError_BnBTotalTriesExceededImplCopyWith<$Res> { - __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl( - _$BdkError_BnBTotalTriesExceededImpl _value, - $Res Function(_$BdkError_BnBTotalTriesExceededImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_BnBTotalTriesExceededImpl - extends BdkError_BnBTotalTriesExceeded { - const _$BdkError_BnBTotalTriesExceededImpl() : super._(); - - @override - String toString() { - return 'BdkError.bnBTotalTriesExceeded()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_BnBTotalTriesExceededImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return bnBTotalTriesExceeded(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return bnBTotalTriesExceeded?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (bnBTotalTriesExceeded != null) { - return bnBTotalTriesExceeded(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return bnBTotalTriesExceeded(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return bnBTotalTriesExceeded?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (bnBTotalTriesExceeded != null) { - return bnBTotalTriesExceeded(this); - } - return orElse(); - } -} - -abstract class BdkError_BnBTotalTriesExceeded extends BdkError { - const factory BdkError_BnBTotalTriesExceeded() = - _$BdkError_BnBTotalTriesExceededImpl; - const BdkError_BnBTotalTriesExceeded._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_BnBNoExactMatchImplCopyWith<$Res> { - factory _$$BdkError_BnBNoExactMatchImplCopyWith( - _$BdkError_BnBNoExactMatchImpl value, - $Res Function(_$BdkError_BnBNoExactMatchImpl) then) = - __$$BdkError_BnBNoExactMatchImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_BnBNoExactMatchImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_BnBNoExactMatchImpl> - implements _$$BdkError_BnBNoExactMatchImplCopyWith<$Res> { - __$$BdkError_BnBNoExactMatchImplCopyWithImpl( - _$BdkError_BnBNoExactMatchImpl _value, - $Res Function(_$BdkError_BnBNoExactMatchImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_BnBNoExactMatchImpl extends BdkError_BnBNoExactMatch { - const _$BdkError_BnBNoExactMatchImpl() : super._(); - - @override - String toString() { - return 'BdkError.bnBNoExactMatch()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_BnBNoExactMatchImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return bnBNoExactMatch(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return bnBNoExactMatch?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (bnBNoExactMatch != null) { - return bnBNoExactMatch(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return bnBNoExactMatch(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return bnBNoExactMatch?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (bnBNoExactMatch != null) { - return bnBNoExactMatch(this); - } - return orElse(); - } -} - -abstract class BdkError_BnBNoExactMatch extends BdkError { - const factory BdkError_BnBNoExactMatch() = _$BdkError_BnBNoExactMatchImpl; - const BdkError_BnBNoExactMatch._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_UnknownUtxoImplCopyWith<$Res> { - factory _$$BdkError_UnknownUtxoImplCopyWith(_$BdkError_UnknownUtxoImpl value, - $Res Function(_$BdkError_UnknownUtxoImpl) then) = - __$$BdkError_UnknownUtxoImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_UnknownUtxoImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_UnknownUtxoImpl> - implements _$$BdkError_UnknownUtxoImplCopyWith<$Res> { - __$$BdkError_UnknownUtxoImplCopyWithImpl(_$BdkError_UnknownUtxoImpl _value, - $Res Function(_$BdkError_UnknownUtxoImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_UnknownUtxoImpl extends BdkError_UnknownUtxo { - const _$BdkError_UnknownUtxoImpl() : super._(); - - @override - String toString() { - return 'BdkError.unknownUtxo()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_UnknownUtxoImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return unknownUtxo(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return unknownUtxo?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (unknownUtxo != null) { - return unknownUtxo(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return unknownUtxo(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return unknownUtxo?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (unknownUtxo != null) { - return unknownUtxo(this); - } - return orElse(); - } -} - -abstract class BdkError_UnknownUtxo extends BdkError { - const factory BdkError_UnknownUtxo() = _$BdkError_UnknownUtxoImpl; - const BdkError_UnknownUtxo._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_TransactionNotFoundImplCopyWith<$Res> { - factory _$$BdkError_TransactionNotFoundImplCopyWith( - _$BdkError_TransactionNotFoundImpl value, - $Res Function(_$BdkError_TransactionNotFoundImpl) then) = - __$$BdkError_TransactionNotFoundImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_TransactionNotFoundImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_TransactionNotFoundImpl> - implements _$$BdkError_TransactionNotFoundImplCopyWith<$Res> { - __$$BdkError_TransactionNotFoundImplCopyWithImpl( - _$BdkError_TransactionNotFoundImpl _value, - $Res Function(_$BdkError_TransactionNotFoundImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_TransactionNotFoundImpl extends BdkError_TransactionNotFound { - const _$BdkError_TransactionNotFoundImpl() : super._(); - - @override - String toString() { - return 'BdkError.transactionNotFound()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_TransactionNotFoundImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return transactionNotFound(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return transactionNotFound?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (transactionNotFound != null) { - return transactionNotFound(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return transactionNotFound(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return transactionNotFound?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (transactionNotFound != null) { - return transactionNotFound(this); - } - return orElse(); - } -} - -abstract class BdkError_TransactionNotFound extends BdkError { - const factory BdkError_TransactionNotFound() = - _$BdkError_TransactionNotFoundImpl; - const BdkError_TransactionNotFound._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_TransactionConfirmedImplCopyWith<$Res> { - factory _$$BdkError_TransactionConfirmedImplCopyWith( - _$BdkError_TransactionConfirmedImpl value, - $Res Function(_$BdkError_TransactionConfirmedImpl) then) = - __$$BdkError_TransactionConfirmedImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_TransactionConfirmedImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_TransactionConfirmedImpl> - implements _$$BdkError_TransactionConfirmedImplCopyWith<$Res> { - __$$BdkError_TransactionConfirmedImplCopyWithImpl( - _$BdkError_TransactionConfirmedImpl _value, - $Res Function(_$BdkError_TransactionConfirmedImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_TransactionConfirmedImpl - extends BdkError_TransactionConfirmed { - const _$BdkError_TransactionConfirmedImpl() : super._(); - - @override - String toString() { - return 'BdkError.transactionConfirmed()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_TransactionConfirmedImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return transactionConfirmed(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return transactionConfirmed?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (transactionConfirmed != null) { - return transactionConfirmed(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return transactionConfirmed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return transactionConfirmed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (transactionConfirmed != null) { - return transactionConfirmed(this); - } - return orElse(); - } -} - -abstract class BdkError_TransactionConfirmed extends BdkError { - const factory BdkError_TransactionConfirmed() = - _$BdkError_TransactionConfirmedImpl; - const BdkError_TransactionConfirmed._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_IrreplaceableTransactionImplCopyWith<$Res> { - factory _$$BdkError_IrreplaceableTransactionImplCopyWith( - _$BdkError_IrreplaceableTransactionImpl value, - $Res Function(_$BdkError_IrreplaceableTransactionImpl) then) = - __$$BdkError_IrreplaceableTransactionImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_IrreplaceableTransactionImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, - _$BdkError_IrreplaceableTransactionImpl> - implements _$$BdkError_IrreplaceableTransactionImplCopyWith<$Res> { - __$$BdkError_IrreplaceableTransactionImplCopyWithImpl( - _$BdkError_IrreplaceableTransactionImpl _value, - $Res Function(_$BdkError_IrreplaceableTransactionImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_IrreplaceableTransactionImpl - extends BdkError_IrreplaceableTransaction { - const _$BdkError_IrreplaceableTransactionImpl() : super._(); - - @override - String toString() { - return 'BdkError.irreplaceableTransaction()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_IrreplaceableTransactionImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return irreplaceableTransaction(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return irreplaceableTransaction?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (irreplaceableTransaction != null) { - return irreplaceableTransaction(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return irreplaceableTransaction(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return irreplaceableTransaction?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (irreplaceableTransaction != null) { - return irreplaceableTransaction(this); - } - return orElse(); - } -} - -abstract class BdkError_IrreplaceableTransaction extends BdkError { - const factory BdkError_IrreplaceableTransaction() = - _$BdkError_IrreplaceableTransactionImpl; - const BdkError_IrreplaceableTransaction._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_FeeRateTooLowImplCopyWith<$Res> { - factory _$$BdkError_FeeRateTooLowImplCopyWith( - _$BdkError_FeeRateTooLowImpl value, - $Res Function(_$BdkError_FeeRateTooLowImpl) then) = - __$$BdkError_FeeRateTooLowImplCopyWithImpl<$Res>; - @useResult - $Res call({double needed}); -} - -/// @nodoc -class __$$BdkError_FeeRateTooLowImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_FeeRateTooLowImpl> - implements _$$BdkError_FeeRateTooLowImplCopyWith<$Res> { - __$$BdkError_FeeRateTooLowImplCopyWithImpl( - _$BdkError_FeeRateTooLowImpl _value, - $Res Function(_$BdkError_FeeRateTooLowImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? needed = null, - }) { - return _then(_$BdkError_FeeRateTooLowImpl( - needed: null == needed - ? _value.needed - : needed // ignore: cast_nullable_to_non_nullable - as double, - )); - } -} - -/// @nodoc - -class _$BdkError_FeeRateTooLowImpl extends BdkError_FeeRateTooLow { - const _$BdkError_FeeRateTooLowImpl({required this.needed}) : super._(); - - /// Required fee rate (satoshi/vbyte) - @override - final double needed; - - @override - String toString() { - return 'BdkError.feeRateTooLow(needed: $needed)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_FeeRateTooLowImpl && - (identical(other.needed, needed) || other.needed == needed)); - } - - @override - int get hashCode => Object.hash(runtimeType, needed); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_FeeRateTooLowImplCopyWith<_$BdkError_FeeRateTooLowImpl> - get copyWith => __$$BdkError_FeeRateTooLowImplCopyWithImpl< - _$BdkError_FeeRateTooLowImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return feeRateTooLow(needed); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return feeRateTooLow?.call(needed); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (feeRateTooLow != null) { - return feeRateTooLow(needed); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return feeRateTooLow(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return feeRateTooLow?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (feeRateTooLow != null) { - return feeRateTooLow(this); - } - return orElse(); - } -} - -abstract class BdkError_FeeRateTooLow extends BdkError { - const factory BdkError_FeeRateTooLow({required final double needed}) = - _$BdkError_FeeRateTooLowImpl; - const BdkError_FeeRateTooLow._() : super._(); - - /// Required fee rate (satoshi/vbyte) - double get needed; - @JsonKey(ignore: true) - _$$BdkError_FeeRateTooLowImplCopyWith<_$BdkError_FeeRateTooLowImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_FeeTooLowImplCopyWith<$Res> { - factory _$$BdkError_FeeTooLowImplCopyWith(_$BdkError_FeeTooLowImpl value, - $Res Function(_$BdkError_FeeTooLowImpl) then) = - __$$BdkError_FeeTooLowImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt needed}); -} - -/// @nodoc -class __$$BdkError_FeeTooLowImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_FeeTooLowImpl> - implements _$$BdkError_FeeTooLowImplCopyWith<$Res> { - __$$BdkError_FeeTooLowImplCopyWithImpl(_$BdkError_FeeTooLowImpl _value, - $Res Function(_$BdkError_FeeTooLowImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? needed = null, - }) { - return _then(_$BdkError_FeeTooLowImpl( - needed: null == needed - ? _value.needed - : needed // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$BdkError_FeeTooLowImpl extends BdkError_FeeTooLow { - const _$BdkError_FeeTooLowImpl({required this.needed}) : super._(); - - /// Required fee absolute value (satoshi) - @override - final BigInt needed; - - @override - String toString() { - return 'BdkError.feeTooLow(needed: $needed)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_FeeTooLowImpl && - (identical(other.needed, needed) || other.needed == needed)); - } - - @override - int get hashCode => Object.hash(runtimeType, needed); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_FeeTooLowImplCopyWith<_$BdkError_FeeTooLowImpl> get copyWith => - __$$BdkError_FeeTooLowImplCopyWithImpl<_$BdkError_FeeTooLowImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return feeTooLow(needed); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return feeTooLow?.call(needed); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (feeTooLow != null) { - return feeTooLow(needed); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return feeTooLow(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return feeTooLow?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (feeTooLow != null) { - return feeTooLow(this); - } - return orElse(); - } -} - -abstract class BdkError_FeeTooLow extends BdkError { - const factory BdkError_FeeTooLow({required final BigInt needed}) = - _$BdkError_FeeTooLowImpl; - const BdkError_FeeTooLow._() : super._(); - - /// Required fee absolute value (satoshi) - BigInt get needed; - @JsonKey(ignore: true) - _$$BdkError_FeeTooLowImplCopyWith<_$BdkError_FeeTooLowImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_FeeRateUnavailableImplCopyWith<$Res> { - factory _$$BdkError_FeeRateUnavailableImplCopyWith( - _$BdkError_FeeRateUnavailableImpl value, - $Res Function(_$BdkError_FeeRateUnavailableImpl) then) = - __$$BdkError_FeeRateUnavailableImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_FeeRateUnavailableImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_FeeRateUnavailableImpl> - implements _$$BdkError_FeeRateUnavailableImplCopyWith<$Res> { - __$$BdkError_FeeRateUnavailableImplCopyWithImpl( - _$BdkError_FeeRateUnavailableImpl _value, - $Res Function(_$BdkError_FeeRateUnavailableImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { - const _$BdkError_FeeRateUnavailableImpl() : super._(); - - @override - String toString() { - return 'BdkError.feeRateUnavailable()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_FeeRateUnavailableImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return feeRateUnavailable(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return feeRateUnavailable?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (feeRateUnavailable != null) { - return feeRateUnavailable(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return feeRateUnavailable(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return feeRateUnavailable?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (feeRateUnavailable != null) { - return feeRateUnavailable(this); - } - return orElse(); - } -} - -abstract class BdkError_FeeRateUnavailable extends BdkError { - const factory BdkError_FeeRateUnavailable() = - _$BdkError_FeeRateUnavailableImpl; - const BdkError_FeeRateUnavailable._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_MissingKeyOriginImplCopyWith<$Res> { - factory _$$BdkError_MissingKeyOriginImplCopyWith( - _$BdkError_MissingKeyOriginImpl value, - $Res Function(_$BdkError_MissingKeyOriginImpl) then) = - __$$BdkError_MissingKeyOriginImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_MissingKeyOriginImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MissingKeyOriginImpl> - implements _$$BdkError_MissingKeyOriginImplCopyWith<$Res> { - __$$BdkError_MissingKeyOriginImplCopyWithImpl( - _$BdkError_MissingKeyOriginImpl _value, - $Res Function(_$BdkError_MissingKeyOriginImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_MissingKeyOriginImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_MissingKeyOriginImpl extends BdkError_MissingKeyOrigin { - const _$BdkError_MissingKeyOriginImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.missingKeyOrigin(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_MissingKeyOriginImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_MissingKeyOriginImplCopyWith<_$BdkError_MissingKeyOriginImpl> - get copyWith => __$$BdkError_MissingKeyOriginImplCopyWithImpl< - _$BdkError_MissingKeyOriginImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return missingKeyOrigin(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return missingKeyOrigin?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (missingKeyOrigin != null) { - return missingKeyOrigin(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return missingKeyOrigin(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return missingKeyOrigin?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (missingKeyOrigin != null) { - return missingKeyOrigin(this); - } - return orElse(); - } -} - -abstract class BdkError_MissingKeyOrigin extends BdkError { - const factory BdkError_MissingKeyOrigin(final String field0) = - _$BdkError_MissingKeyOriginImpl; - const BdkError_MissingKeyOrigin._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_MissingKeyOriginImplCopyWith<_$BdkError_MissingKeyOriginImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_KeyImplCopyWith<$Res> { - factory _$$BdkError_KeyImplCopyWith( - _$BdkError_KeyImpl value, $Res Function(_$BdkError_KeyImpl) then) = - __$$BdkError_KeyImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_KeyImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_KeyImpl> - implements _$$BdkError_KeyImplCopyWith<$Res> { - __$$BdkError_KeyImplCopyWithImpl( - _$BdkError_KeyImpl _value, $Res Function(_$BdkError_KeyImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_KeyImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_KeyImpl extends BdkError_Key { - const _$BdkError_KeyImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.key(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_KeyImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_KeyImplCopyWith<_$BdkError_KeyImpl> get copyWith => - __$$BdkError_KeyImplCopyWithImpl<_$BdkError_KeyImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return key(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return key?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (key != null) { - return key(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return key(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return key?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (key != null) { - return key(this); - } - return orElse(); - } -} - -abstract class BdkError_Key extends BdkError { - const factory BdkError_Key(final String field0) = _$BdkError_KeyImpl; - const BdkError_Key._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_KeyImplCopyWith<_$BdkError_KeyImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_ChecksumMismatchImplCopyWith<$Res> { - factory _$$BdkError_ChecksumMismatchImplCopyWith( - _$BdkError_ChecksumMismatchImpl value, - $Res Function(_$BdkError_ChecksumMismatchImpl) then) = - __$$BdkError_ChecksumMismatchImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BdkError_ChecksumMismatchImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_ChecksumMismatchImpl> - implements _$$BdkError_ChecksumMismatchImplCopyWith<$Res> { - __$$BdkError_ChecksumMismatchImplCopyWithImpl( - _$BdkError_ChecksumMismatchImpl _value, - $Res Function(_$BdkError_ChecksumMismatchImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BdkError_ChecksumMismatchImpl extends BdkError_ChecksumMismatch { - const _$BdkError_ChecksumMismatchImpl() : super._(); - - @override - String toString() { - return 'BdkError.checksumMismatch()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_ChecksumMismatchImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return checksumMismatch(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return checksumMismatch?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (checksumMismatch != null) { - return checksumMismatch(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return checksumMismatch(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return checksumMismatch?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (checksumMismatch != null) { - return checksumMismatch(this); - } - return orElse(); - } -} - -abstract class BdkError_ChecksumMismatch extends BdkError { - const factory BdkError_ChecksumMismatch() = _$BdkError_ChecksumMismatchImpl; - const BdkError_ChecksumMismatch._() : super._(); -} - -/// @nodoc -abstract class _$$BdkError_SpendingPolicyRequiredImplCopyWith<$Res> { - factory _$$BdkError_SpendingPolicyRequiredImplCopyWith( - _$BdkError_SpendingPolicyRequiredImpl value, - $Res Function(_$BdkError_SpendingPolicyRequiredImpl) then) = - __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl<$Res>; - @useResult - $Res call({KeychainKind field0}); -} - -/// @nodoc -class __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_SpendingPolicyRequiredImpl> - implements _$$BdkError_SpendingPolicyRequiredImplCopyWith<$Res> { - __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl( - _$BdkError_SpendingPolicyRequiredImpl _value, - $Res Function(_$BdkError_SpendingPolicyRequiredImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_SpendingPolicyRequiredImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as KeychainKind, - )); - } -} - -/// @nodoc - -class _$BdkError_SpendingPolicyRequiredImpl - extends BdkError_SpendingPolicyRequired { - const _$BdkError_SpendingPolicyRequiredImpl(this.field0) : super._(); - - @override - final KeychainKind field0; - - @override - String toString() { - return 'BdkError.spendingPolicyRequired(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_SpendingPolicyRequiredImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_SpendingPolicyRequiredImplCopyWith< - _$BdkError_SpendingPolicyRequiredImpl> - get copyWith => __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl< - _$BdkError_SpendingPolicyRequiredImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return spendingPolicyRequired(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return spendingPolicyRequired?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (spendingPolicyRequired != null) { - return spendingPolicyRequired(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return spendingPolicyRequired(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return spendingPolicyRequired?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (spendingPolicyRequired != null) { - return spendingPolicyRequired(this); - } - return orElse(); - } -} - -abstract class BdkError_SpendingPolicyRequired extends BdkError { - const factory BdkError_SpendingPolicyRequired(final KeychainKind field0) = - _$BdkError_SpendingPolicyRequiredImpl; - const BdkError_SpendingPolicyRequired._() : super._(); - - KeychainKind get field0; - @JsonKey(ignore: true) - _$$BdkError_SpendingPolicyRequiredImplCopyWith< - _$BdkError_SpendingPolicyRequiredImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_InvalidPolicyPathErrorImplCopyWith<$Res> { - factory _$$BdkError_InvalidPolicyPathErrorImplCopyWith( - _$BdkError_InvalidPolicyPathErrorImpl value, - $Res Function(_$BdkError_InvalidPolicyPathErrorImpl) then) = - __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidPolicyPathErrorImpl> - implements _$$BdkError_InvalidPolicyPathErrorImplCopyWith<$Res> { - __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl( - _$BdkError_InvalidPolicyPathErrorImpl _value, - $Res Function(_$BdkError_InvalidPolicyPathErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_InvalidPolicyPathErrorImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_InvalidPolicyPathErrorImpl - extends BdkError_InvalidPolicyPathError { - const _$BdkError_InvalidPolicyPathErrorImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.invalidPolicyPathError(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_InvalidPolicyPathErrorImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_InvalidPolicyPathErrorImplCopyWith< - _$BdkError_InvalidPolicyPathErrorImpl> - get copyWith => __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl< - _$BdkError_InvalidPolicyPathErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidPolicyPathError(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidPolicyPathError?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidPolicyPathError != null) { - return invalidPolicyPathError(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidPolicyPathError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidPolicyPathError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidPolicyPathError != null) { - return invalidPolicyPathError(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidPolicyPathError extends BdkError { - const factory BdkError_InvalidPolicyPathError(final String field0) = - _$BdkError_InvalidPolicyPathErrorImpl; - const BdkError_InvalidPolicyPathError._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_InvalidPolicyPathErrorImplCopyWith< - _$BdkError_InvalidPolicyPathErrorImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_SignerImplCopyWith<$Res> { - factory _$$BdkError_SignerImplCopyWith(_$BdkError_SignerImpl value, - $Res Function(_$BdkError_SignerImpl) then) = - __$$BdkError_SignerImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_SignerImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_SignerImpl> - implements _$$BdkError_SignerImplCopyWith<$Res> { - __$$BdkError_SignerImplCopyWithImpl( - _$BdkError_SignerImpl _value, $Res Function(_$BdkError_SignerImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_SignerImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_SignerImpl extends BdkError_Signer { - const _$BdkError_SignerImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.signer(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_SignerImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_SignerImplCopyWith<_$BdkError_SignerImpl> get copyWith => - __$$BdkError_SignerImplCopyWithImpl<_$BdkError_SignerImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return signer(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return signer?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (signer != null) { - return signer(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return signer(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return signer?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (signer != null) { - return signer(this); - } - return orElse(); - } -} - -abstract class BdkError_Signer extends BdkError { - const factory BdkError_Signer(final String field0) = _$BdkError_SignerImpl; - const BdkError_Signer._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_SignerImplCopyWith<_$BdkError_SignerImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_InvalidNetworkImplCopyWith<$Res> { - factory _$$BdkError_InvalidNetworkImplCopyWith( - _$BdkError_InvalidNetworkImpl value, - $Res Function(_$BdkError_InvalidNetworkImpl) then) = - __$$BdkError_InvalidNetworkImplCopyWithImpl<$Res>; - @useResult - $Res call({Network requested, Network found}); -} - -/// @nodoc -class __$$BdkError_InvalidNetworkImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidNetworkImpl> - implements _$$BdkError_InvalidNetworkImplCopyWith<$Res> { - __$$BdkError_InvalidNetworkImplCopyWithImpl( - _$BdkError_InvalidNetworkImpl _value, - $Res Function(_$BdkError_InvalidNetworkImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? requested = null, - Object? found = null, - }) { - return _then(_$BdkError_InvalidNetworkImpl( - requested: null == requested - ? _value.requested - : requested // ignore: cast_nullable_to_non_nullable - as Network, - found: null == found - ? _value.found - : found // ignore: cast_nullable_to_non_nullable - as Network, - )); - } -} - -/// @nodoc - -class _$BdkError_InvalidNetworkImpl extends BdkError_InvalidNetwork { - const _$BdkError_InvalidNetworkImpl( - {required this.requested, required this.found}) - : super._(); - - /// requested network, for example what is given as bdk-cli option - @override - final Network requested; - - /// found network, for example the network of the bitcoin node - @override - final Network found; - - @override - String toString() { - return 'BdkError.invalidNetwork(requested: $requested, found: $found)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_InvalidNetworkImpl && - (identical(other.requested, requested) || - other.requested == requested) && - (identical(other.found, found) || other.found == found)); - } - - @override - int get hashCode => Object.hash(runtimeType, requested, found); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_InvalidNetworkImplCopyWith<_$BdkError_InvalidNetworkImpl> - get copyWith => __$$BdkError_InvalidNetworkImplCopyWithImpl< - _$BdkError_InvalidNetworkImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidNetwork(requested, found); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidNetwork?.call(requested, found); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidNetwork != null) { - return invalidNetwork(requested, found); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidNetwork(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidNetwork?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidNetwork != null) { - return invalidNetwork(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidNetwork extends BdkError { - const factory BdkError_InvalidNetwork( - {required final Network requested, - required final Network found}) = _$BdkError_InvalidNetworkImpl; - const BdkError_InvalidNetwork._() : super._(); - - /// requested network, for example what is given as bdk-cli option - Network get requested; - - /// found network, for example the network of the bitcoin node - Network get found; - @JsonKey(ignore: true) - _$$BdkError_InvalidNetworkImplCopyWith<_$BdkError_InvalidNetworkImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_InvalidOutpointImplCopyWith<$Res> { - factory _$$BdkError_InvalidOutpointImplCopyWith( - _$BdkError_InvalidOutpointImpl value, - $Res Function(_$BdkError_InvalidOutpointImpl) then) = - __$$BdkError_InvalidOutpointImplCopyWithImpl<$Res>; - @useResult - $Res call({OutPoint field0}); -} - -/// @nodoc -class __$$BdkError_InvalidOutpointImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidOutpointImpl> - implements _$$BdkError_InvalidOutpointImplCopyWith<$Res> { - __$$BdkError_InvalidOutpointImplCopyWithImpl( - _$BdkError_InvalidOutpointImpl _value, - $Res Function(_$BdkError_InvalidOutpointImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_InvalidOutpointImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as OutPoint, - )); - } -} - -/// @nodoc - -class _$BdkError_InvalidOutpointImpl extends BdkError_InvalidOutpoint { - const _$BdkError_InvalidOutpointImpl(this.field0) : super._(); - - @override - final OutPoint field0; - - @override - String toString() { - return 'BdkError.invalidOutpoint(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_InvalidOutpointImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_InvalidOutpointImplCopyWith<_$BdkError_InvalidOutpointImpl> - get copyWith => __$$BdkError_InvalidOutpointImplCopyWithImpl< - _$BdkError_InvalidOutpointImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidOutpoint(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidOutpoint?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidOutpoint != null) { - return invalidOutpoint(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidOutpoint(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidOutpoint?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidOutpoint != null) { - return invalidOutpoint(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidOutpoint extends BdkError { - const factory BdkError_InvalidOutpoint(final OutPoint field0) = - _$BdkError_InvalidOutpointImpl; - const BdkError_InvalidOutpoint._() : super._(); - - OutPoint get field0; - @JsonKey(ignore: true) - _$$BdkError_InvalidOutpointImplCopyWith<_$BdkError_InvalidOutpointImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_EncodeImplCopyWith<$Res> { - factory _$$BdkError_EncodeImplCopyWith(_$BdkError_EncodeImpl value, - $Res Function(_$BdkError_EncodeImpl) then) = - __$$BdkError_EncodeImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_EncodeImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_EncodeImpl> - implements _$$BdkError_EncodeImplCopyWith<$Res> { - __$$BdkError_EncodeImplCopyWithImpl( - _$BdkError_EncodeImpl _value, $Res Function(_$BdkError_EncodeImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_EncodeImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_EncodeImpl extends BdkError_Encode { - const _$BdkError_EncodeImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.encode(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_EncodeImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_EncodeImplCopyWith<_$BdkError_EncodeImpl> get copyWith => - __$$BdkError_EncodeImplCopyWithImpl<_$BdkError_EncodeImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return encode(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return encode?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (encode != null) { - return encode(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return encode(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return encode?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (encode != null) { - return encode(this); - } - return orElse(); - } -} - -abstract class BdkError_Encode extends BdkError { - const factory BdkError_Encode(final String field0) = _$BdkError_EncodeImpl; - const BdkError_Encode._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_EncodeImplCopyWith<_$BdkError_EncodeImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_MiniscriptImplCopyWith<$Res> { - factory _$$BdkError_MiniscriptImplCopyWith(_$BdkError_MiniscriptImpl value, - $Res Function(_$BdkError_MiniscriptImpl) then) = - __$$BdkError_MiniscriptImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_MiniscriptImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MiniscriptImpl> - implements _$$BdkError_MiniscriptImplCopyWith<$Res> { - __$$BdkError_MiniscriptImplCopyWithImpl(_$BdkError_MiniscriptImpl _value, - $Res Function(_$BdkError_MiniscriptImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_MiniscriptImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_MiniscriptImpl extends BdkError_Miniscript { - const _$BdkError_MiniscriptImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.miniscript(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_MiniscriptImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_MiniscriptImplCopyWith<_$BdkError_MiniscriptImpl> get copyWith => - __$$BdkError_MiniscriptImplCopyWithImpl<_$BdkError_MiniscriptImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return miniscript(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return miniscript?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (miniscript != null) { - return miniscript(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return miniscript(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return miniscript?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (miniscript != null) { - return miniscript(this); - } - return orElse(); - } -} - -abstract class BdkError_Miniscript extends BdkError { - const factory BdkError_Miniscript(final String field0) = - _$BdkError_MiniscriptImpl; - const BdkError_Miniscript._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_MiniscriptImplCopyWith<_$BdkError_MiniscriptImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_MiniscriptPsbtImplCopyWith<$Res> { - factory _$$BdkError_MiniscriptPsbtImplCopyWith( - _$BdkError_MiniscriptPsbtImpl value, - $Res Function(_$BdkError_MiniscriptPsbtImpl) then) = - __$$BdkError_MiniscriptPsbtImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_MiniscriptPsbtImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MiniscriptPsbtImpl> - implements _$$BdkError_MiniscriptPsbtImplCopyWith<$Res> { - __$$BdkError_MiniscriptPsbtImplCopyWithImpl( - _$BdkError_MiniscriptPsbtImpl _value, - $Res Function(_$BdkError_MiniscriptPsbtImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_MiniscriptPsbtImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_MiniscriptPsbtImpl extends BdkError_MiniscriptPsbt { - const _$BdkError_MiniscriptPsbtImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.miniscriptPsbt(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_MiniscriptPsbtImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_MiniscriptPsbtImplCopyWith<_$BdkError_MiniscriptPsbtImpl> - get copyWith => __$$BdkError_MiniscriptPsbtImplCopyWithImpl< - _$BdkError_MiniscriptPsbtImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return miniscriptPsbt(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return miniscriptPsbt?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (miniscriptPsbt != null) { - return miniscriptPsbt(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return miniscriptPsbt(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return miniscriptPsbt?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (miniscriptPsbt != null) { - return miniscriptPsbt(this); - } - return orElse(); - } -} - -abstract class BdkError_MiniscriptPsbt extends BdkError { - const factory BdkError_MiniscriptPsbt(final String field0) = - _$BdkError_MiniscriptPsbtImpl; - const BdkError_MiniscriptPsbt._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_MiniscriptPsbtImplCopyWith<_$BdkError_MiniscriptPsbtImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_Bip32ImplCopyWith<$Res> { - factory _$$BdkError_Bip32ImplCopyWith(_$BdkError_Bip32Impl value, - $Res Function(_$BdkError_Bip32Impl) then) = - __$$BdkError_Bip32ImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_Bip32ImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_Bip32Impl> - implements _$$BdkError_Bip32ImplCopyWith<$Res> { - __$$BdkError_Bip32ImplCopyWithImpl( - _$BdkError_Bip32Impl _value, $Res Function(_$BdkError_Bip32Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_Bip32Impl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_Bip32Impl extends BdkError_Bip32 { - const _$BdkError_Bip32Impl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.bip32(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_Bip32Impl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_Bip32ImplCopyWith<_$BdkError_Bip32Impl> get copyWith => - __$$BdkError_Bip32ImplCopyWithImpl<_$BdkError_Bip32Impl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return bip32(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return bip32?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (bip32 != null) { - return bip32(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return bip32(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return bip32?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (bip32 != null) { - return bip32(this); - } - return orElse(); - } -} - -abstract class BdkError_Bip32 extends BdkError { - const factory BdkError_Bip32(final String field0) = _$BdkError_Bip32Impl; - const BdkError_Bip32._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_Bip32ImplCopyWith<_$BdkError_Bip32Impl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_Bip39ImplCopyWith<$Res> { - factory _$$BdkError_Bip39ImplCopyWith(_$BdkError_Bip39Impl value, - $Res Function(_$BdkError_Bip39Impl) then) = - __$$BdkError_Bip39ImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_Bip39ImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_Bip39Impl> - implements _$$BdkError_Bip39ImplCopyWith<$Res> { - __$$BdkError_Bip39ImplCopyWithImpl( - _$BdkError_Bip39Impl _value, $Res Function(_$BdkError_Bip39Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_Bip39Impl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_Bip39Impl extends BdkError_Bip39 { - const _$BdkError_Bip39Impl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.bip39(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_Bip39Impl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_Bip39ImplCopyWith<_$BdkError_Bip39Impl> get copyWith => - __$$BdkError_Bip39ImplCopyWithImpl<_$BdkError_Bip39Impl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return bip39(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return bip39?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (bip39 != null) { - return bip39(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return bip39(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return bip39?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (bip39 != null) { - return bip39(this); - } - return orElse(); - } -} - -abstract class BdkError_Bip39 extends BdkError { - const factory BdkError_Bip39(final String field0) = _$BdkError_Bip39Impl; - const BdkError_Bip39._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_Bip39ImplCopyWith<_$BdkError_Bip39Impl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_Secp256k1ImplCopyWith<$Res> { - factory _$$BdkError_Secp256k1ImplCopyWith(_$BdkError_Secp256k1Impl value, - $Res Function(_$BdkError_Secp256k1Impl) then) = - __$$BdkError_Secp256k1ImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_Secp256k1ImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_Secp256k1Impl> - implements _$$BdkError_Secp256k1ImplCopyWith<$Res> { - __$$BdkError_Secp256k1ImplCopyWithImpl(_$BdkError_Secp256k1Impl _value, - $Res Function(_$BdkError_Secp256k1Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_Secp256k1Impl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_Secp256k1Impl extends BdkError_Secp256k1 { - const _$BdkError_Secp256k1Impl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.secp256K1(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_Secp256k1Impl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_Secp256k1ImplCopyWith<_$BdkError_Secp256k1Impl> get copyWith => - __$$BdkError_Secp256k1ImplCopyWithImpl<_$BdkError_Secp256k1Impl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return secp256K1(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return secp256K1?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (secp256K1 != null) { - return secp256K1(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return secp256K1(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return secp256K1?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (secp256K1 != null) { - return secp256K1(this); - } - return orElse(); - } -} - -abstract class BdkError_Secp256k1 extends BdkError { - const factory BdkError_Secp256k1(final String field0) = - _$BdkError_Secp256k1Impl; - const BdkError_Secp256k1._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_Secp256k1ImplCopyWith<_$BdkError_Secp256k1Impl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_JsonImplCopyWith<$Res> { - factory _$$BdkError_JsonImplCopyWith( - _$BdkError_JsonImpl value, $Res Function(_$BdkError_JsonImpl) then) = - __$$BdkError_JsonImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_JsonImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_JsonImpl> - implements _$$BdkError_JsonImplCopyWith<$Res> { - __$$BdkError_JsonImplCopyWithImpl( - _$BdkError_JsonImpl _value, $Res Function(_$BdkError_JsonImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_JsonImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_JsonImpl extends BdkError_Json { - const _$BdkError_JsonImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.json(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_JsonImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_JsonImplCopyWith<_$BdkError_JsonImpl> get copyWith => - __$$BdkError_JsonImplCopyWithImpl<_$BdkError_JsonImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return json(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return json?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (json != null) { - return json(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return json(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return json?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (json != null) { - return json(this); - } - return orElse(); - } -} - -abstract class BdkError_Json extends BdkError { - const factory BdkError_Json(final String field0) = _$BdkError_JsonImpl; - const BdkError_Json._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_JsonImplCopyWith<_$BdkError_JsonImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_PsbtImplCopyWith<$Res> { - factory _$$BdkError_PsbtImplCopyWith( - _$BdkError_PsbtImpl value, $Res Function(_$BdkError_PsbtImpl) then) = - __$$BdkError_PsbtImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_PsbtImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_PsbtImpl> - implements _$$BdkError_PsbtImplCopyWith<$Res> { - __$$BdkError_PsbtImplCopyWithImpl( - _$BdkError_PsbtImpl _value, $Res Function(_$BdkError_PsbtImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_PsbtImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_PsbtImpl extends BdkError_Psbt { - const _$BdkError_PsbtImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.psbt(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_PsbtImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_PsbtImplCopyWith<_$BdkError_PsbtImpl> get copyWith => - __$$BdkError_PsbtImplCopyWithImpl<_$BdkError_PsbtImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return psbt(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return psbt?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (psbt != null) { - return psbt(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return psbt(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return psbt?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (psbt != null) { - return psbt(this); - } - return orElse(); - } -} - -abstract class BdkError_Psbt extends BdkError { - const factory BdkError_Psbt(final String field0) = _$BdkError_PsbtImpl; - const BdkError_Psbt._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_PsbtImplCopyWith<_$BdkError_PsbtImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_PsbtParseImplCopyWith<$Res> { - factory _$$BdkError_PsbtParseImplCopyWith(_$BdkError_PsbtParseImpl value, - $Res Function(_$BdkError_PsbtParseImpl) then) = - __$$BdkError_PsbtParseImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_PsbtParseImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_PsbtParseImpl> - implements _$$BdkError_PsbtParseImplCopyWith<$Res> { - __$$BdkError_PsbtParseImplCopyWithImpl(_$BdkError_PsbtParseImpl _value, - $Res Function(_$BdkError_PsbtParseImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_PsbtParseImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_PsbtParseImpl extends BdkError_PsbtParse { - const _$BdkError_PsbtParseImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.psbtParse(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_PsbtParseImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_PsbtParseImplCopyWith<_$BdkError_PsbtParseImpl> get copyWith => - __$$BdkError_PsbtParseImplCopyWithImpl<_$BdkError_PsbtParseImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return psbtParse(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return psbtParse?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (psbtParse != null) { - return psbtParse(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return psbtParse(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return psbtParse?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (psbtParse != null) { - return psbtParse(this); - } - return orElse(); - } -} - -abstract class BdkError_PsbtParse extends BdkError { - const factory BdkError_PsbtParse(final String field0) = - _$BdkError_PsbtParseImpl; - const BdkError_PsbtParse._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_PsbtParseImplCopyWith<_$BdkError_PsbtParseImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_MissingCachedScriptsImplCopyWith<$Res> { - factory _$$BdkError_MissingCachedScriptsImplCopyWith( - _$BdkError_MissingCachedScriptsImpl value, - $Res Function(_$BdkError_MissingCachedScriptsImpl) then) = - __$$BdkError_MissingCachedScriptsImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt field0, BigInt field1}); -} - -/// @nodoc -class __$$BdkError_MissingCachedScriptsImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MissingCachedScriptsImpl> - implements _$$BdkError_MissingCachedScriptsImplCopyWith<$Res> { - __$$BdkError_MissingCachedScriptsImplCopyWithImpl( - _$BdkError_MissingCachedScriptsImpl _value, - $Res Function(_$BdkError_MissingCachedScriptsImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - Object? field1 = null, - }) { - return _then(_$BdkError_MissingCachedScriptsImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - null == field1 - ? _value.field1 - : field1 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$BdkError_MissingCachedScriptsImpl - extends BdkError_MissingCachedScripts { - const _$BdkError_MissingCachedScriptsImpl(this.field0, this.field1) - : super._(); - - @override - final BigInt field0; - @override - final BigInt field1; - - @override - String toString() { - return 'BdkError.missingCachedScripts(field0: $field0, field1: $field1)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_MissingCachedScriptsImpl && - (identical(other.field0, field0) || other.field0 == field0) && - (identical(other.field1, field1) || other.field1 == field1)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0, field1); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_MissingCachedScriptsImplCopyWith< - _$BdkError_MissingCachedScriptsImpl> - get copyWith => __$$BdkError_MissingCachedScriptsImplCopyWithImpl< - _$BdkError_MissingCachedScriptsImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return missingCachedScripts(field0, field1); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return missingCachedScripts?.call(field0, field1); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (missingCachedScripts != null) { - return missingCachedScripts(field0, field1); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return missingCachedScripts(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return missingCachedScripts?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (missingCachedScripts != null) { - return missingCachedScripts(this); - } - return orElse(); - } -} - -abstract class BdkError_MissingCachedScripts extends BdkError { - const factory BdkError_MissingCachedScripts( - final BigInt field0, final BigInt field1) = - _$BdkError_MissingCachedScriptsImpl; - const BdkError_MissingCachedScripts._() : super._(); - - BigInt get field0; - BigInt get field1; - @JsonKey(ignore: true) - _$$BdkError_MissingCachedScriptsImplCopyWith< - _$BdkError_MissingCachedScriptsImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_ElectrumImplCopyWith<$Res> { - factory _$$BdkError_ElectrumImplCopyWith(_$BdkError_ElectrumImpl value, - $Res Function(_$BdkError_ElectrumImpl) then) = - __$$BdkError_ElectrumImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_ElectrumImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_ElectrumImpl> - implements _$$BdkError_ElectrumImplCopyWith<$Res> { - __$$BdkError_ElectrumImplCopyWithImpl(_$BdkError_ElectrumImpl _value, - $Res Function(_$BdkError_ElectrumImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_ElectrumImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_ElectrumImpl extends BdkError_Electrum { - const _$BdkError_ElectrumImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.electrum(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_ElectrumImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_ElectrumImplCopyWith<_$BdkError_ElectrumImpl> get copyWith => - __$$BdkError_ElectrumImplCopyWithImpl<_$BdkError_ElectrumImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return electrum(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return electrum?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (electrum != null) { - return electrum(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return electrum(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return electrum?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (electrum != null) { - return electrum(this); - } - return orElse(); - } -} - -abstract class BdkError_Electrum extends BdkError { - const factory BdkError_Electrum(final String field0) = - _$BdkError_ElectrumImpl; - const BdkError_Electrum._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_ElectrumImplCopyWith<_$BdkError_ElectrumImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_EsploraImplCopyWith<$Res> { - factory _$$BdkError_EsploraImplCopyWith(_$BdkError_EsploraImpl value, - $Res Function(_$BdkError_EsploraImpl) then) = - __$$BdkError_EsploraImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_EsploraImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_EsploraImpl> - implements _$$BdkError_EsploraImplCopyWith<$Res> { - __$$BdkError_EsploraImplCopyWithImpl(_$BdkError_EsploraImpl _value, - $Res Function(_$BdkError_EsploraImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_EsploraImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_EsploraImpl extends BdkError_Esplora { - const _$BdkError_EsploraImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.esplora(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_EsploraImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_EsploraImplCopyWith<_$BdkError_EsploraImpl> get copyWith => - __$$BdkError_EsploraImplCopyWithImpl<_$BdkError_EsploraImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return esplora(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return esplora?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (esplora != null) { - return esplora(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return esplora(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return esplora?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (esplora != null) { - return esplora(this); - } - return orElse(); - } -} - -abstract class BdkError_Esplora extends BdkError { - const factory BdkError_Esplora(final String field0) = _$BdkError_EsploraImpl; - const BdkError_Esplora._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_EsploraImplCopyWith<_$BdkError_EsploraImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_SledImplCopyWith<$Res> { - factory _$$BdkError_SledImplCopyWith( - _$BdkError_SledImpl value, $Res Function(_$BdkError_SledImpl) then) = - __$$BdkError_SledImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_SledImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_SledImpl> - implements _$$BdkError_SledImplCopyWith<$Res> { - __$$BdkError_SledImplCopyWithImpl( - _$BdkError_SledImpl _value, $Res Function(_$BdkError_SledImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_SledImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_SledImpl extends BdkError_Sled { - const _$BdkError_SledImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.sled(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_SledImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_SledImplCopyWith<_$BdkError_SledImpl> get copyWith => - __$$BdkError_SledImplCopyWithImpl<_$BdkError_SledImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return sled(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return sled?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (sled != null) { - return sled(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return sled(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return sled?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (sled != null) { - return sled(this); - } - return orElse(); - } -} - -abstract class BdkError_Sled extends BdkError { - const factory BdkError_Sled(final String field0) = _$BdkError_SledImpl; - const BdkError_Sled._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_SledImplCopyWith<_$BdkError_SledImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_RpcImplCopyWith<$Res> { - factory _$$BdkError_RpcImplCopyWith( - _$BdkError_RpcImpl value, $Res Function(_$BdkError_RpcImpl) then) = - __$$BdkError_RpcImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_RpcImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_RpcImpl> - implements _$$BdkError_RpcImplCopyWith<$Res> { - __$$BdkError_RpcImplCopyWithImpl( - _$BdkError_RpcImpl _value, $Res Function(_$BdkError_RpcImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_RpcImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_RpcImpl extends BdkError_Rpc { - const _$BdkError_RpcImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.rpc(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_RpcImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_RpcImplCopyWith<_$BdkError_RpcImpl> get copyWith => - __$$BdkError_RpcImplCopyWithImpl<_$BdkError_RpcImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return rpc(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return rpc?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (rpc != null) { - return rpc(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return rpc(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return rpc?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (rpc != null) { - return rpc(this); - } - return orElse(); - } -} - -abstract class BdkError_Rpc extends BdkError { - const factory BdkError_Rpc(final String field0) = _$BdkError_RpcImpl; - const BdkError_Rpc._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_RpcImplCopyWith<_$BdkError_RpcImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_RusqliteImplCopyWith<$Res> { - factory _$$BdkError_RusqliteImplCopyWith(_$BdkError_RusqliteImpl value, - $Res Function(_$BdkError_RusqliteImpl) then) = - __$$BdkError_RusqliteImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_RusqliteImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_RusqliteImpl> - implements _$$BdkError_RusqliteImplCopyWith<$Res> { - __$$BdkError_RusqliteImplCopyWithImpl(_$BdkError_RusqliteImpl _value, - $Res Function(_$BdkError_RusqliteImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_RusqliteImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_RusqliteImpl extends BdkError_Rusqlite { - const _$BdkError_RusqliteImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.rusqlite(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_RusqliteImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_RusqliteImplCopyWith<_$BdkError_RusqliteImpl> get copyWith => - __$$BdkError_RusqliteImplCopyWithImpl<_$BdkError_RusqliteImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return rusqlite(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return rusqlite?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (rusqlite != null) { - return rusqlite(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return rusqlite(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return rusqlite?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (rusqlite != null) { - return rusqlite(this); - } - return orElse(); - } -} - -abstract class BdkError_Rusqlite extends BdkError { - const factory BdkError_Rusqlite(final String field0) = - _$BdkError_RusqliteImpl; - const BdkError_Rusqlite._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_RusqliteImplCopyWith<_$BdkError_RusqliteImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_InvalidInputImplCopyWith<$Res> { - factory _$$BdkError_InvalidInputImplCopyWith( - _$BdkError_InvalidInputImpl value, - $Res Function(_$BdkError_InvalidInputImpl) then) = - __$$BdkError_InvalidInputImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_InvalidInputImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidInputImpl> - implements _$$BdkError_InvalidInputImplCopyWith<$Res> { - __$$BdkError_InvalidInputImplCopyWithImpl(_$BdkError_InvalidInputImpl _value, - $Res Function(_$BdkError_InvalidInputImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_InvalidInputImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_InvalidInputImpl extends BdkError_InvalidInput { - const _$BdkError_InvalidInputImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.invalidInput(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_InvalidInputImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_InvalidInputImplCopyWith<_$BdkError_InvalidInputImpl> - get copyWith => __$$BdkError_InvalidInputImplCopyWithImpl< - _$BdkError_InvalidInputImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidInput(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidInput?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidInput != null) { - return invalidInput(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidInput(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidInput?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidInput != null) { - return invalidInput(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidInput extends BdkError { - const factory BdkError_InvalidInput(final String field0) = - _$BdkError_InvalidInputImpl; - const BdkError_InvalidInput._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_InvalidInputImplCopyWith<_$BdkError_InvalidInputImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_InvalidLockTimeImplCopyWith<$Res> { - factory _$$BdkError_InvalidLockTimeImplCopyWith( - _$BdkError_InvalidLockTimeImpl value, - $Res Function(_$BdkError_InvalidLockTimeImpl) then) = - __$$BdkError_InvalidLockTimeImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_InvalidLockTimeImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidLockTimeImpl> - implements _$$BdkError_InvalidLockTimeImplCopyWith<$Res> { - __$$BdkError_InvalidLockTimeImplCopyWithImpl( - _$BdkError_InvalidLockTimeImpl _value, - $Res Function(_$BdkError_InvalidLockTimeImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_InvalidLockTimeImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_InvalidLockTimeImpl extends BdkError_InvalidLockTime { - const _$BdkError_InvalidLockTimeImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.invalidLockTime(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_InvalidLockTimeImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_InvalidLockTimeImplCopyWith<_$BdkError_InvalidLockTimeImpl> - get copyWith => __$$BdkError_InvalidLockTimeImplCopyWithImpl< - _$BdkError_InvalidLockTimeImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidLockTime(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidLockTime?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidLockTime != null) { - return invalidLockTime(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidLockTime(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidLockTime?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidLockTime != null) { - return invalidLockTime(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidLockTime extends BdkError { - const factory BdkError_InvalidLockTime(final String field0) = - _$BdkError_InvalidLockTimeImpl; - const BdkError_InvalidLockTime._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_InvalidLockTimeImplCopyWith<_$BdkError_InvalidLockTimeImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BdkError_InvalidTransactionImplCopyWith<$Res> { - factory _$$BdkError_InvalidTransactionImplCopyWith( - _$BdkError_InvalidTransactionImpl value, - $Res Function(_$BdkError_InvalidTransactionImpl) then) = - __$$BdkError_InvalidTransactionImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$BdkError_InvalidTransactionImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidTransactionImpl> - implements _$$BdkError_InvalidTransactionImplCopyWith<$Res> { - __$$BdkError_InvalidTransactionImplCopyWithImpl( - _$BdkError_InvalidTransactionImpl _value, - $Res Function(_$BdkError_InvalidTransactionImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$BdkError_InvalidTransactionImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_InvalidTransactionImpl extends BdkError_InvalidTransaction { - const _$BdkError_InvalidTransactionImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.invalidTransaction(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_InvalidTransactionImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_InvalidTransactionImplCopyWith<_$BdkError_InvalidTransactionImpl> - get copyWith => __$$BdkError_InvalidTransactionImplCopyWithImpl< - _$BdkError_InvalidTransactionImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidTransaction(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidTransaction?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidTransaction != null) { - return invalidTransaction(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidTransaction(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidTransaction?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidTransaction != null) { - return invalidTransaction(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidTransaction extends BdkError { - const factory BdkError_InvalidTransaction(final String field0) = - _$BdkError_InvalidTransactionImpl; - const BdkError_InvalidTransaction._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_InvalidTransactionImplCopyWith<_$BdkError_InvalidTransactionImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$ConsensusError { - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(ConsensusError_Io value) io, - required TResult Function(ConsensusError_OversizedVectorAllocation value) - oversizedVectorAllocation, - required TResult Function(ConsensusError_InvalidChecksum value) - invalidChecksum, - required TResult Function(ConsensusError_NonMinimalVarInt value) - nonMinimalVarInt, - required TResult Function(ConsensusError_ParseFailed value) parseFailed, - required TResult Function(ConsensusError_UnsupportedSegwitFlag value) - unsupportedSegwitFlag, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ConsensusError_Io value)? io, - TResult? Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult? Function(ConsensusError_ParseFailed value)? parseFailed, - TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ConsensusError_Io value)? io, - TResult Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult Function(ConsensusError_ParseFailed value)? parseFailed, - TResult Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ConsensusErrorCopyWith<$Res> { - factory $ConsensusErrorCopyWith( - ConsensusError value, $Res Function(ConsensusError) then) = - _$ConsensusErrorCopyWithImpl<$Res, ConsensusError>; -} - -/// @nodoc -class _$ConsensusErrorCopyWithImpl<$Res, $Val extends ConsensusError> - implements $ConsensusErrorCopyWith<$Res> { - _$ConsensusErrorCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$ConsensusError_IoImplCopyWith<$Res> { - factory _$$ConsensusError_IoImplCopyWith(_$ConsensusError_IoImpl value, - $Res Function(_$ConsensusError_IoImpl) then) = - __$$ConsensusError_IoImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$ConsensusError_IoImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, _$ConsensusError_IoImpl> - implements _$$ConsensusError_IoImplCopyWith<$Res> { - __$$ConsensusError_IoImplCopyWithImpl(_$ConsensusError_IoImpl _value, - $Res Function(_$ConsensusError_IoImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$ConsensusError_IoImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$ConsensusError_IoImpl extends ConsensusError_Io { - const _$ConsensusError_IoImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'ConsensusError.io(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ConsensusError_IoImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$ConsensusError_IoImplCopyWith<_$ConsensusError_IoImpl> get copyWith => - __$$ConsensusError_IoImplCopyWithImpl<_$ConsensusError_IoImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, - }) { - return io(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, - }) { - return io?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (io != null) { - return io(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(ConsensusError_Io value) io, - required TResult Function(ConsensusError_OversizedVectorAllocation value) - oversizedVectorAllocation, - required TResult Function(ConsensusError_InvalidChecksum value) - invalidChecksum, - required TResult Function(ConsensusError_NonMinimalVarInt value) - nonMinimalVarInt, - required TResult Function(ConsensusError_ParseFailed value) parseFailed, - required TResult Function(ConsensusError_UnsupportedSegwitFlag value) - unsupportedSegwitFlag, - }) { - return io(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ConsensusError_Io value)? io, - TResult? Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult? Function(ConsensusError_ParseFailed value)? parseFailed, - TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - }) { - return io?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ConsensusError_Io value)? io, - TResult Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult Function(ConsensusError_ParseFailed value)? parseFailed, - TResult Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (io != null) { - return io(this); - } - return orElse(); - } -} - -abstract class ConsensusError_Io extends ConsensusError { - const factory ConsensusError_Io(final String field0) = - _$ConsensusError_IoImpl; - const ConsensusError_Io._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$ConsensusError_IoImplCopyWith<_$ConsensusError_IoImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$ConsensusError_OversizedVectorAllocationImplCopyWith<$Res> { - factory _$$ConsensusError_OversizedVectorAllocationImplCopyWith( - _$ConsensusError_OversizedVectorAllocationImpl value, - $Res Function(_$ConsensusError_OversizedVectorAllocationImpl) then) = - __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt requested, BigInt max}); -} - -/// @nodoc -class __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, - _$ConsensusError_OversizedVectorAllocationImpl> - implements _$$ConsensusError_OversizedVectorAllocationImplCopyWith<$Res> { - __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl( - _$ConsensusError_OversizedVectorAllocationImpl _value, - $Res Function(_$ConsensusError_OversizedVectorAllocationImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? requested = null, - Object? max = null, - }) { - return _then(_$ConsensusError_OversizedVectorAllocationImpl( - requested: null == requested - ? _value.requested - : requested // ignore: cast_nullable_to_non_nullable - as BigInt, - max: null == max - ? _value.max - : max // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$ConsensusError_OversizedVectorAllocationImpl - extends ConsensusError_OversizedVectorAllocation { - const _$ConsensusError_OversizedVectorAllocationImpl( - {required this.requested, required this.max}) - : super._(); - - @override - final BigInt requested; - @override - final BigInt max; - - @override - String toString() { - return 'ConsensusError.oversizedVectorAllocation(requested: $requested, max: $max)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ConsensusError_OversizedVectorAllocationImpl && - (identical(other.requested, requested) || - other.requested == requested) && - (identical(other.max, max) || other.max == max)); - } - - @override - int get hashCode => Object.hash(runtimeType, requested, max); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$ConsensusError_OversizedVectorAllocationImplCopyWith< - _$ConsensusError_OversizedVectorAllocationImpl> - get copyWith => - __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl< - _$ConsensusError_OversizedVectorAllocationImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, - }) { - return oversizedVectorAllocation(requested, max); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, - }) { - return oversizedVectorAllocation?.call(requested, max); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (oversizedVectorAllocation != null) { - return oversizedVectorAllocation(requested, max); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(ConsensusError_Io value) io, - required TResult Function(ConsensusError_OversizedVectorAllocation value) - oversizedVectorAllocation, - required TResult Function(ConsensusError_InvalidChecksum value) - invalidChecksum, - required TResult Function(ConsensusError_NonMinimalVarInt value) - nonMinimalVarInt, - required TResult Function(ConsensusError_ParseFailed value) parseFailed, - required TResult Function(ConsensusError_UnsupportedSegwitFlag value) - unsupportedSegwitFlag, - }) { - return oversizedVectorAllocation(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ConsensusError_Io value)? io, - TResult? Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult? Function(ConsensusError_ParseFailed value)? parseFailed, - TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - }) { - return oversizedVectorAllocation?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ConsensusError_Io value)? io, - TResult Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult Function(ConsensusError_ParseFailed value)? parseFailed, - TResult Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (oversizedVectorAllocation != null) { - return oversizedVectorAllocation(this); - } - return orElse(); - } -} - -abstract class ConsensusError_OversizedVectorAllocation extends ConsensusError { - const factory ConsensusError_OversizedVectorAllocation( - {required final BigInt requested, required final BigInt max}) = - _$ConsensusError_OversizedVectorAllocationImpl; - const ConsensusError_OversizedVectorAllocation._() : super._(); - - BigInt get requested; - BigInt get max; - @JsonKey(ignore: true) - _$$ConsensusError_OversizedVectorAllocationImplCopyWith< - _$ConsensusError_OversizedVectorAllocationImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$ConsensusError_InvalidChecksumImplCopyWith<$Res> { - factory _$$ConsensusError_InvalidChecksumImplCopyWith( - _$ConsensusError_InvalidChecksumImpl value, - $Res Function(_$ConsensusError_InvalidChecksumImpl) then) = - __$$ConsensusError_InvalidChecksumImplCopyWithImpl<$Res>; - @useResult - $Res call({U8Array4 expected, U8Array4 actual}); -} - -/// @nodoc -class __$$ConsensusError_InvalidChecksumImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, - _$ConsensusError_InvalidChecksumImpl> - implements _$$ConsensusError_InvalidChecksumImplCopyWith<$Res> { - __$$ConsensusError_InvalidChecksumImplCopyWithImpl( - _$ConsensusError_InvalidChecksumImpl _value, - $Res Function(_$ConsensusError_InvalidChecksumImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? expected = null, - Object? actual = null, - }) { - return _then(_$ConsensusError_InvalidChecksumImpl( - expected: null == expected - ? _value.expected - : expected // ignore: cast_nullable_to_non_nullable - as U8Array4, - actual: null == actual - ? _value.actual - : actual // ignore: cast_nullable_to_non_nullable - as U8Array4, - )); - } -} - -/// @nodoc - -class _$ConsensusError_InvalidChecksumImpl - extends ConsensusError_InvalidChecksum { - const _$ConsensusError_InvalidChecksumImpl( - {required this.expected, required this.actual}) - : super._(); - - @override - final U8Array4 expected; - @override - final U8Array4 actual; - - @override - String toString() { - return 'ConsensusError.invalidChecksum(expected: $expected, actual: $actual)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ConsensusError_InvalidChecksumImpl && - const DeepCollectionEquality().equals(other.expected, expected) && - const DeepCollectionEquality().equals(other.actual, actual)); - } - - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(expected), - const DeepCollectionEquality().hash(actual)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$ConsensusError_InvalidChecksumImplCopyWith< - _$ConsensusError_InvalidChecksumImpl> - get copyWith => __$$ConsensusError_InvalidChecksumImplCopyWithImpl< - _$ConsensusError_InvalidChecksumImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, - }) { - return invalidChecksum(expected, actual); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, - }) { - return invalidChecksum?.call(expected, actual); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (invalidChecksum != null) { - return invalidChecksum(expected, actual); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(ConsensusError_Io value) io, - required TResult Function(ConsensusError_OversizedVectorAllocation value) - oversizedVectorAllocation, - required TResult Function(ConsensusError_InvalidChecksum value) - invalidChecksum, - required TResult Function(ConsensusError_NonMinimalVarInt value) - nonMinimalVarInt, - required TResult Function(ConsensusError_ParseFailed value) parseFailed, - required TResult Function(ConsensusError_UnsupportedSegwitFlag value) - unsupportedSegwitFlag, - }) { - return invalidChecksum(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ConsensusError_Io value)? io, - TResult? Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult? Function(ConsensusError_ParseFailed value)? parseFailed, - TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - }) { - return invalidChecksum?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ConsensusError_Io value)? io, - TResult Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult Function(ConsensusError_ParseFailed value)? parseFailed, - TResult Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (invalidChecksum != null) { - return invalidChecksum(this); - } - return orElse(); - } -} - -abstract class ConsensusError_InvalidChecksum extends ConsensusError { - const factory ConsensusError_InvalidChecksum( - {required final U8Array4 expected, - required final U8Array4 actual}) = _$ConsensusError_InvalidChecksumImpl; - const ConsensusError_InvalidChecksum._() : super._(); - - U8Array4 get expected; - U8Array4 get actual; - @JsonKey(ignore: true) - _$$ConsensusError_InvalidChecksumImplCopyWith< - _$ConsensusError_InvalidChecksumImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$ConsensusError_NonMinimalVarIntImplCopyWith<$Res> { - factory _$$ConsensusError_NonMinimalVarIntImplCopyWith( - _$ConsensusError_NonMinimalVarIntImpl value, - $Res Function(_$ConsensusError_NonMinimalVarIntImpl) then) = - __$$ConsensusError_NonMinimalVarIntImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$ConsensusError_NonMinimalVarIntImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, - _$ConsensusError_NonMinimalVarIntImpl> - implements _$$ConsensusError_NonMinimalVarIntImplCopyWith<$Res> { - __$$ConsensusError_NonMinimalVarIntImplCopyWithImpl( - _$ConsensusError_NonMinimalVarIntImpl _value, - $Res Function(_$ConsensusError_NonMinimalVarIntImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$ConsensusError_NonMinimalVarIntImpl - extends ConsensusError_NonMinimalVarInt { - const _$ConsensusError_NonMinimalVarIntImpl() : super._(); - - @override - String toString() { - return 'ConsensusError.nonMinimalVarInt()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ConsensusError_NonMinimalVarIntImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, - }) { - return nonMinimalVarInt(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, - }) { - return nonMinimalVarInt?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (nonMinimalVarInt != null) { - return nonMinimalVarInt(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(ConsensusError_Io value) io, - required TResult Function(ConsensusError_OversizedVectorAllocation value) - oversizedVectorAllocation, - required TResult Function(ConsensusError_InvalidChecksum value) - invalidChecksum, - required TResult Function(ConsensusError_NonMinimalVarInt value) - nonMinimalVarInt, - required TResult Function(ConsensusError_ParseFailed value) parseFailed, - required TResult Function(ConsensusError_UnsupportedSegwitFlag value) - unsupportedSegwitFlag, - }) { - return nonMinimalVarInt(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ConsensusError_Io value)? io, - TResult? Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult? Function(ConsensusError_ParseFailed value)? parseFailed, - TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - }) { - return nonMinimalVarInt?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ConsensusError_Io value)? io, - TResult Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult Function(ConsensusError_ParseFailed value)? parseFailed, - TResult Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (nonMinimalVarInt != null) { - return nonMinimalVarInt(this); - } - return orElse(); - } -} - -abstract class ConsensusError_NonMinimalVarInt extends ConsensusError { - const factory ConsensusError_NonMinimalVarInt() = - _$ConsensusError_NonMinimalVarIntImpl; - const ConsensusError_NonMinimalVarInt._() : super._(); -} - -/// @nodoc -abstract class _$$ConsensusError_ParseFailedImplCopyWith<$Res> { - factory _$$ConsensusError_ParseFailedImplCopyWith( - _$ConsensusError_ParseFailedImpl value, - $Res Function(_$ConsensusError_ParseFailedImpl) then) = - __$$ConsensusError_ParseFailedImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$ConsensusError_ParseFailedImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, _$ConsensusError_ParseFailedImpl> - implements _$$ConsensusError_ParseFailedImplCopyWith<$Res> { - __$$ConsensusError_ParseFailedImplCopyWithImpl( - _$ConsensusError_ParseFailedImpl _value, - $Res Function(_$ConsensusError_ParseFailedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$ConsensusError_ParseFailedImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$ConsensusError_ParseFailedImpl extends ConsensusError_ParseFailed { - const _$ConsensusError_ParseFailedImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'ConsensusError.parseFailed(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ConsensusError_ParseFailedImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$ConsensusError_ParseFailedImplCopyWith<_$ConsensusError_ParseFailedImpl> - get copyWith => __$$ConsensusError_ParseFailedImplCopyWithImpl< - _$ConsensusError_ParseFailedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, - }) { - return parseFailed(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, - }) { - return parseFailed?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (parseFailed != null) { - return parseFailed(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(ConsensusError_Io value) io, - required TResult Function(ConsensusError_OversizedVectorAllocation value) - oversizedVectorAllocation, - required TResult Function(ConsensusError_InvalidChecksum value) - invalidChecksum, - required TResult Function(ConsensusError_NonMinimalVarInt value) - nonMinimalVarInt, - required TResult Function(ConsensusError_ParseFailed value) parseFailed, - required TResult Function(ConsensusError_UnsupportedSegwitFlag value) - unsupportedSegwitFlag, - }) { - return parseFailed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ConsensusError_Io value)? io, - TResult? Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult? Function(ConsensusError_ParseFailed value)? parseFailed, - TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - }) { - return parseFailed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ConsensusError_Io value)? io, - TResult Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult Function(ConsensusError_ParseFailed value)? parseFailed, - TResult Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (parseFailed != null) { - return parseFailed(this); - } - return orElse(); - } -} - -abstract class ConsensusError_ParseFailed extends ConsensusError { - const factory ConsensusError_ParseFailed(final String field0) = - _$ConsensusError_ParseFailedImpl; - const ConsensusError_ParseFailed._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$ConsensusError_ParseFailedImplCopyWith<_$ConsensusError_ParseFailedImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith<$Res> { - factory _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith( - _$ConsensusError_UnsupportedSegwitFlagImpl value, - $Res Function(_$ConsensusError_UnsupportedSegwitFlagImpl) then) = - __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl<$Res>; - @useResult - $Res call({int field0}); -} - -/// @nodoc -class __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, - _$ConsensusError_UnsupportedSegwitFlagImpl> - implements _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith<$Res> { - __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl( - _$ConsensusError_UnsupportedSegwitFlagImpl _value, - $Res Function(_$ConsensusError_UnsupportedSegwitFlagImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$ConsensusError_UnsupportedSegwitFlagImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$ConsensusError_UnsupportedSegwitFlagImpl - extends ConsensusError_UnsupportedSegwitFlag { - const _$ConsensusError_UnsupportedSegwitFlagImpl(this.field0) : super._(); - - @override - final int field0; - - @override - String toString() { - return 'ConsensusError.unsupportedSegwitFlag(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ConsensusError_UnsupportedSegwitFlagImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith< - _$ConsensusError_UnsupportedSegwitFlagImpl> - get copyWith => __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl< - _$ConsensusError_UnsupportedSegwitFlagImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, - }) { - return unsupportedSegwitFlag(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, - }) { - return unsupportedSegwitFlag?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (unsupportedSegwitFlag != null) { - return unsupportedSegwitFlag(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(ConsensusError_Io value) io, - required TResult Function(ConsensusError_OversizedVectorAllocation value) - oversizedVectorAllocation, - required TResult Function(ConsensusError_InvalidChecksum value) - invalidChecksum, - required TResult Function(ConsensusError_NonMinimalVarInt value) - nonMinimalVarInt, - required TResult Function(ConsensusError_ParseFailed value) parseFailed, - required TResult Function(ConsensusError_UnsupportedSegwitFlag value) - unsupportedSegwitFlag, - }) { - return unsupportedSegwitFlag(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ConsensusError_Io value)? io, - TResult? Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult? Function(ConsensusError_ParseFailed value)? parseFailed, - TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - }) { - return unsupportedSegwitFlag?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ConsensusError_Io value)? io, - TResult Function(ConsensusError_OversizedVectorAllocation value)? - oversizedVectorAllocation, - TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, - TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, - TResult Function(ConsensusError_ParseFailed value)? parseFailed, - TResult Function(ConsensusError_UnsupportedSegwitFlag value)? - unsupportedSegwitFlag, - required TResult orElse(), - }) { - if (unsupportedSegwitFlag != null) { - return unsupportedSegwitFlag(this); - } - return orElse(); - } -} - -abstract class ConsensusError_UnsupportedSegwitFlag extends ConsensusError { - const factory ConsensusError_UnsupportedSegwitFlag(final int field0) = - _$ConsensusError_UnsupportedSegwitFlagImpl; - const ConsensusError_UnsupportedSegwitFlag._() : super._(); - - int get field0; - @JsonKey(ignore: true) - _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith< - _$ConsensusError_UnsupportedSegwitFlagImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$DescriptorError { - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DescriptorErrorCopyWith<$Res> { - factory $DescriptorErrorCopyWith( - DescriptorError value, $Res Function(DescriptorError) then) = - _$DescriptorErrorCopyWithImpl<$Res, DescriptorError>; -} - -/// @nodoc -class _$DescriptorErrorCopyWithImpl<$Res, $Val extends DescriptorError> - implements $DescriptorErrorCopyWith<$Res> { - _$DescriptorErrorCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$DescriptorError_InvalidHdKeyPathImplCopyWith<$Res> { - factory _$$DescriptorError_InvalidHdKeyPathImplCopyWith( - _$DescriptorError_InvalidHdKeyPathImpl value, - $Res Function(_$DescriptorError_InvalidHdKeyPathImpl) then) = - __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_InvalidHdKeyPathImpl> - implements _$$DescriptorError_InvalidHdKeyPathImplCopyWith<$Res> { - __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl( - _$DescriptorError_InvalidHdKeyPathImpl _value, - $Res Function(_$DescriptorError_InvalidHdKeyPathImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$DescriptorError_InvalidHdKeyPathImpl - extends DescriptorError_InvalidHdKeyPath { - const _$DescriptorError_InvalidHdKeyPathImpl() : super._(); - - @override - String toString() { - return 'DescriptorError.invalidHdKeyPath()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_InvalidHdKeyPathImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return invalidHdKeyPath(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return invalidHdKeyPath?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (invalidHdKeyPath != null) { - return invalidHdKeyPath(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return invalidHdKeyPath(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return invalidHdKeyPath?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (invalidHdKeyPath != null) { - return invalidHdKeyPath(this); - } - return orElse(); - } -} - -abstract class DescriptorError_InvalidHdKeyPath extends DescriptorError { - const factory DescriptorError_InvalidHdKeyPath() = - _$DescriptorError_InvalidHdKeyPathImpl; - const DescriptorError_InvalidHdKeyPath._() : super._(); -} - -/// @nodoc -abstract class _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith<$Res> { - factory _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith( - _$DescriptorError_InvalidDescriptorChecksumImpl value, - $Res Function(_$DescriptorError_InvalidDescriptorChecksumImpl) then) = - __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_InvalidDescriptorChecksumImpl> - implements _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith<$Res> { - __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl( - _$DescriptorError_InvalidDescriptorChecksumImpl _value, - $Res Function(_$DescriptorError_InvalidDescriptorChecksumImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$DescriptorError_InvalidDescriptorChecksumImpl - extends DescriptorError_InvalidDescriptorChecksum { - const _$DescriptorError_InvalidDescriptorChecksumImpl() : super._(); - - @override - String toString() { - return 'DescriptorError.invalidDescriptorChecksum()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_InvalidDescriptorChecksumImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return invalidDescriptorChecksum(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return invalidDescriptorChecksum?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (invalidDescriptorChecksum != null) { - return invalidDescriptorChecksum(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return invalidDescriptorChecksum(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return invalidDescriptorChecksum?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (invalidDescriptorChecksum != null) { - return invalidDescriptorChecksum(this); - } - return orElse(); - } -} - -abstract class DescriptorError_InvalidDescriptorChecksum - extends DescriptorError { - const factory DescriptorError_InvalidDescriptorChecksum() = - _$DescriptorError_InvalidDescriptorChecksumImpl; - const DescriptorError_InvalidDescriptorChecksum._() : super._(); -} - -/// @nodoc -abstract class _$$DescriptorError_HardenedDerivationXpubImplCopyWith<$Res> { - factory _$$DescriptorError_HardenedDerivationXpubImplCopyWith( - _$DescriptorError_HardenedDerivationXpubImpl value, - $Res Function(_$DescriptorError_HardenedDerivationXpubImpl) then) = - __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_HardenedDerivationXpubImpl> - implements _$$DescriptorError_HardenedDerivationXpubImplCopyWith<$Res> { - __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl( - _$DescriptorError_HardenedDerivationXpubImpl _value, - $Res Function(_$DescriptorError_HardenedDerivationXpubImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$DescriptorError_HardenedDerivationXpubImpl - extends DescriptorError_HardenedDerivationXpub { - const _$DescriptorError_HardenedDerivationXpubImpl() : super._(); - - @override - String toString() { - return 'DescriptorError.hardenedDerivationXpub()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_HardenedDerivationXpubImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return hardenedDerivationXpub(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return hardenedDerivationXpub?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (hardenedDerivationXpub != null) { - return hardenedDerivationXpub(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return hardenedDerivationXpub(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return hardenedDerivationXpub?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (hardenedDerivationXpub != null) { - return hardenedDerivationXpub(this); - } - return orElse(); - } -} - -abstract class DescriptorError_HardenedDerivationXpub extends DescriptorError { - const factory DescriptorError_HardenedDerivationXpub() = - _$DescriptorError_HardenedDerivationXpubImpl; - const DescriptorError_HardenedDerivationXpub._() : super._(); -} - -/// @nodoc -abstract class _$$DescriptorError_MultiPathImplCopyWith<$Res> { - factory _$$DescriptorError_MultiPathImplCopyWith( - _$DescriptorError_MultiPathImpl value, - $Res Function(_$DescriptorError_MultiPathImpl) then) = - __$$DescriptorError_MultiPathImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$DescriptorError_MultiPathImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_MultiPathImpl> - implements _$$DescriptorError_MultiPathImplCopyWith<$Res> { - __$$DescriptorError_MultiPathImplCopyWithImpl( - _$DescriptorError_MultiPathImpl _value, - $Res Function(_$DescriptorError_MultiPathImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$DescriptorError_MultiPathImpl extends DescriptorError_MultiPath { - const _$DescriptorError_MultiPathImpl() : super._(); - - @override - String toString() { - return 'DescriptorError.multiPath()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_MultiPathImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return multiPath(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return multiPath?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (multiPath != null) { - return multiPath(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return multiPath(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return multiPath?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (multiPath != null) { - return multiPath(this); - } - return orElse(); - } -} - -abstract class DescriptorError_MultiPath extends DescriptorError { - const factory DescriptorError_MultiPath() = _$DescriptorError_MultiPathImpl; - const DescriptorError_MultiPath._() : super._(); -} - -/// @nodoc -abstract class _$$DescriptorError_KeyImplCopyWith<$Res> { - factory _$$DescriptorError_KeyImplCopyWith(_$DescriptorError_KeyImpl value, - $Res Function(_$DescriptorError_KeyImpl) then) = - __$$DescriptorError_KeyImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$DescriptorError_KeyImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_KeyImpl> - implements _$$DescriptorError_KeyImplCopyWith<$Res> { - __$$DescriptorError_KeyImplCopyWithImpl(_$DescriptorError_KeyImpl _value, - $Res Function(_$DescriptorError_KeyImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$DescriptorError_KeyImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$DescriptorError_KeyImpl extends DescriptorError_Key { - const _$DescriptorError_KeyImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'DescriptorError.key(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_KeyImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DescriptorError_KeyImplCopyWith<_$DescriptorError_KeyImpl> get copyWith => - __$$DescriptorError_KeyImplCopyWithImpl<_$DescriptorError_KeyImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return key(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return key?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (key != null) { - return key(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return key(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return key?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (key != null) { - return key(this); - } - return orElse(); - } -} - -abstract class DescriptorError_Key extends DescriptorError { - const factory DescriptorError_Key(final String field0) = - _$DescriptorError_KeyImpl; - const DescriptorError_Key._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$DescriptorError_KeyImplCopyWith<_$DescriptorError_KeyImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$DescriptorError_PolicyImplCopyWith<$Res> { - factory _$$DescriptorError_PolicyImplCopyWith( - _$DescriptorError_PolicyImpl value, - $Res Function(_$DescriptorError_PolicyImpl) then) = - __$$DescriptorError_PolicyImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$DescriptorError_PolicyImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_PolicyImpl> - implements _$$DescriptorError_PolicyImplCopyWith<$Res> { - __$$DescriptorError_PolicyImplCopyWithImpl( - _$DescriptorError_PolicyImpl _value, - $Res Function(_$DescriptorError_PolicyImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$DescriptorError_PolicyImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$DescriptorError_PolicyImpl extends DescriptorError_Policy { - const _$DescriptorError_PolicyImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'DescriptorError.policy(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_PolicyImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DescriptorError_PolicyImplCopyWith<_$DescriptorError_PolicyImpl> - get copyWith => __$$DescriptorError_PolicyImplCopyWithImpl< - _$DescriptorError_PolicyImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return policy(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return policy?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (policy != null) { - return policy(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return policy(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return policy?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (policy != null) { - return policy(this); - } - return orElse(); - } -} - -abstract class DescriptorError_Policy extends DescriptorError { - const factory DescriptorError_Policy(final String field0) = - _$DescriptorError_PolicyImpl; - const DescriptorError_Policy._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$DescriptorError_PolicyImplCopyWith<_$DescriptorError_PolicyImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith<$Res> { - factory _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith( - _$DescriptorError_InvalidDescriptorCharacterImpl value, - $Res Function(_$DescriptorError_InvalidDescriptorCharacterImpl) - then) = - __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl<$Res>; - @useResult - $Res call({int field0}); -} - -/// @nodoc -class __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_InvalidDescriptorCharacterImpl> - implements _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith<$Res> { - __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl( - _$DescriptorError_InvalidDescriptorCharacterImpl _value, - $Res Function(_$DescriptorError_InvalidDescriptorCharacterImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$DescriptorError_InvalidDescriptorCharacterImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$DescriptorError_InvalidDescriptorCharacterImpl - extends DescriptorError_InvalidDescriptorCharacter { - const _$DescriptorError_InvalidDescriptorCharacterImpl(this.field0) - : super._(); - - @override - final int field0; - - @override - String toString() { - return 'DescriptorError.invalidDescriptorCharacter(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_InvalidDescriptorCharacterImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith< - _$DescriptorError_InvalidDescriptorCharacterImpl> - get copyWith => - __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl< - _$DescriptorError_InvalidDescriptorCharacterImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return invalidDescriptorCharacter(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return invalidDescriptorCharacter?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (invalidDescriptorCharacter != null) { - return invalidDescriptorCharacter(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return invalidDescriptorCharacter(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return invalidDescriptorCharacter?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (invalidDescriptorCharacter != null) { - return invalidDescriptorCharacter(this); - } - return orElse(); - } -} - -abstract class DescriptorError_InvalidDescriptorCharacter - extends DescriptorError { - const factory DescriptorError_InvalidDescriptorCharacter(final int field0) = - _$DescriptorError_InvalidDescriptorCharacterImpl; - const DescriptorError_InvalidDescriptorCharacter._() : super._(); - - int get field0; - @JsonKey(ignore: true) - _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith< - _$DescriptorError_InvalidDescriptorCharacterImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$DescriptorError_Bip32ImplCopyWith<$Res> { - factory _$$DescriptorError_Bip32ImplCopyWith( - _$DescriptorError_Bip32Impl value, - $Res Function(_$DescriptorError_Bip32Impl) then) = - __$$DescriptorError_Bip32ImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$DescriptorError_Bip32ImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_Bip32Impl> - implements _$$DescriptorError_Bip32ImplCopyWith<$Res> { - __$$DescriptorError_Bip32ImplCopyWithImpl(_$DescriptorError_Bip32Impl _value, - $Res Function(_$DescriptorError_Bip32Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$DescriptorError_Bip32Impl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$DescriptorError_Bip32Impl extends DescriptorError_Bip32 { - const _$DescriptorError_Bip32Impl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'DescriptorError.bip32(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_Bip32Impl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DescriptorError_Bip32ImplCopyWith<_$DescriptorError_Bip32Impl> - get copyWith => __$$DescriptorError_Bip32ImplCopyWithImpl< - _$DescriptorError_Bip32Impl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return bip32(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return bip32?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (bip32 != null) { - return bip32(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return bip32(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return bip32?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (bip32 != null) { - return bip32(this); - } - return orElse(); - } -} - -abstract class DescriptorError_Bip32 extends DescriptorError { - const factory DescriptorError_Bip32(final String field0) = - _$DescriptorError_Bip32Impl; - const DescriptorError_Bip32._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$DescriptorError_Bip32ImplCopyWith<_$DescriptorError_Bip32Impl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$DescriptorError_Base58ImplCopyWith<$Res> { - factory _$$DescriptorError_Base58ImplCopyWith( - _$DescriptorError_Base58Impl value, - $Res Function(_$DescriptorError_Base58Impl) then) = - __$$DescriptorError_Base58ImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$DescriptorError_Base58ImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_Base58Impl> - implements _$$DescriptorError_Base58ImplCopyWith<$Res> { - __$$DescriptorError_Base58ImplCopyWithImpl( - _$DescriptorError_Base58Impl _value, - $Res Function(_$DescriptorError_Base58Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$DescriptorError_Base58Impl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$DescriptorError_Base58Impl extends DescriptorError_Base58 { - const _$DescriptorError_Base58Impl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'DescriptorError.base58(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_Base58Impl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DescriptorError_Base58ImplCopyWith<_$DescriptorError_Base58Impl> - get copyWith => __$$DescriptorError_Base58ImplCopyWithImpl< - _$DescriptorError_Base58Impl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return base58(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return base58?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (base58 != null) { - return base58(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return base58(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return base58?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (base58 != null) { - return base58(this); - } - return orElse(); - } -} - -abstract class DescriptorError_Base58 extends DescriptorError { - const factory DescriptorError_Base58(final String field0) = - _$DescriptorError_Base58Impl; - const DescriptorError_Base58._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$DescriptorError_Base58ImplCopyWith<_$DescriptorError_Base58Impl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$DescriptorError_PkImplCopyWith<$Res> { - factory _$$DescriptorError_PkImplCopyWith(_$DescriptorError_PkImpl value, - $Res Function(_$DescriptorError_PkImpl) then) = - __$$DescriptorError_PkImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$DescriptorError_PkImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_PkImpl> - implements _$$DescriptorError_PkImplCopyWith<$Res> { - __$$DescriptorError_PkImplCopyWithImpl(_$DescriptorError_PkImpl _value, - $Res Function(_$DescriptorError_PkImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$DescriptorError_PkImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$DescriptorError_PkImpl extends DescriptorError_Pk { - const _$DescriptorError_PkImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'DescriptorError.pk(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_PkImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DescriptorError_PkImplCopyWith<_$DescriptorError_PkImpl> get copyWith => - __$$DescriptorError_PkImplCopyWithImpl<_$DescriptorError_PkImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return pk(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return pk?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (pk != null) { - return pk(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return pk(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return pk?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (pk != null) { - return pk(this); - } - return orElse(); - } -} - -abstract class DescriptorError_Pk extends DescriptorError { - const factory DescriptorError_Pk(final String field0) = - _$DescriptorError_PkImpl; - const DescriptorError_Pk._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$DescriptorError_PkImplCopyWith<_$DescriptorError_PkImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$DescriptorError_MiniscriptImplCopyWith<$Res> { - factory _$$DescriptorError_MiniscriptImplCopyWith( - _$DescriptorError_MiniscriptImpl value, - $Res Function(_$DescriptorError_MiniscriptImpl) then) = - __$$DescriptorError_MiniscriptImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$DescriptorError_MiniscriptImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_MiniscriptImpl> - implements _$$DescriptorError_MiniscriptImplCopyWith<$Res> { - __$$DescriptorError_MiniscriptImplCopyWithImpl( - _$DescriptorError_MiniscriptImpl _value, - $Res Function(_$DescriptorError_MiniscriptImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$DescriptorError_MiniscriptImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$DescriptorError_MiniscriptImpl extends DescriptorError_Miniscript { - const _$DescriptorError_MiniscriptImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'DescriptorError.miniscript(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_MiniscriptImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DescriptorError_MiniscriptImplCopyWith<_$DescriptorError_MiniscriptImpl> - get copyWith => __$$DescriptorError_MiniscriptImplCopyWithImpl< - _$DescriptorError_MiniscriptImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return miniscript(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return miniscript?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (miniscript != null) { - return miniscript(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return miniscript(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return miniscript?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (miniscript != null) { - return miniscript(this); - } - return orElse(); - } -} - -abstract class DescriptorError_Miniscript extends DescriptorError { - const factory DescriptorError_Miniscript(final String field0) = - _$DescriptorError_MiniscriptImpl; - const DescriptorError_Miniscript._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$DescriptorError_MiniscriptImplCopyWith<_$DescriptorError_MiniscriptImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$DescriptorError_HexImplCopyWith<$Res> { - factory _$$DescriptorError_HexImplCopyWith(_$DescriptorError_HexImpl value, - $Res Function(_$DescriptorError_HexImpl) then) = - __$$DescriptorError_HexImplCopyWithImpl<$Res>; - @useResult - $Res call({String field0}); -} - -/// @nodoc -class __$$DescriptorError_HexImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_HexImpl> - implements _$$DescriptorError_HexImplCopyWith<$Res> { - __$$DescriptorError_HexImplCopyWithImpl(_$DescriptorError_HexImpl _value, - $Res Function(_$DescriptorError_HexImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$DescriptorError_HexImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$DescriptorError_HexImpl extends DescriptorError_Hex { - const _$DescriptorError_HexImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'DescriptorError.hex(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DescriptorError_HexImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DescriptorError_HexImplCopyWith<_$DescriptorError_HexImpl> get copyWith => - __$$DescriptorError_HexImplCopyWithImpl<_$DescriptorError_HexImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() invalidHdKeyPath, - required TResult Function() invalidDescriptorChecksum, - required TResult Function() hardenedDerivationXpub, - required TResult Function() multiPath, - required TResult Function(String field0) key, - required TResult Function(String field0) policy, - required TResult Function(int field0) invalidDescriptorCharacter, - required TResult Function(String field0) bip32, - required TResult Function(String field0) base58, - required TResult Function(String field0) pk, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) hex, - }) { - return hex(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? invalidHdKeyPath, - TResult? Function()? invalidDescriptorChecksum, - TResult? Function()? hardenedDerivationXpub, - TResult? Function()? multiPath, - TResult? Function(String field0)? key, - TResult? Function(String field0)? policy, - TResult? Function(int field0)? invalidDescriptorCharacter, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? base58, - TResult? Function(String field0)? pk, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? hex, - }) { - return hex?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? invalidHdKeyPath, - TResult Function()? invalidDescriptorChecksum, - TResult Function()? hardenedDerivationXpub, - TResult Function()? multiPath, - TResult Function(String field0)? key, - TResult Function(String field0)? policy, - TResult Function(int field0)? invalidDescriptorCharacter, - TResult Function(String field0)? bip32, - TResult Function(String field0)? base58, - TResult Function(String field0)? pk, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? hex, - required TResult orElse(), - }) { - if (hex != null) { - return hex(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DescriptorError_InvalidHdKeyPath value) - invalidHdKeyPath, - required TResult Function(DescriptorError_InvalidDescriptorChecksum value) - invalidDescriptorChecksum, - required TResult Function(DescriptorError_HardenedDerivationXpub value) - hardenedDerivationXpub, - required TResult Function(DescriptorError_MultiPath value) multiPath, - required TResult Function(DescriptorError_Key value) key, - required TResult Function(DescriptorError_Policy value) policy, - required TResult Function(DescriptorError_InvalidDescriptorCharacter value) - invalidDescriptorCharacter, - required TResult Function(DescriptorError_Bip32 value) bip32, - required TResult Function(DescriptorError_Base58 value) base58, - required TResult Function(DescriptorError_Pk value) pk, - required TResult Function(DescriptorError_Miniscript value) miniscript, - required TResult Function(DescriptorError_Hex value) hex, - }) { - return hex(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult? Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult? Function(DescriptorError_MultiPath value)? multiPath, - TResult? Function(DescriptorError_Key value)? key, - TResult? Function(DescriptorError_Policy value)? policy, - TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult? Function(DescriptorError_Bip32 value)? bip32, - TResult? Function(DescriptorError_Base58 value)? base58, - TResult? Function(DescriptorError_Pk value)? pk, - TResult? Function(DescriptorError_Miniscript value)? miniscript, - TResult? Function(DescriptorError_Hex value)? hex, - }) { - return hex?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, - TResult Function(DescriptorError_InvalidDescriptorChecksum value)? - invalidDescriptorChecksum, - TResult Function(DescriptorError_HardenedDerivationXpub value)? - hardenedDerivationXpub, - TResult Function(DescriptorError_MultiPath value)? multiPath, - TResult Function(DescriptorError_Key value)? key, - TResult Function(DescriptorError_Policy value)? policy, - TResult Function(DescriptorError_InvalidDescriptorCharacter value)? - invalidDescriptorCharacter, - TResult Function(DescriptorError_Bip32 value)? bip32, - TResult Function(DescriptorError_Base58 value)? base58, - TResult Function(DescriptorError_Pk value)? pk, - TResult Function(DescriptorError_Miniscript value)? miniscript, - TResult Function(DescriptorError_Hex value)? hex, - required TResult orElse(), - }) { - if (hex != null) { - return hex(this); - } - return orElse(); - } -} - -abstract class DescriptorError_Hex extends DescriptorError { - const factory DescriptorError_Hex(final String field0) = - _$DescriptorError_HexImpl; - const DescriptorError_Hex._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$DescriptorError_HexImplCopyWith<_$DescriptorError_HexImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$HexError { - Object get field0 => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(int field0) invalidChar, - required TResult Function(BigInt field0) oddLengthString, - required TResult Function(BigInt field0, BigInt field1) invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(BigInt field0)? oddLengthString, - TResult? Function(BigInt field0, BigInt field1)? invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(BigInt field0)? oddLengthString, - TResult Function(BigInt field0, BigInt field1)? invalidLength, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(HexError_InvalidChar value) invalidChar, - required TResult Function(HexError_OddLengthString value) oddLengthString, - required TResult Function(HexError_InvalidLength value) invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(HexError_InvalidChar value)? invalidChar, - TResult? Function(HexError_OddLengthString value)? oddLengthString, - TResult? Function(HexError_InvalidLength value)? invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(HexError_InvalidChar value)? invalidChar, - TResult Function(HexError_OddLengthString value)? oddLengthString, - TResult Function(HexError_InvalidLength value)? invalidLength, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $HexErrorCopyWith<$Res> { - factory $HexErrorCopyWith(HexError value, $Res Function(HexError) then) = - _$HexErrorCopyWithImpl<$Res, HexError>; -} - -/// @nodoc -class _$HexErrorCopyWithImpl<$Res, $Val extends HexError> - implements $HexErrorCopyWith<$Res> { - _$HexErrorCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$HexError_InvalidCharImplCopyWith<$Res> { - factory _$$HexError_InvalidCharImplCopyWith(_$HexError_InvalidCharImpl value, - $Res Function(_$HexError_InvalidCharImpl) then) = - __$$HexError_InvalidCharImplCopyWithImpl<$Res>; - @useResult - $Res call({int field0}); -} - -/// @nodoc -class __$$HexError_InvalidCharImplCopyWithImpl<$Res> - extends _$HexErrorCopyWithImpl<$Res, _$HexError_InvalidCharImpl> - implements _$$HexError_InvalidCharImplCopyWith<$Res> { - __$$HexError_InvalidCharImplCopyWithImpl(_$HexError_InvalidCharImpl _value, - $Res Function(_$HexError_InvalidCharImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$HexError_InvalidCharImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$HexError_InvalidCharImpl extends HexError_InvalidChar { - const _$HexError_InvalidCharImpl(this.field0) : super._(); - - @override - final int field0; - - @override - String toString() { - return 'HexError.invalidChar(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$HexError_InvalidCharImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$HexError_InvalidCharImplCopyWith<_$HexError_InvalidCharImpl> - get copyWith => - __$$HexError_InvalidCharImplCopyWithImpl<_$HexError_InvalidCharImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int field0) invalidChar, - required TResult Function(BigInt field0) oddLengthString, - required TResult Function(BigInt field0, BigInt field1) invalidLength, - }) { - return invalidChar(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(BigInt field0)? oddLengthString, - TResult? Function(BigInt field0, BigInt field1)? invalidLength, - }) { - return invalidChar?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(BigInt field0)? oddLengthString, - TResult Function(BigInt field0, BigInt field1)? invalidLength, - required TResult orElse(), - }) { - if (invalidChar != null) { - return invalidChar(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(HexError_InvalidChar value) invalidChar, - required TResult Function(HexError_OddLengthString value) oddLengthString, - required TResult Function(HexError_InvalidLength value) invalidLength, - }) { - return invalidChar(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(HexError_InvalidChar value)? invalidChar, - TResult? Function(HexError_OddLengthString value)? oddLengthString, - TResult? Function(HexError_InvalidLength value)? invalidLength, - }) { - return invalidChar?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(HexError_InvalidChar value)? invalidChar, - TResult Function(HexError_OddLengthString value)? oddLengthString, - TResult Function(HexError_InvalidLength value)? invalidLength, - required TResult orElse(), - }) { - if (invalidChar != null) { - return invalidChar(this); - } - return orElse(); - } -} - -abstract class HexError_InvalidChar extends HexError { - const factory HexError_InvalidChar(final int field0) = - _$HexError_InvalidCharImpl; - const HexError_InvalidChar._() : super._(); - - @override - int get field0; - @JsonKey(ignore: true) - _$$HexError_InvalidCharImplCopyWith<_$HexError_InvalidCharImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$HexError_OddLengthStringImplCopyWith<$Res> { - factory _$$HexError_OddLengthStringImplCopyWith( - _$HexError_OddLengthStringImpl value, - $Res Function(_$HexError_OddLengthStringImpl) then) = - __$$HexError_OddLengthStringImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt field0}); -} - -/// @nodoc -class __$$HexError_OddLengthStringImplCopyWithImpl<$Res> - extends _$HexErrorCopyWithImpl<$Res, _$HexError_OddLengthStringImpl> - implements _$$HexError_OddLengthStringImplCopyWith<$Res> { - __$$HexError_OddLengthStringImplCopyWithImpl( - _$HexError_OddLengthStringImpl _value, - $Res Function(_$HexError_OddLengthStringImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$HexError_OddLengthStringImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$HexError_OddLengthStringImpl extends HexError_OddLengthString { - const _$HexError_OddLengthStringImpl(this.field0) : super._(); - - @override - final BigInt field0; - - @override - String toString() { - return 'HexError.oddLengthString(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$HexError_OddLengthStringImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$HexError_OddLengthStringImplCopyWith<_$HexError_OddLengthStringImpl> - get copyWith => __$$HexError_OddLengthStringImplCopyWithImpl< - _$HexError_OddLengthStringImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int field0) invalidChar, - required TResult Function(BigInt field0) oddLengthString, - required TResult Function(BigInt field0, BigInt field1) invalidLength, - }) { - return oddLengthString(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(BigInt field0)? oddLengthString, - TResult? Function(BigInt field0, BigInt field1)? invalidLength, - }) { - return oddLengthString?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(BigInt field0)? oddLengthString, - TResult Function(BigInt field0, BigInt field1)? invalidLength, - required TResult orElse(), - }) { - if (oddLengthString != null) { - return oddLengthString(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(HexError_InvalidChar value) invalidChar, - required TResult Function(HexError_OddLengthString value) oddLengthString, - required TResult Function(HexError_InvalidLength value) invalidLength, - }) { - return oddLengthString(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(HexError_InvalidChar value)? invalidChar, - TResult? Function(HexError_OddLengthString value)? oddLengthString, - TResult? Function(HexError_InvalidLength value)? invalidLength, - }) { - return oddLengthString?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(HexError_InvalidChar value)? invalidChar, - TResult Function(HexError_OddLengthString value)? oddLengthString, - TResult Function(HexError_InvalidLength value)? invalidLength, - required TResult orElse(), - }) { - if (oddLengthString != null) { - return oddLengthString(this); - } - return orElse(); - } -} - -abstract class HexError_OddLengthString extends HexError { - const factory HexError_OddLengthString(final BigInt field0) = - _$HexError_OddLengthStringImpl; - const HexError_OddLengthString._() : super._(); - - @override - BigInt get field0; - @JsonKey(ignore: true) - _$$HexError_OddLengthStringImplCopyWith<_$HexError_OddLengthStringImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$HexError_InvalidLengthImplCopyWith<$Res> { - factory _$$HexError_InvalidLengthImplCopyWith( - _$HexError_InvalidLengthImpl value, - $Res Function(_$HexError_InvalidLengthImpl) then) = - __$$HexError_InvalidLengthImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt field0, BigInt field1}); -} - -/// @nodoc -class __$$HexError_InvalidLengthImplCopyWithImpl<$Res> - extends _$HexErrorCopyWithImpl<$Res, _$HexError_InvalidLengthImpl> - implements _$$HexError_InvalidLengthImplCopyWith<$Res> { - __$$HexError_InvalidLengthImplCopyWithImpl( - _$HexError_InvalidLengthImpl _value, - $Res Function(_$HexError_InvalidLengthImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - Object? field1 = null, - }) { - return _then(_$HexError_InvalidLengthImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - null == field1 - ? _value.field1 - : field1 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$HexError_InvalidLengthImpl extends HexError_InvalidLength { - const _$HexError_InvalidLengthImpl(this.field0, this.field1) : super._(); - - @override - final BigInt field0; - @override - final BigInt field1; - - @override - String toString() { - return 'HexError.invalidLength(field0: $field0, field1: $field1)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$HexError_InvalidLengthImpl && - (identical(other.field0, field0) || other.field0 == field0) && - (identical(other.field1, field1) || other.field1 == field1)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0, field1); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$HexError_InvalidLengthImplCopyWith<_$HexError_InvalidLengthImpl> - get copyWith => __$$HexError_InvalidLengthImplCopyWithImpl< - _$HexError_InvalidLengthImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int field0) invalidChar, - required TResult Function(BigInt field0) oddLengthString, - required TResult Function(BigInt field0, BigInt field1) invalidLength, - }) { - return invalidLength(field0, field1); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(BigInt field0)? oddLengthString, - TResult? Function(BigInt field0, BigInt field1)? invalidLength, - }) { - return invalidLength?.call(field0, field1); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(BigInt field0)? oddLengthString, - TResult Function(BigInt field0, BigInt field1)? invalidLength, - required TResult orElse(), - }) { - if (invalidLength != null) { - return invalidLength(field0, field1); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(HexError_InvalidChar value) invalidChar, - required TResult Function(HexError_OddLengthString value) oddLengthString, - required TResult Function(HexError_InvalidLength value) invalidLength, - }) { - return invalidLength(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(HexError_InvalidChar value)? invalidChar, - TResult? Function(HexError_OddLengthString value)? oddLengthString, - TResult? Function(HexError_InvalidLength value)? invalidLength, - }) { - return invalidLength?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(HexError_InvalidChar value)? invalidChar, - TResult Function(HexError_OddLengthString value)? oddLengthString, - TResult Function(HexError_InvalidLength value)? invalidLength, - required TResult orElse(), - }) { - if (invalidLength != null) { - return invalidLength(this); - } - return orElse(); - } -} - -abstract class HexError_InvalidLength extends HexError { - const factory HexError_InvalidLength( - final BigInt field0, final BigInt field1) = _$HexError_InvalidLengthImpl; - const HexError_InvalidLength._() : super._(); - - @override - BigInt get field0; - BigInt get field1; - @JsonKey(ignore: true) - _$$HexError_InvalidLengthImplCopyWith<_$HexError_InvalidLengthImpl> - get copyWith => throw _privateConstructorUsedError; -} diff --git a/lib/src/generated/api/key.dart b/lib/src/generated/api/key.dart deleted file mode 100644 index 627cde71..00000000 --- a/lib/src/generated/api/key.dart +++ /dev/null @@ -1,170 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import '../lib.dart'; -import 'error.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'types.dart'; - -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `fmt`, `from`, `from`, `from`, `from` - -class BdkDerivationPath { - final DerivationPath ptr; - - const BdkDerivationPath({ - required this.ptr, - }); - - String asString() => core.instance.api.crateApiKeyBdkDerivationPathAsString( - that: this, - ); - - static Future fromString({required String path}) => - core.instance.api.crateApiKeyBdkDerivationPathFromString(path: path); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkDerivationPath && - runtimeType == other.runtimeType && - ptr == other.ptr; -} - -class BdkDescriptorPublicKey { - final DescriptorPublicKey ptr; - - const BdkDescriptorPublicKey({ - required this.ptr, - }); - - String asString() => - core.instance.api.crateApiKeyBdkDescriptorPublicKeyAsString( - that: this, - ); - - static Future derive( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path}) => - core.instance.api - .crateApiKeyBdkDescriptorPublicKeyDerive(ptr: ptr, path: path); - - static Future extend( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path}) => - core.instance.api - .crateApiKeyBdkDescriptorPublicKeyExtend(ptr: ptr, path: path); - - static Future fromString( - {required String publicKey}) => - core.instance.api - .crateApiKeyBdkDescriptorPublicKeyFromString(publicKey: publicKey); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkDescriptorPublicKey && - runtimeType == other.runtimeType && - ptr == other.ptr; -} - -class BdkDescriptorSecretKey { - final DescriptorSecretKey ptr; - - const BdkDescriptorSecretKey({ - required this.ptr, - }); - - static BdkDescriptorPublicKey asPublic( - {required BdkDescriptorSecretKey ptr}) => - core.instance.api.crateApiKeyBdkDescriptorSecretKeyAsPublic(ptr: ptr); - - String asString() => - core.instance.api.crateApiKeyBdkDescriptorSecretKeyAsString( - that: this, - ); - - static Future create( - {required Network network, - required BdkMnemonic mnemonic, - String? password}) => - core.instance.api.crateApiKeyBdkDescriptorSecretKeyCreate( - network: network, mnemonic: mnemonic, password: password); - - static Future derive( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path}) => - core.instance.api - .crateApiKeyBdkDescriptorSecretKeyDerive(ptr: ptr, path: path); - - static Future extend( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path}) => - core.instance.api - .crateApiKeyBdkDescriptorSecretKeyExtend(ptr: ptr, path: path); - - static Future fromString( - {required String secretKey}) => - core.instance.api - .crateApiKeyBdkDescriptorSecretKeyFromString(secretKey: secretKey); - - /// Get the private key as bytes. - Uint8List secretBytes() => - core.instance.api.crateApiKeyBdkDescriptorSecretKeySecretBytes( - that: this, - ); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkDescriptorSecretKey && - runtimeType == other.runtimeType && - ptr == other.ptr; -} - -class BdkMnemonic { - final Mnemonic ptr; - - const BdkMnemonic({ - required this.ptr, - }); - - String asString() => core.instance.api.crateApiKeyBdkMnemonicAsString( - that: this, - ); - - /// Create a new Mnemonic in the specified language from the given entropy. - /// Entropy must be a multiple of 32 bits (4 bytes) and 128-256 bits in length. - static Future fromEntropy({required List entropy}) => - core.instance.api.crateApiKeyBdkMnemonicFromEntropy(entropy: entropy); - - /// Parse a Mnemonic with given string - static Future fromString({required String mnemonic}) => - core.instance.api.crateApiKeyBdkMnemonicFromString(mnemonic: mnemonic); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - /// Generates Mnemonic with a random entropy - static Future newInstance({required WordCount wordCount}) => - core.instance.api.crateApiKeyBdkMnemonicNew(wordCount: wordCount); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkMnemonic && - runtimeType == other.runtimeType && - ptr == other.ptr; -} diff --git a/lib/src/generated/api/psbt.dart b/lib/src/generated/api/psbt.dart deleted file mode 100644 index 2ca20acf..00000000 --- a/lib/src/generated/api/psbt.dart +++ /dev/null @@ -1,77 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import '../lib.dart'; -import 'error.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'types.dart'; - -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `from` - -class BdkPsbt { - final MutexPartiallySignedTransaction ptr; - - const BdkPsbt({ - required this.ptr, - }); - - String asString() => core.instance.api.crateApiPsbtBdkPsbtAsString( - that: this, - ); - - /// Combines this PartiallySignedTransaction with other PSBT as described by BIP 174. - /// - /// In accordance with BIP 174 this function is commutative i.e., `A.combine(B) == B.combine(A)` - static Future combine( - {required BdkPsbt ptr, required BdkPsbt other}) => - core.instance.api.crateApiPsbtBdkPsbtCombine(ptr: ptr, other: other); - - /// Return the transaction. - static BdkTransaction extractTx({required BdkPsbt ptr}) => - core.instance.api.crateApiPsbtBdkPsbtExtractTx(ptr: ptr); - - /// The total transaction fee amount, sum of input amounts minus sum of output amounts, in Sats. - /// If the PSBT is missing a TxOut for an input returns None. - BigInt? feeAmount() => core.instance.api.crateApiPsbtBdkPsbtFeeAmount( - that: this, - ); - - /// The transaction's fee rate. This value will only be accurate if calculated AFTER the - /// `PartiallySignedTransaction` is finalized and all witness/signature data is added to the - /// transaction. - /// If the PSBT is missing a TxOut for an input returns None. - FeeRate? feeRate() => core.instance.api.crateApiPsbtBdkPsbtFeeRate( - that: this, - ); - - static Future fromStr({required String psbtBase64}) => - core.instance.api.crateApiPsbtBdkPsbtFromStr(psbtBase64: psbtBase64); - - /// Serialize the PSBT data structure as a String of JSON. - String jsonSerialize() => core.instance.api.crateApiPsbtBdkPsbtJsonSerialize( - that: this, - ); - - ///Serialize as raw binary data - Uint8List serialize() => core.instance.api.crateApiPsbtBdkPsbtSerialize( - that: this, - ); - - ///Computes the `Txid`. - /// Hashes the transaction excluding the segwit data (i. e. the marker, flag bytes, and the witness fields themselves). - /// For non-segwit transactions which do not have any segwit data, this will be equal to transaction.wtxid(). - String txid() => core.instance.api.crateApiPsbtBdkPsbtTxid( - that: this, - ); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkPsbt && runtimeType == other.runtimeType && ptr == other.ptr; -} diff --git a/lib/src/generated/api/types.dart b/lib/src/generated/api/types.dart deleted file mode 100644 index 1b642cb0..00000000 --- a/lib/src/generated/api/types.dart +++ /dev/null @@ -1,991 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import '../lib.dart'; -import 'error.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; -part 'types.freezed.dart'; - -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `default`, `default`, `eq`, `eq`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `hash`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from` - -@freezed -sealed class AddressIndex with _$AddressIndex { - const AddressIndex._(); - - ///Return a new address after incrementing the current descriptor index. - const factory AddressIndex.increase() = AddressIndex_Increase; - - ///Return the address for the current descriptor index if it has not been used in a received transaction. Otherwise return a new address as with AddressIndex.New. - ///Use with caution, if the wallet has not yet detected an address has been used it could return an already used address. This function is primarily meant for situations where the caller is untrusted; for example when deriving donation addresses on-demand for a public web page. - const factory AddressIndex.lastUnused() = AddressIndex_LastUnused; - - /// Return the address for a specific descriptor index. Does not change the current descriptor - /// index used by `AddressIndex` and `AddressIndex.LastUsed`. - /// Use with caution, if an index is given that is less than the current descriptor index - /// then the returned address may have already been used. - const factory AddressIndex.peek({ - required int index, - }) = AddressIndex_Peek; - - /// Return the address for a specific descriptor index and reset the current descriptor index - /// used by `AddressIndex` and `AddressIndex.LastUsed` to this value. - /// Use with caution, if an index is given that is less than the current descriptor index - /// then the returned address and subsequent addresses returned by calls to `AddressIndex` - /// and `AddressIndex.LastUsed` may have already been used. Also if the index is reset to a - /// value earlier than the Blockchain stopGap (default is 20) then a - /// larger stopGap should be used to monitor for all possibly used addresses. - const factory AddressIndex.reset({ - required int index, - }) = AddressIndex_Reset; -} - -/// Local Wallet's Balance -class Balance { - final BigInt immature; - - /// Unconfirmed UTXOs generated by a wallet tx - final BigInt trustedPending; - - /// Unconfirmed UTXOs received from an external wallet - final BigInt untrustedPending; - - /// Confirmed and immediately spendable balance - final BigInt confirmed; - - /// Get sum of trusted_pending and confirmed coins - final BigInt spendable; - - /// Get the whole balance visible to the wallet - final BigInt total; - - const Balance({ - required this.immature, - required this.trustedPending, - required this.untrustedPending, - required this.confirmed, - required this.spendable, - required this.total, - }); - - @override - int get hashCode => - immature.hashCode ^ - trustedPending.hashCode ^ - untrustedPending.hashCode ^ - confirmed.hashCode ^ - spendable.hashCode ^ - total.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Balance && - runtimeType == other.runtimeType && - immature == other.immature && - trustedPending == other.trustedPending && - untrustedPending == other.untrustedPending && - confirmed == other.confirmed && - spendable == other.spendable && - total == other.total; -} - -class BdkAddress { - final Address ptr; - - const BdkAddress({ - required this.ptr, - }); - - String asString() => core.instance.api.crateApiTypesBdkAddressAsString( - that: this, - ); - - static Future fromScript( - {required BdkScriptBuf script, required Network network}) => - core.instance.api - .crateApiTypesBdkAddressFromScript(script: script, network: network); - - static Future fromString( - {required String address, required Network network}) => - core.instance.api.crateApiTypesBdkAddressFromString( - address: address, network: network); - - bool isValidForNetwork({required Network network}) => core.instance.api - .crateApiTypesBdkAddressIsValidForNetwork(that: this, network: network); - - Network network() => core.instance.api.crateApiTypesBdkAddressNetwork( - that: this, - ); - - Payload payload() => core.instance.api.crateApiTypesBdkAddressPayload( - that: this, - ); - - static BdkScriptBuf script({required BdkAddress ptr}) => - core.instance.api.crateApiTypesBdkAddressScript(ptr: ptr); - - String toQrUri() => core.instance.api.crateApiTypesBdkAddressToQrUri( - that: this, - ); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkAddress && - runtimeType == other.runtimeType && - ptr == other.ptr; -} - -class BdkPolicy { - final Policy ptr; - - const BdkPolicy({ - required this.ptr, - }); - - String asString() => core.instance.api.crateApiTypesBdkPolicyAsString( - that: this, - ); - - Satisfaction contribution() => - core.instance.api.crateApiTypesBdkPolicyContribution( - that: this, - ); - - String id() => core.instance.api.crateApiTypesBdkPolicyId( - that: this, - ); - - SatisfiableItem item() => core.instance.api.crateApiTypesBdkPolicyItem( - that: this, - ); - - bool requiresPath() => core.instance.api.crateApiTypesBdkPolicyRequiresPath( - that: this, - ); - - Satisfaction satisfaction() => - core.instance.api.crateApiTypesBdkPolicySatisfaction( - that: this, - ); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkPolicy && - runtimeType == other.runtimeType && - ptr == other.ptr; -} - -class BdkScriptBuf { - final Uint8List bytes; - - const BdkScriptBuf({ - required this.bytes, - }); - - String asString() => core.instance.api.crateApiTypesBdkScriptBufAsString( - that: this, - ); - - ///Creates a new empty script. - static BdkScriptBuf empty() => - core.instance.api.crateApiTypesBdkScriptBufEmpty(); - - static Future fromHex({required String s}) => - core.instance.api.crateApiTypesBdkScriptBufFromHex(s: s); - - ///Creates a new empty script with pre-allocated capacity. - static Future withCapacity({required BigInt capacity}) => - core.instance.api - .crateApiTypesBdkScriptBufWithCapacity(capacity: capacity); - - @override - int get hashCode => bytes.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkScriptBuf && - runtimeType == other.runtimeType && - bytes == other.bytes; -} - -class BdkTransaction { - final String s; - - const BdkTransaction({ - required this.s, - }); - - static Future fromBytes( - {required List transactionBytes}) => - core.instance.api.crateApiTypesBdkTransactionFromBytes( - transactionBytes: transactionBytes); - - ///List of transaction inputs. - Future> input() => - core.instance.api.crateApiTypesBdkTransactionInput( - that: this, - ); - - ///Is this a coin base transaction? - Future isCoinBase() => - core.instance.api.crateApiTypesBdkTransactionIsCoinBase( - that: this, - ); - - ///Returns true if the transaction itself opted in to be BIP-125-replaceable (RBF). - /// This does not cover the case where a transaction becomes replaceable due to ancestors being RBF. - Future isExplicitlyRbf() => - core.instance.api.crateApiTypesBdkTransactionIsExplicitlyRbf( - that: this, - ); - - ///Returns true if this transactions nLockTime is enabled (BIP-65 ). - Future isLockTimeEnabled() => - core.instance.api.crateApiTypesBdkTransactionIsLockTimeEnabled( - that: this, - ); - - ///Block height or timestamp. Transaction cannot be included in a block until this height/time. - Future lockTime() => - core.instance.api.crateApiTypesBdkTransactionLockTime( - that: this, - ); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required int version, - required LockTime lockTime, - required List input, - required List output}) => - core.instance.api.crateApiTypesBdkTransactionNew( - version: version, lockTime: lockTime, input: input, output: output); - - ///List of transaction outputs. - Future> output() => - core.instance.api.crateApiTypesBdkTransactionOutput( - that: this, - ); - - ///Encodes an object into a vector. - Future serialize() => - core.instance.api.crateApiTypesBdkTransactionSerialize( - that: this, - ); - - ///Returns the regular byte-wise consensus-serialized size of this transaction. - Future size() => core.instance.api.crateApiTypesBdkTransactionSize( - that: this, - ); - - ///Computes the txid. For non-segwit transactions this will be identical to the output of wtxid(), - /// but for segwit transactions, this will give the correct txid (not including witnesses) while wtxid will also hash witnesses. - Future txid() => core.instance.api.crateApiTypesBdkTransactionTxid( - that: this, - ); - - ///The protocol version, is currently expected to be 1 or 2 (BIP 68). - Future version() => core.instance.api.crateApiTypesBdkTransactionVersion( - that: this, - ); - - ///Returns the “virtual size†(vsize) of this transaction. - /// - Future vsize() => core.instance.api.crateApiTypesBdkTransactionVsize( - that: this, - ); - - ///Returns the regular byte-wise consensus-serialized size of this transaction. - Future weight() => - core.instance.api.crateApiTypesBdkTransactionWeight( - that: this, - ); - - @override - int get hashCode => s.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkTransaction && - runtimeType == other.runtimeType && - s == other.s; -} - -///Block height and timestamp of a block -class BlockTime { - ///Confirmation block height - final int height; - - ///Confirmation block timestamp - final BigInt timestamp; - - const BlockTime({ - required this.height, - required this.timestamp, - }); - - @override - int get hashCode => height.hashCode ^ timestamp.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BlockTime && - runtimeType == other.runtimeType && - height == other.height && - timestamp == other.timestamp; -} - -enum ChangeSpendPolicy { - changeAllowed, - onlyChange, - changeForbidden, - ; -} - -class Condition { - final int? csv; - final LockTime? timelock; - - const Condition({ - this.csv, - this.timelock, - }); - - @override - int get hashCode => csv.hashCode ^ timelock.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Condition && - runtimeType == other.runtimeType && - csv == other.csv && - timelock == other.timelock; -} - -@freezed -sealed class DatabaseConfig with _$DatabaseConfig { - const DatabaseConfig._(); - - const factory DatabaseConfig.memory() = DatabaseConfig_Memory; - - ///Simple key-value embedded database based on sled - const factory DatabaseConfig.sqlite({ - required SqliteDbConfiguration config, - }) = DatabaseConfig_Sqlite; - - ///Sqlite embedded database using rusqlite - const factory DatabaseConfig.sled({ - required SledDbConfiguration config, - }) = DatabaseConfig_Sled; -} - -class FeeRate { - final double satPerVb; - - const FeeRate({ - required this.satPerVb, - }); - - @override - int get hashCode => satPerVb.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is FeeRate && - runtimeType == other.runtimeType && - satPerVb == other.satPerVb; -} - -/// A key-value map for an input of the corresponding index in the unsigned -class Input { - final String s; - - const Input({ - required this.s, - }); - - @override - int get hashCode => s.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Input && runtimeType == other.runtimeType && s == other.s; -} - -///Types of keychains -enum KeychainKind { - externalChain, - - ///Internal, usually used for change outputs - internalChain, - ; -} - -///Unspent outputs of this wallet -class LocalUtxo { - final OutPoint outpoint; - final TxOut txout; - final KeychainKind keychain; - final bool isSpent; - - const LocalUtxo({ - required this.outpoint, - required this.txout, - required this.keychain, - required this.isSpent, - }); - - @override - int get hashCode => - outpoint.hashCode ^ txout.hashCode ^ keychain.hashCode ^ isSpent.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LocalUtxo && - runtimeType == other.runtimeType && - outpoint == other.outpoint && - txout == other.txout && - keychain == other.keychain && - isSpent == other.isSpent; -} - -@freezed -sealed class LockTime with _$LockTime { - const LockTime._(); - - const factory LockTime.blocks( - int field0, - ) = LockTime_Blocks; - const factory LockTime.seconds( - int field0, - ) = LockTime_Seconds; -} - -///The cryptocurrency to act on -enum Network { - ///Bitcoin’s testnet - testnet, - - ///Bitcoin’s regtest - regtest, - - ///Classic Bitcoin - bitcoin, - - ///Bitcoin’s signet - signet, - ; -} - -/// A reference to a transaction output. -class OutPoint { - /// The referenced transaction's txid. - final String txid; - - /// The index of the referenced output in its transaction's vout. - final int vout; - - const OutPoint({ - required this.txid, - required this.vout, - }); - - @override - int get hashCode => txid.hashCode ^ vout.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is OutPoint && - runtimeType == other.runtimeType && - txid == other.txid && - vout == other.vout; -} - -@freezed -sealed class Payload with _$Payload { - const Payload._(); - - /// P2PKH address. - const factory Payload.pubkeyHash({ - required String pubkeyHash, - }) = Payload_PubkeyHash; - - /// P2SH address. - const factory Payload.scriptHash({ - required String scriptHash, - }) = Payload_ScriptHash; - - /// Segwit address. - const factory Payload.witnessProgram({ - /// The witness program version. - required WitnessVersion version, - - /// The witness program. - required Uint8List program, - }) = Payload_WitnessProgram; -} - -@freezed -sealed class PkOrF with _$PkOrF { - const PkOrF._(); - - const factory PkOrF.pubkey({ - required String value, - }) = PkOrF_Pubkey; - const factory PkOrF.xOnlyPubkey({ - required String value, - }) = PkOrF_XOnlyPubkey; - const factory PkOrF.fingerprint({ - required String value, - }) = PkOrF_Fingerprint; -} - -class PsbtSigHashType { - final int inner; - - const PsbtSigHashType({ - required this.inner, - }); - - @override - int get hashCode => inner.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is PsbtSigHashType && - runtimeType == other.runtimeType && - inner == other.inner; -} - -@freezed -sealed class RbfValue with _$RbfValue { - const RbfValue._(); - - const factory RbfValue.rbfDefault() = RbfValue_RbfDefault; - const factory RbfValue.value( - int field0, - ) = RbfValue_Value; -} - -@freezed -sealed class Satisfaction with _$Satisfaction { - const Satisfaction._(); - - const factory Satisfaction.partial({ - required BigInt n, - required BigInt m, - required Uint64List items, - bool? sorted, - required Map> conditions, - }) = Satisfaction_Partial; - const factory Satisfaction.partialComplete({ - required BigInt n, - required BigInt m, - required Uint64List items, - bool? sorted, - required Map> conditions, - }) = Satisfaction_PartialComplete; - const factory Satisfaction.complete({ - required Condition condition, - }) = Satisfaction_Complete; - const factory Satisfaction.none({ - required String msg, - }) = Satisfaction_None; -} - -@freezed -sealed class SatisfiableItem with _$SatisfiableItem { - const SatisfiableItem._(); - - const factory SatisfiableItem.ecdsaSignature({ - required PkOrF key, - }) = SatisfiableItem_EcdsaSignature; - const factory SatisfiableItem.schnorrSignature({ - required PkOrF key, - }) = SatisfiableItem_SchnorrSignature; - const factory SatisfiableItem.sha256Preimage({ - required String hash, - }) = SatisfiableItem_Sha256Preimage; - const factory SatisfiableItem.hash256Preimage({ - required String hash, - }) = SatisfiableItem_Hash256Preimage; - const factory SatisfiableItem.ripemd160Preimage({ - required String hash, - }) = SatisfiableItem_Ripemd160Preimage; - const factory SatisfiableItem.hash160Preimage({ - required String hash, - }) = SatisfiableItem_Hash160Preimage; - const factory SatisfiableItem.absoluteTimelock({ - required LockTime value, - }) = SatisfiableItem_AbsoluteTimelock; - const factory SatisfiableItem.relativeTimelock({ - required int value, - }) = SatisfiableItem_RelativeTimelock; - const factory SatisfiableItem.multisig({ - required List keys, - required BigInt threshold, - }) = SatisfiableItem_Multisig; - const factory SatisfiableItem.thresh({ - required List items, - required BigInt threshold, - }) = SatisfiableItem_Thresh; -} - -/// A output script and an amount of satoshis. -class ScriptAmount { - final BdkScriptBuf script; - final BigInt amount; - - const ScriptAmount({ - required this.script, - required this.amount, - }); - - @override - int get hashCode => script.hashCode ^ amount.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ScriptAmount && - runtimeType == other.runtimeType && - script == other.script && - amount == other.amount; -} - -/// Options for a software signer -/// -/// Adjust the behavior of our software signers and the way a transaction is finalized -class SignOptions { - /// Whether the signer should trust the `witness_utxo`, if the `non_witness_utxo` hasn't been - /// provided - /// - /// Defaults to `false` to mitigate the "SegWit bug" which should trick the wallet into - /// paying a fee larger than expected. - /// - /// Some wallets, especially if relatively old, might not provide the `non_witness_utxo` for - /// SegWit transactions in the PSBT they generate: in those cases setting this to `true` - /// should correctly produce a signature, at the expense of an increased trust in the creator - /// of the PSBT. - /// - /// For more details see: - final bool trustWitnessUtxo; - - /// Whether the wallet should assume a specific height has been reached when trying to finalize - /// a transaction - /// - /// The wallet will only "use" a timelock to satisfy the spending policy of an input if the - /// timelock height has already been reached. This option allows overriding the "current height" to let the - /// wallet use timelocks in the future to spend a coin. - final int? assumeHeight; - - /// Whether the signer should use the `sighash_type` set in the PSBT when signing, no matter - /// what its value is - /// - /// Defaults to `false` which will only allow signing using `SIGHASH_ALL`. - final bool allowAllSighashes; - - /// Whether to remove partial signatures from the PSBT inputs while finalizing PSBT. - /// - /// Defaults to `true` which will remove partial signatures during finalization. - final bool removePartialSigs; - - /// Whether to try finalizing the PSBT after the inputs are signed. - /// - /// Defaults to `true` which will try finalizing PSBT after inputs are signed. - final bool tryFinalize; - - /// Whether we should try to sign a taproot transaction with the taproot internal key - /// or not. This option is ignored if we're signing a non-taproot PSBT. - /// - /// Defaults to `true`, i.e., we always try to sign with the taproot internal key. - final bool signWithTapInternalKey; - - /// Whether we should grind ECDSA signature to ensure signing with low r - /// or not. - /// Defaults to `true`, i.e., we always grind ECDSA signature to sign with low r. - final bool allowGrinding; - - const SignOptions({ - required this.trustWitnessUtxo, - this.assumeHeight, - required this.allowAllSighashes, - required this.removePartialSigs, - required this.tryFinalize, - required this.signWithTapInternalKey, - required this.allowGrinding, - }); - - @override - int get hashCode => - trustWitnessUtxo.hashCode ^ - assumeHeight.hashCode ^ - allowAllSighashes.hashCode ^ - removePartialSigs.hashCode ^ - tryFinalize.hashCode ^ - signWithTapInternalKey.hashCode ^ - allowGrinding.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SignOptions && - runtimeType == other.runtimeType && - trustWitnessUtxo == other.trustWitnessUtxo && - assumeHeight == other.assumeHeight && - allowAllSighashes == other.allowAllSighashes && - removePartialSigs == other.removePartialSigs && - tryFinalize == other.tryFinalize && - signWithTapInternalKey == other.signWithTapInternalKey && - allowGrinding == other.allowGrinding; -} - -///Configuration type for a sled Tree database -class SledDbConfiguration { - ///Main directory of the db - final String path; - - ///Name of the database tree, a separated namespace for the data - final String treeName; - - const SledDbConfiguration({ - required this.path, - required this.treeName, - }); - - @override - int get hashCode => path.hashCode ^ treeName.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SledDbConfiguration && - runtimeType == other.runtimeType && - path == other.path && - treeName == other.treeName; -} - -///Configuration type for a SqliteDatabase database -class SqliteDbConfiguration { - ///Main directory of the db - final String path; - - const SqliteDbConfiguration({ - required this.path, - }); - - @override - int get hashCode => path.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is SqliteDbConfiguration && - runtimeType == other.runtimeType && - path == other.path; -} - -///A wallet transaction -class TransactionDetails { - final BdkTransaction? transaction; - - /// Transaction id. - final String txid; - - /// Received value (sats) - /// Sum of owned outputs of this transaction. - final BigInt received; - - /// Sent value (sats) - /// Sum of owned inputs of this transaction. - final BigInt sent; - - /// Fee value (sats) if confirmed. - /// The availability of the fee depends on the backend. It's never None with an Electrum - /// Server backend, but it could be None with a Bitcoin RPC node without txindex that receive - /// funds while offline. - final BigInt? fee; - - /// If the transaction is confirmed, contains height and timestamp of the block containing the - /// transaction, unconfirmed transaction contains `None`. - final BlockTime? confirmationTime; - - const TransactionDetails({ - this.transaction, - required this.txid, - required this.received, - required this.sent, - this.fee, - this.confirmationTime, - }); - - @override - int get hashCode => - transaction.hashCode ^ - txid.hashCode ^ - received.hashCode ^ - sent.hashCode ^ - fee.hashCode ^ - confirmationTime.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TransactionDetails && - runtimeType == other.runtimeType && - transaction == other.transaction && - txid == other.txid && - received == other.received && - sent == other.sent && - fee == other.fee && - confirmationTime == other.confirmationTime; -} - -class TxIn { - final OutPoint previousOutput; - final BdkScriptBuf scriptSig; - final int sequence; - final List witness; - - const TxIn({ - required this.previousOutput, - required this.scriptSig, - required this.sequence, - required this.witness, - }); - - @override - int get hashCode => - previousOutput.hashCode ^ - scriptSig.hashCode ^ - sequence.hashCode ^ - witness.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TxIn && - runtimeType == other.runtimeType && - previousOutput == other.previousOutput && - scriptSig == other.scriptSig && - sequence == other.sequence && - witness == other.witness; -} - -///A transaction output, which defines new coins to be created from old ones. -class TxOut { - /// The value of the output, in satoshis. - final BigInt value; - - /// The address of the output. - final BdkScriptBuf scriptPubkey; - - const TxOut({ - required this.value, - required this.scriptPubkey, - }); - - @override - int get hashCode => value.hashCode ^ scriptPubkey.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TxOut && - runtimeType == other.runtimeType && - value == other.value && - scriptPubkey == other.scriptPubkey; -} - -enum Variant { - bech32, - bech32M, - ; -} - -enum WitnessVersion { - /// Initial version of witness program. Used for P2WPKH and P2WPK outputs - v0, - - /// Version of witness program used for Taproot P2TR outputs. - v1, - - /// Future (unsupported) version of witness program. - v2, - - /// Future (unsupported) version of witness program. - v3, - - /// Future (unsupported) version of witness program. - v4, - - /// Future (unsupported) version of witness program. - v5, - - /// Future (unsupported) version of witness program. - v6, - - /// Future (unsupported) version of witness program. - v7, - - /// Future (unsupported) version of witness program. - v8, - - /// Future (unsupported) version of witness program. - v9, - - /// Future (unsupported) version of witness program. - v10, - - /// Future (unsupported) version of witness program. - v11, - - /// Future (unsupported) version of witness program. - v12, - - /// Future (unsupported) version of witness program. - v13, - - /// Future (unsupported) version of witness program. - v14, - - /// Future (unsupported) version of witness program. - v15, - - /// Future (unsupported) version of witness program. - v16, - ; -} - -///Type describing entropy length (aka word count) in the mnemonic -enum WordCount { - ///12 words mnemonic (128 bits entropy) - words12, - - ///18 words mnemonic (192 bits entropy) - words18, - - ///24 words mnemonic (256 bits entropy) - words24, - ; -} diff --git a/lib/src/generated/api/types.freezed.dart b/lib/src/generated/api/types.freezed.dart deleted file mode 100644 index fee5cdaf..00000000 --- a/lib/src/generated/api/types.freezed.dart +++ /dev/null @@ -1,5830 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'types.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -/// @nodoc -mixin _$AddressIndex { - @optionalTypeArgs - TResult when({ - required TResult Function() increase, - required TResult Function() lastUnused, - required TResult Function(int index) peek, - required TResult Function(int index) reset, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(AddressIndex_Increase value) increase, - required TResult Function(AddressIndex_LastUnused value) lastUnused, - required TResult Function(AddressIndex_Peek value) peek, - required TResult Function(AddressIndex_Reset value) reset, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressIndex_Increase value)? increase, - TResult? Function(AddressIndex_LastUnused value)? lastUnused, - TResult? Function(AddressIndex_Peek value)? peek, - TResult? Function(AddressIndex_Reset value)? reset, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressIndex_Increase value)? increase, - TResult Function(AddressIndex_LastUnused value)? lastUnused, - TResult Function(AddressIndex_Peek value)? peek, - TResult Function(AddressIndex_Reset value)? reset, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AddressIndexCopyWith<$Res> { - factory $AddressIndexCopyWith( - AddressIndex value, $Res Function(AddressIndex) then) = - _$AddressIndexCopyWithImpl<$Res, AddressIndex>; -} - -/// @nodoc -class _$AddressIndexCopyWithImpl<$Res, $Val extends AddressIndex> - implements $AddressIndexCopyWith<$Res> { - _$AddressIndexCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$AddressIndex_IncreaseImplCopyWith<$Res> { - factory _$$AddressIndex_IncreaseImplCopyWith( - _$AddressIndex_IncreaseImpl value, - $Res Function(_$AddressIndex_IncreaseImpl) then) = - __$$AddressIndex_IncreaseImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$AddressIndex_IncreaseImplCopyWithImpl<$Res> - extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_IncreaseImpl> - implements _$$AddressIndex_IncreaseImplCopyWith<$Res> { - __$$AddressIndex_IncreaseImplCopyWithImpl(_$AddressIndex_IncreaseImpl _value, - $Res Function(_$AddressIndex_IncreaseImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$AddressIndex_IncreaseImpl extends AddressIndex_Increase { - const _$AddressIndex_IncreaseImpl() : super._(); - - @override - String toString() { - return 'AddressIndex.increase()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressIndex_IncreaseImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() increase, - required TResult Function() lastUnused, - required TResult Function(int index) peek, - required TResult Function(int index) reset, - }) { - return increase(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, - }) { - return increase?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, - required TResult orElse(), - }) { - if (increase != null) { - return increase(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressIndex_Increase value) increase, - required TResult Function(AddressIndex_LastUnused value) lastUnused, - required TResult Function(AddressIndex_Peek value) peek, - required TResult Function(AddressIndex_Reset value) reset, - }) { - return increase(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressIndex_Increase value)? increase, - TResult? Function(AddressIndex_LastUnused value)? lastUnused, - TResult? Function(AddressIndex_Peek value)? peek, - TResult? Function(AddressIndex_Reset value)? reset, - }) { - return increase?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressIndex_Increase value)? increase, - TResult Function(AddressIndex_LastUnused value)? lastUnused, - TResult Function(AddressIndex_Peek value)? peek, - TResult Function(AddressIndex_Reset value)? reset, - required TResult orElse(), - }) { - if (increase != null) { - return increase(this); - } - return orElse(); - } -} - -abstract class AddressIndex_Increase extends AddressIndex { - const factory AddressIndex_Increase() = _$AddressIndex_IncreaseImpl; - const AddressIndex_Increase._() : super._(); -} - -/// @nodoc -abstract class _$$AddressIndex_LastUnusedImplCopyWith<$Res> { - factory _$$AddressIndex_LastUnusedImplCopyWith( - _$AddressIndex_LastUnusedImpl value, - $Res Function(_$AddressIndex_LastUnusedImpl) then) = - __$$AddressIndex_LastUnusedImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$AddressIndex_LastUnusedImplCopyWithImpl<$Res> - extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_LastUnusedImpl> - implements _$$AddressIndex_LastUnusedImplCopyWith<$Res> { - __$$AddressIndex_LastUnusedImplCopyWithImpl( - _$AddressIndex_LastUnusedImpl _value, - $Res Function(_$AddressIndex_LastUnusedImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$AddressIndex_LastUnusedImpl extends AddressIndex_LastUnused { - const _$AddressIndex_LastUnusedImpl() : super._(); - - @override - String toString() { - return 'AddressIndex.lastUnused()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressIndex_LastUnusedImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() increase, - required TResult Function() lastUnused, - required TResult Function(int index) peek, - required TResult Function(int index) reset, - }) { - return lastUnused(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, - }) { - return lastUnused?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, - required TResult orElse(), - }) { - if (lastUnused != null) { - return lastUnused(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressIndex_Increase value) increase, - required TResult Function(AddressIndex_LastUnused value) lastUnused, - required TResult Function(AddressIndex_Peek value) peek, - required TResult Function(AddressIndex_Reset value) reset, - }) { - return lastUnused(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressIndex_Increase value)? increase, - TResult? Function(AddressIndex_LastUnused value)? lastUnused, - TResult? Function(AddressIndex_Peek value)? peek, - TResult? Function(AddressIndex_Reset value)? reset, - }) { - return lastUnused?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressIndex_Increase value)? increase, - TResult Function(AddressIndex_LastUnused value)? lastUnused, - TResult Function(AddressIndex_Peek value)? peek, - TResult Function(AddressIndex_Reset value)? reset, - required TResult orElse(), - }) { - if (lastUnused != null) { - return lastUnused(this); - } - return orElse(); - } -} - -abstract class AddressIndex_LastUnused extends AddressIndex { - const factory AddressIndex_LastUnused() = _$AddressIndex_LastUnusedImpl; - const AddressIndex_LastUnused._() : super._(); -} - -/// @nodoc -abstract class _$$AddressIndex_PeekImplCopyWith<$Res> { - factory _$$AddressIndex_PeekImplCopyWith(_$AddressIndex_PeekImpl value, - $Res Function(_$AddressIndex_PeekImpl) then) = - __$$AddressIndex_PeekImplCopyWithImpl<$Res>; - @useResult - $Res call({int index}); -} - -/// @nodoc -class __$$AddressIndex_PeekImplCopyWithImpl<$Res> - extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_PeekImpl> - implements _$$AddressIndex_PeekImplCopyWith<$Res> { - __$$AddressIndex_PeekImplCopyWithImpl(_$AddressIndex_PeekImpl _value, - $Res Function(_$AddressIndex_PeekImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? index = null, - }) { - return _then(_$AddressIndex_PeekImpl( - index: null == index - ? _value.index - : index // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$AddressIndex_PeekImpl extends AddressIndex_Peek { - const _$AddressIndex_PeekImpl({required this.index}) : super._(); - - @override - final int index; - - @override - String toString() { - return 'AddressIndex.peek(index: $index)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressIndex_PeekImpl && - (identical(other.index, index) || other.index == index)); - } - - @override - int get hashCode => Object.hash(runtimeType, index); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressIndex_PeekImplCopyWith<_$AddressIndex_PeekImpl> get copyWith => - __$$AddressIndex_PeekImplCopyWithImpl<_$AddressIndex_PeekImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() increase, - required TResult Function() lastUnused, - required TResult Function(int index) peek, - required TResult Function(int index) reset, - }) { - return peek(index); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, - }) { - return peek?.call(index); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, - required TResult orElse(), - }) { - if (peek != null) { - return peek(index); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressIndex_Increase value) increase, - required TResult Function(AddressIndex_LastUnused value) lastUnused, - required TResult Function(AddressIndex_Peek value) peek, - required TResult Function(AddressIndex_Reset value) reset, - }) { - return peek(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressIndex_Increase value)? increase, - TResult? Function(AddressIndex_LastUnused value)? lastUnused, - TResult? Function(AddressIndex_Peek value)? peek, - TResult? Function(AddressIndex_Reset value)? reset, - }) { - return peek?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressIndex_Increase value)? increase, - TResult Function(AddressIndex_LastUnused value)? lastUnused, - TResult Function(AddressIndex_Peek value)? peek, - TResult Function(AddressIndex_Reset value)? reset, - required TResult orElse(), - }) { - if (peek != null) { - return peek(this); - } - return orElse(); - } -} - -abstract class AddressIndex_Peek extends AddressIndex { - const factory AddressIndex_Peek({required final int index}) = - _$AddressIndex_PeekImpl; - const AddressIndex_Peek._() : super._(); - - int get index; - @JsonKey(ignore: true) - _$$AddressIndex_PeekImplCopyWith<_$AddressIndex_PeekImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressIndex_ResetImplCopyWith<$Res> { - factory _$$AddressIndex_ResetImplCopyWith(_$AddressIndex_ResetImpl value, - $Res Function(_$AddressIndex_ResetImpl) then) = - __$$AddressIndex_ResetImplCopyWithImpl<$Res>; - @useResult - $Res call({int index}); -} - -/// @nodoc -class __$$AddressIndex_ResetImplCopyWithImpl<$Res> - extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_ResetImpl> - implements _$$AddressIndex_ResetImplCopyWith<$Res> { - __$$AddressIndex_ResetImplCopyWithImpl(_$AddressIndex_ResetImpl _value, - $Res Function(_$AddressIndex_ResetImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? index = null, - }) { - return _then(_$AddressIndex_ResetImpl( - index: null == index - ? _value.index - : index // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$AddressIndex_ResetImpl extends AddressIndex_Reset { - const _$AddressIndex_ResetImpl({required this.index}) : super._(); - - @override - final int index; - - @override - String toString() { - return 'AddressIndex.reset(index: $index)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddressIndex_ResetImpl && - (identical(other.index, index) || other.index == index)); - } - - @override - int get hashCode => Object.hash(runtimeType, index); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AddressIndex_ResetImplCopyWith<_$AddressIndex_ResetImpl> get copyWith => - __$$AddressIndex_ResetImplCopyWithImpl<_$AddressIndex_ResetImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() increase, - required TResult Function() lastUnused, - required TResult Function(int index) peek, - required TResult Function(int index) reset, - }) { - return reset(index); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, - }) { - return reset?.call(index); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, - required TResult orElse(), - }) { - if (reset != null) { - return reset(index); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AddressIndex_Increase value) increase, - required TResult Function(AddressIndex_LastUnused value) lastUnused, - required TResult Function(AddressIndex_Peek value) peek, - required TResult Function(AddressIndex_Reset value) reset, - }) { - return reset(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AddressIndex_Increase value)? increase, - TResult? Function(AddressIndex_LastUnused value)? lastUnused, - TResult? Function(AddressIndex_Peek value)? peek, - TResult? Function(AddressIndex_Reset value)? reset, - }) { - return reset?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AddressIndex_Increase value)? increase, - TResult Function(AddressIndex_LastUnused value)? lastUnused, - TResult Function(AddressIndex_Peek value)? peek, - TResult Function(AddressIndex_Reset value)? reset, - required TResult orElse(), - }) { - if (reset != null) { - return reset(this); - } - return orElse(); - } -} - -abstract class AddressIndex_Reset extends AddressIndex { - const factory AddressIndex_Reset({required final int index}) = - _$AddressIndex_ResetImpl; - const AddressIndex_Reset._() : super._(); - - int get index; - @JsonKey(ignore: true) - _$$AddressIndex_ResetImplCopyWith<_$AddressIndex_ResetImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$DatabaseConfig { - @optionalTypeArgs - TResult when({ - required TResult Function() memory, - required TResult Function(SqliteDbConfiguration config) sqlite, - required TResult Function(SledDbConfiguration config) sled, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? memory, - TResult? Function(SqliteDbConfiguration config)? sqlite, - TResult? Function(SledDbConfiguration config)? sled, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? memory, - TResult Function(SqliteDbConfiguration config)? sqlite, - TResult Function(SledDbConfiguration config)? sled, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(DatabaseConfig_Memory value) memory, - required TResult Function(DatabaseConfig_Sqlite value) sqlite, - required TResult Function(DatabaseConfig_Sled value) sled, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DatabaseConfig_Memory value)? memory, - TResult? Function(DatabaseConfig_Sqlite value)? sqlite, - TResult? Function(DatabaseConfig_Sled value)? sled, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DatabaseConfig_Memory value)? memory, - TResult Function(DatabaseConfig_Sqlite value)? sqlite, - TResult Function(DatabaseConfig_Sled value)? sled, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DatabaseConfigCopyWith<$Res> { - factory $DatabaseConfigCopyWith( - DatabaseConfig value, $Res Function(DatabaseConfig) then) = - _$DatabaseConfigCopyWithImpl<$Res, DatabaseConfig>; -} - -/// @nodoc -class _$DatabaseConfigCopyWithImpl<$Res, $Val extends DatabaseConfig> - implements $DatabaseConfigCopyWith<$Res> { - _$DatabaseConfigCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$DatabaseConfig_MemoryImplCopyWith<$Res> { - factory _$$DatabaseConfig_MemoryImplCopyWith( - _$DatabaseConfig_MemoryImpl value, - $Res Function(_$DatabaseConfig_MemoryImpl) then) = - __$$DatabaseConfig_MemoryImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$DatabaseConfig_MemoryImplCopyWithImpl<$Res> - extends _$DatabaseConfigCopyWithImpl<$Res, _$DatabaseConfig_MemoryImpl> - implements _$$DatabaseConfig_MemoryImplCopyWith<$Res> { - __$$DatabaseConfig_MemoryImplCopyWithImpl(_$DatabaseConfig_MemoryImpl _value, - $Res Function(_$DatabaseConfig_MemoryImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$DatabaseConfig_MemoryImpl extends DatabaseConfig_Memory { - const _$DatabaseConfig_MemoryImpl() : super._(); - - @override - String toString() { - return 'DatabaseConfig.memory()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DatabaseConfig_MemoryImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() memory, - required TResult Function(SqliteDbConfiguration config) sqlite, - required TResult Function(SledDbConfiguration config) sled, - }) { - return memory(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? memory, - TResult? Function(SqliteDbConfiguration config)? sqlite, - TResult? Function(SledDbConfiguration config)? sled, - }) { - return memory?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? memory, - TResult Function(SqliteDbConfiguration config)? sqlite, - TResult Function(SledDbConfiguration config)? sled, - required TResult orElse(), - }) { - if (memory != null) { - return memory(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DatabaseConfig_Memory value) memory, - required TResult Function(DatabaseConfig_Sqlite value) sqlite, - required TResult Function(DatabaseConfig_Sled value) sled, - }) { - return memory(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DatabaseConfig_Memory value)? memory, - TResult? Function(DatabaseConfig_Sqlite value)? sqlite, - TResult? Function(DatabaseConfig_Sled value)? sled, - }) { - return memory?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DatabaseConfig_Memory value)? memory, - TResult Function(DatabaseConfig_Sqlite value)? sqlite, - TResult Function(DatabaseConfig_Sled value)? sled, - required TResult orElse(), - }) { - if (memory != null) { - return memory(this); - } - return orElse(); - } -} - -abstract class DatabaseConfig_Memory extends DatabaseConfig { - const factory DatabaseConfig_Memory() = _$DatabaseConfig_MemoryImpl; - const DatabaseConfig_Memory._() : super._(); -} - -/// @nodoc -abstract class _$$DatabaseConfig_SqliteImplCopyWith<$Res> { - factory _$$DatabaseConfig_SqliteImplCopyWith( - _$DatabaseConfig_SqliteImpl value, - $Res Function(_$DatabaseConfig_SqliteImpl) then) = - __$$DatabaseConfig_SqliteImplCopyWithImpl<$Res>; - @useResult - $Res call({SqliteDbConfiguration config}); -} - -/// @nodoc -class __$$DatabaseConfig_SqliteImplCopyWithImpl<$Res> - extends _$DatabaseConfigCopyWithImpl<$Res, _$DatabaseConfig_SqliteImpl> - implements _$$DatabaseConfig_SqliteImplCopyWith<$Res> { - __$$DatabaseConfig_SqliteImplCopyWithImpl(_$DatabaseConfig_SqliteImpl _value, - $Res Function(_$DatabaseConfig_SqliteImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$DatabaseConfig_SqliteImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as SqliteDbConfiguration, - )); - } -} - -/// @nodoc - -class _$DatabaseConfig_SqliteImpl extends DatabaseConfig_Sqlite { - const _$DatabaseConfig_SqliteImpl({required this.config}) : super._(); - - @override - final SqliteDbConfiguration config; - - @override - String toString() { - return 'DatabaseConfig.sqlite(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DatabaseConfig_SqliteImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DatabaseConfig_SqliteImplCopyWith<_$DatabaseConfig_SqliteImpl> - get copyWith => __$$DatabaseConfig_SqliteImplCopyWithImpl< - _$DatabaseConfig_SqliteImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() memory, - required TResult Function(SqliteDbConfiguration config) sqlite, - required TResult Function(SledDbConfiguration config) sled, - }) { - return sqlite(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? memory, - TResult? Function(SqliteDbConfiguration config)? sqlite, - TResult? Function(SledDbConfiguration config)? sled, - }) { - return sqlite?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? memory, - TResult Function(SqliteDbConfiguration config)? sqlite, - TResult Function(SledDbConfiguration config)? sled, - required TResult orElse(), - }) { - if (sqlite != null) { - return sqlite(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DatabaseConfig_Memory value) memory, - required TResult Function(DatabaseConfig_Sqlite value) sqlite, - required TResult Function(DatabaseConfig_Sled value) sled, - }) { - return sqlite(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DatabaseConfig_Memory value)? memory, - TResult? Function(DatabaseConfig_Sqlite value)? sqlite, - TResult? Function(DatabaseConfig_Sled value)? sled, - }) { - return sqlite?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DatabaseConfig_Memory value)? memory, - TResult Function(DatabaseConfig_Sqlite value)? sqlite, - TResult Function(DatabaseConfig_Sled value)? sled, - required TResult orElse(), - }) { - if (sqlite != null) { - return sqlite(this); - } - return orElse(); - } -} - -abstract class DatabaseConfig_Sqlite extends DatabaseConfig { - const factory DatabaseConfig_Sqlite( - {required final SqliteDbConfiguration config}) = - _$DatabaseConfig_SqliteImpl; - const DatabaseConfig_Sqlite._() : super._(); - - SqliteDbConfiguration get config; - @JsonKey(ignore: true) - _$$DatabaseConfig_SqliteImplCopyWith<_$DatabaseConfig_SqliteImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$DatabaseConfig_SledImplCopyWith<$Res> { - factory _$$DatabaseConfig_SledImplCopyWith(_$DatabaseConfig_SledImpl value, - $Res Function(_$DatabaseConfig_SledImpl) then) = - __$$DatabaseConfig_SledImplCopyWithImpl<$Res>; - @useResult - $Res call({SledDbConfiguration config}); -} - -/// @nodoc -class __$$DatabaseConfig_SledImplCopyWithImpl<$Res> - extends _$DatabaseConfigCopyWithImpl<$Res, _$DatabaseConfig_SledImpl> - implements _$$DatabaseConfig_SledImplCopyWith<$Res> { - __$$DatabaseConfig_SledImplCopyWithImpl(_$DatabaseConfig_SledImpl _value, - $Res Function(_$DatabaseConfig_SledImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$DatabaseConfig_SledImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as SledDbConfiguration, - )); - } -} - -/// @nodoc - -class _$DatabaseConfig_SledImpl extends DatabaseConfig_Sled { - const _$DatabaseConfig_SledImpl({required this.config}) : super._(); - - @override - final SledDbConfiguration config; - - @override - String toString() { - return 'DatabaseConfig.sled(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DatabaseConfig_SledImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DatabaseConfig_SledImplCopyWith<_$DatabaseConfig_SledImpl> get copyWith => - __$$DatabaseConfig_SledImplCopyWithImpl<_$DatabaseConfig_SledImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() memory, - required TResult Function(SqliteDbConfiguration config) sqlite, - required TResult Function(SledDbConfiguration config) sled, - }) { - return sled(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? memory, - TResult? Function(SqliteDbConfiguration config)? sqlite, - TResult? Function(SledDbConfiguration config)? sled, - }) { - return sled?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? memory, - TResult Function(SqliteDbConfiguration config)? sqlite, - TResult Function(SledDbConfiguration config)? sled, - required TResult orElse(), - }) { - if (sled != null) { - return sled(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(DatabaseConfig_Memory value) memory, - required TResult Function(DatabaseConfig_Sqlite value) sqlite, - required TResult Function(DatabaseConfig_Sled value) sled, - }) { - return sled(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(DatabaseConfig_Memory value)? memory, - TResult? Function(DatabaseConfig_Sqlite value)? sqlite, - TResult? Function(DatabaseConfig_Sled value)? sled, - }) { - return sled?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(DatabaseConfig_Memory value)? memory, - TResult Function(DatabaseConfig_Sqlite value)? sqlite, - TResult Function(DatabaseConfig_Sled value)? sled, - required TResult orElse(), - }) { - if (sled != null) { - return sled(this); - } - return orElse(); - } -} - -abstract class DatabaseConfig_Sled extends DatabaseConfig { - const factory DatabaseConfig_Sled( - {required final SledDbConfiguration config}) = _$DatabaseConfig_SledImpl; - const DatabaseConfig_Sled._() : super._(); - - SledDbConfiguration get config; - @JsonKey(ignore: true) - _$$DatabaseConfig_SledImplCopyWith<_$DatabaseConfig_SledImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LockTime { - int get field0 => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(int field0) blocks, - required TResult Function(int field0) seconds, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? blocks, - TResult? Function(int field0)? seconds, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? blocks, - TResult Function(int field0)? seconds, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LockTime_Blocks value) blocks, - required TResult Function(LockTime_Seconds value) seconds, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LockTime_Blocks value)? blocks, - TResult? Function(LockTime_Seconds value)? seconds, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LockTime_Blocks value)? blocks, - TResult Function(LockTime_Seconds value)? seconds, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $LockTimeCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LockTimeCopyWith<$Res> { - factory $LockTimeCopyWith(LockTime value, $Res Function(LockTime) then) = - _$LockTimeCopyWithImpl<$Res, LockTime>; - @useResult - $Res call({int field0}); -} - -/// @nodoc -class _$LockTimeCopyWithImpl<$Res, $Val extends LockTime> - implements $LockTimeCopyWith<$Res> { - _$LockTimeCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_value.copyWith( - field0: null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$LockTime_BlocksImplCopyWith<$Res> - implements $LockTimeCopyWith<$Res> { - factory _$$LockTime_BlocksImplCopyWith(_$LockTime_BlocksImpl value, - $Res Function(_$LockTime_BlocksImpl) then) = - __$$LockTime_BlocksImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({int field0}); -} - -/// @nodoc -class __$$LockTime_BlocksImplCopyWithImpl<$Res> - extends _$LockTimeCopyWithImpl<$Res, _$LockTime_BlocksImpl> - implements _$$LockTime_BlocksImplCopyWith<$Res> { - __$$LockTime_BlocksImplCopyWithImpl( - _$LockTime_BlocksImpl _value, $Res Function(_$LockTime_BlocksImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$LockTime_BlocksImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$LockTime_BlocksImpl extends LockTime_Blocks { - const _$LockTime_BlocksImpl(this.field0) : super._(); - - @override - final int field0; - - @override - String toString() { - return 'LockTime.blocks(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LockTime_BlocksImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LockTime_BlocksImplCopyWith<_$LockTime_BlocksImpl> get copyWith => - __$$LockTime_BlocksImplCopyWithImpl<_$LockTime_BlocksImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int field0) blocks, - required TResult Function(int field0) seconds, - }) { - return blocks(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? blocks, - TResult? Function(int field0)? seconds, - }) { - return blocks?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? blocks, - TResult Function(int field0)? seconds, - required TResult orElse(), - }) { - if (blocks != null) { - return blocks(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LockTime_Blocks value) blocks, - required TResult Function(LockTime_Seconds value) seconds, - }) { - return blocks(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LockTime_Blocks value)? blocks, - TResult? Function(LockTime_Seconds value)? seconds, - }) { - return blocks?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LockTime_Blocks value)? blocks, - TResult Function(LockTime_Seconds value)? seconds, - required TResult orElse(), - }) { - if (blocks != null) { - return blocks(this); - } - return orElse(); - } -} - -abstract class LockTime_Blocks extends LockTime { - const factory LockTime_Blocks(final int field0) = _$LockTime_BlocksImpl; - const LockTime_Blocks._() : super._(); - - @override - int get field0; - @override - @JsonKey(ignore: true) - _$$LockTime_BlocksImplCopyWith<_$LockTime_BlocksImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LockTime_SecondsImplCopyWith<$Res> - implements $LockTimeCopyWith<$Res> { - factory _$$LockTime_SecondsImplCopyWith(_$LockTime_SecondsImpl value, - $Res Function(_$LockTime_SecondsImpl) then) = - __$$LockTime_SecondsImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({int field0}); -} - -/// @nodoc -class __$$LockTime_SecondsImplCopyWithImpl<$Res> - extends _$LockTimeCopyWithImpl<$Res, _$LockTime_SecondsImpl> - implements _$$LockTime_SecondsImplCopyWith<$Res> { - __$$LockTime_SecondsImplCopyWithImpl(_$LockTime_SecondsImpl _value, - $Res Function(_$LockTime_SecondsImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$LockTime_SecondsImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$LockTime_SecondsImpl extends LockTime_Seconds { - const _$LockTime_SecondsImpl(this.field0) : super._(); - - @override - final int field0; - - @override - String toString() { - return 'LockTime.seconds(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LockTime_SecondsImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LockTime_SecondsImplCopyWith<_$LockTime_SecondsImpl> get copyWith => - __$$LockTime_SecondsImplCopyWithImpl<_$LockTime_SecondsImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int field0) blocks, - required TResult Function(int field0) seconds, - }) { - return seconds(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? blocks, - TResult? Function(int field0)? seconds, - }) { - return seconds?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? blocks, - TResult Function(int field0)? seconds, - required TResult orElse(), - }) { - if (seconds != null) { - return seconds(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LockTime_Blocks value) blocks, - required TResult Function(LockTime_Seconds value) seconds, - }) { - return seconds(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LockTime_Blocks value)? blocks, - TResult? Function(LockTime_Seconds value)? seconds, - }) { - return seconds?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LockTime_Blocks value)? blocks, - TResult Function(LockTime_Seconds value)? seconds, - required TResult orElse(), - }) { - if (seconds != null) { - return seconds(this); - } - return orElse(); - } -} - -abstract class LockTime_Seconds extends LockTime { - const factory LockTime_Seconds(final int field0) = _$LockTime_SecondsImpl; - const LockTime_Seconds._() : super._(); - - @override - int get field0; - @override - @JsonKey(ignore: true) - _$$LockTime_SecondsImplCopyWith<_$LockTime_SecondsImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$Payload { - @optionalTypeArgs - TResult when({ - required TResult Function(String pubkeyHash) pubkeyHash, - required TResult Function(String scriptHash) scriptHash, - required TResult Function(WitnessVersion version, Uint8List program) - witnessProgram, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String pubkeyHash)? pubkeyHash, - TResult? Function(String scriptHash)? scriptHash, - TResult? Function(WitnessVersion version, Uint8List program)? - witnessProgram, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String pubkeyHash)? pubkeyHash, - TResult Function(String scriptHash)? scriptHash, - TResult Function(WitnessVersion version, Uint8List program)? witnessProgram, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Payload_PubkeyHash value) pubkeyHash, - required TResult Function(Payload_ScriptHash value) scriptHash, - required TResult Function(Payload_WitnessProgram value) witnessProgram, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Payload_PubkeyHash value)? pubkeyHash, - TResult? Function(Payload_ScriptHash value)? scriptHash, - TResult? Function(Payload_WitnessProgram value)? witnessProgram, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Payload_PubkeyHash value)? pubkeyHash, - TResult Function(Payload_ScriptHash value)? scriptHash, - TResult Function(Payload_WitnessProgram value)? witnessProgram, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PayloadCopyWith<$Res> { - factory $PayloadCopyWith(Payload value, $Res Function(Payload) then) = - _$PayloadCopyWithImpl<$Res, Payload>; -} - -/// @nodoc -class _$PayloadCopyWithImpl<$Res, $Val extends Payload> - implements $PayloadCopyWith<$Res> { - _$PayloadCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$Payload_PubkeyHashImplCopyWith<$Res> { - factory _$$Payload_PubkeyHashImplCopyWith(_$Payload_PubkeyHashImpl value, - $Res Function(_$Payload_PubkeyHashImpl) then) = - __$$Payload_PubkeyHashImplCopyWithImpl<$Res>; - @useResult - $Res call({String pubkeyHash}); -} - -/// @nodoc -class __$$Payload_PubkeyHashImplCopyWithImpl<$Res> - extends _$PayloadCopyWithImpl<$Res, _$Payload_PubkeyHashImpl> - implements _$$Payload_PubkeyHashImplCopyWith<$Res> { - __$$Payload_PubkeyHashImplCopyWithImpl(_$Payload_PubkeyHashImpl _value, - $Res Function(_$Payload_PubkeyHashImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? pubkeyHash = null, - }) { - return _then(_$Payload_PubkeyHashImpl( - pubkeyHash: null == pubkeyHash - ? _value.pubkeyHash - : pubkeyHash // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Payload_PubkeyHashImpl extends Payload_PubkeyHash { - const _$Payload_PubkeyHashImpl({required this.pubkeyHash}) : super._(); - - @override - final String pubkeyHash; - - @override - String toString() { - return 'Payload.pubkeyHash(pubkeyHash: $pubkeyHash)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Payload_PubkeyHashImpl && - (identical(other.pubkeyHash, pubkeyHash) || - other.pubkeyHash == pubkeyHash)); - } - - @override - int get hashCode => Object.hash(runtimeType, pubkeyHash); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Payload_PubkeyHashImplCopyWith<_$Payload_PubkeyHashImpl> get copyWith => - __$$Payload_PubkeyHashImplCopyWithImpl<_$Payload_PubkeyHashImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String pubkeyHash) pubkeyHash, - required TResult Function(String scriptHash) scriptHash, - required TResult Function(WitnessVersion version, Uint8List program) - witnessProgram, - }) { - return pubkeyHash(this.pubkeyHash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String pubkeyHash)? pubkeyHash, - TResult? Function(String scriptHash)? scriptHash, - TResult? Function(WitnessVersion version, Uint8List program)? - witnessProgram, - }) { - return pubkeyHash?.call(this.pubkeyHash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String pubkeyHash)? pubkeyHash, - TResult Function(String scriptHash)? scriptHash, - TResult Function(WitnessVersion version, Uint8List program)? witnessProgram, - required TResult orElse(), - }) { - if (pubkeyHash != null) { - return pubkeyHash(this.pubkeyHash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Payload_PubkeyHash value) pubkeyHash, - required TResult Function(Payload_ScriptHash value) scriptHash, - required TResult Function(Payload_WitnessProgram value) witnessProgram, - }) { - return pubkeyHash(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Payload_PubkeyHash value)? pubkeyHash, - TResult? Function(Payload_ScriptHash value)? scriptHash, - TResult? Function(Payload_WitnessProgram value)? witnessProgram, - }) { - return pubkeyHash?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Payload_PubkeyHash value)? pubkeyHash, - TResult Function(Payload_ScriptHash value)? scriptHash, - TResult Function(Payload_WitnessProgram value)? witnessProgram, - required TResult orElse(), - }) { - if (pubkeyHash != null) { - return pubkeyHash(this); - } - return orElse(); - } -} - -abstract class Payload_PubkeyHash extends Payload { - const factory Payload_PubkeyHash({required final String pubkeyHash}) = - _$Payload_PubkeyHashImpl; - const Payload_PubkeyHash._() : super._(); - - String get pubkeyHash; - @JsonKey(ignore: true) - _$$Payload_PubkeyHashImplCopyWith<_$Payload_PubkeyHashImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$Payload_ScriptHashImplCopyWith<$Res> { - factory _$$Payload_ScriptHashImplCopyWith(_$Payload_ScriptHashImpl value, - $Res Function(_$Payload_ScriptHashImpl) then) = - __$$Payload_ScriptHashImplCopyWithImpl<$Res>; - @useResult - $Res call({String scriptHash}); -} - -/// @nodoc -class __$$Payload_ScriptHashImplCopyWithImpl<$Res> - extends _$PayloadCopyWithImpl<$Res, _$Payload_ScriptHashImpl> - implements _$$Payload_ScriptHashImplCopyWith<$Res> { - __$$Payload_ScriptHashImplCopyWithImpl(_$Payload_ScriptHashImpl _value, - $Res Function(_$Payload_ScriptHashImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? scriptHash = null, - }) { - return _then(_$Payload_ScriptHashImpl( - scriptHash: null == scriptHash - ? _value.scriptHash - : scriptHash // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Payload_ScriptHashImpl extends Payload_ScriptHash { - const _$Payload_ScriptHashImpl({required this.scriptHash}) : super._(); - - @override - final String scriptHash; - - @override - String toString() { - return 'Payload.scriptHash(scriptHash: $scriptHash)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Payload_ScriptHashImpl && - (identical(other.scriptHash, scriptHash) || - other.scriptHash == scriptHash)); - } - - @override - int get hashCode => Object.hash(runtimeType, scriptHash); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Payload_ScriptHashImplCopyWith<_$Payload_ScriptHashImpl> get copyWith => - __$$Payload_ScriptHashImplCopyWithImpl<_$Payload_ScriptHashImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String pubkeyHash) pubkeyHash, - required TResult Function(String scriptHash) scriptHash, - required TResult Function(WitnessVersion version, Uint8List program) - witnessProgram, - }) { - return scriptHash(this.scriptHash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String pubkeyHash)? pubkeyHash, - TResult? Function(String scriptHash)? scriptHash, - TResult? Function(WitnessVersion version, Uint8List program)? - witnessProgram, - }) { - return scriptHash?.call(this.scriptHash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String pubkeyHash)? pubkeyHash, - TResult Function(String scriptHash)? scriptHash, - TResult Function(WitnessVersion version, Uint8List program)? witnessProgram, - required TResult orElse(), - }) { - if (scriptHash != null) { - return scriptHash(this.scriptHash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Payload_PubkeyHash value) pubkeyHash, - required TResult Function(Payload_ScriptHash value) scriptHash, - required TResult Function(Payload_WitnessProgram value) witnessProgram, - }) { - return scriptHash(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Payload_PubkeyHash value)? pubkeyHash, - TResult? Function(Payload_ScriptHash value)? scriptHash, - TResult? Function(Payload_WitnessProgram value)? witnessProgram, - }) { - return scriptHash?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Payload_PubkeyHash value)? pubkeyHash, - TResult Function(Payload_ScriptHash value)? scriptHash, - TResult Function(Payload_WitnessProgram value)? witnessProgram, - required TResult orElse(), - }) { - if (scriptHash != null) { - return scriptHash(this); - } - return orElse(); - } -} - -abstract class Payload_ScriptHash extends Payload { - const factory Payload_ScriptHash({required final String scriptHash}) = - _$Payload_ScriptHashImpl; - const Payload_ScriptHash._() : super._(); - - String get scriptHash; - @JsonKey(ignore: true) - _$$Payload_ScriptHashImplCopyWith<_$Payload_ScriptHashImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$Payload_WitnessProgramImplCopyWith<$Res> { - factory _$$Payload_WitnessProgramImplCopyWith( - _$Payload_WitnessProgramImpl value, - $Res Function(_$Payload_WitnessProgramImpl) then) = - __$$Payload_WitnessProgramImplCopyWithImpl<$Res>; - @useResult - $Res call({WitnessVersion version, Uint8List program}); -} - -/// @nodoc -class __$$Payload_WitnessProgramImplCopyWithImpl<$Res> - extends _$PayloadCopyWithImpl<$Res, _$Payload_WitnessProgramImpl> - implements _$$Payload_WitnessProgramImplCopyWith<$Res> { - __$$Payload_WitnessProgramImplCopyWithImpl( - _$Payload_WitnessProgramImpl _value, - $Res Function(_$Payload_WitnessProgramImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? version = null, - Object? program = null, - }) { - return _then(_$Payload_WitnessProgramImpl( - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as WitnessVersion, - program: null == program - ? _value.program - : program // ignore: cast_nullable_to_non_nullable - as Uint8List, - )); - } -} - -/// @nodoc - -class _$Payload_WitnessProgramImpl extends Payload_WitnessProgram { - const _$Payload_WitnessProgramImpl( - {required this.version, required this.program}) - : super._(); - - /// The witness program version. - @override - final WitnessVersion version; - - /// The witness program. - @override - final Uint8List program; - - @override - String toString() { - return 'Payload.witnessProgram(version: $version, program: $program)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Payload_WitnessProgramImpl && - (identical(other.version, version) || other.version == version) && - const DeepCollectionEquality().equals(other.program, program)); - } - - @override - int get hashCode => Object.hash( - runtimeType, version, const DeepCollectionEquality().hash(program)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Payload_WitnessProgramImplCopyWith<_$Payload_WitnessProgramImpl> - get copyWith => __$$Payload_WitnessProgramImplCopyWithImpl< - _$Payload_WitnessProgramImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String pubkeyHash) pubkeyHash, - required TResult Function(String scriptHash) scriptHash, - required TResult Function(WitnessVersion version, Uint8List program) - witnessProgram, - }) { - return witnessProgram(version, program); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String pubkeyHash)? pubkeyHash, - TResult? Function(String scriptHash)? scriptHash, - TResult? Function(WitnessVersion version, Uint8List program)? - witnessProgram, - }) { - return witnessProgram?.call(version, program); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String pubkeyHash)? pubkeyHash, - TResult Function(String scriptHash)? scriptHash, - TResult Function(WitnessVersion version, Uint8List program)? witnessProgram, - required TResult orElse(), - }) { - if (witnessProgram != null) { - return witnessProgram(version, program); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Payload_PubkeyHash value) pubkeyHash, - required TResult Function(Payload_ScriptHash value) scriptHash, - required TResult Function(Payload_WitnessProgram value) witnessProgram, - }) { - return witnessProgram(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Payload_PubkeyHash value)? pubkeyHash, - TResult? Function(Payload_ScriptHash value)? scriptHash, - TResult? Function(Payload_WitnessProgram value)? witnessProgram, - }) { - return witnessProgram?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Payload_PubkeyHash value)? pubkeyHash, - TResult Function(Payload_ScriptHash value)? scriptHash, - TResult Function(Payload_WitnessProgram value)? witnessProgram, - required TResult orElse(), - }) { - if (witnessProgram != null) { - return witnessProgram(this); - } - return orElse(); - } -} - -abstract class Payload_WitnessProgram extends Payload { - const factory Payload_WitnessProgram( - {required final WitnessVersion version, - required final Uint8List program}) = _$Payload_WitnessProgramImpl; - const Payload_WitnessProgram._() : super._(); - - /// The witness program version. - WitnessVersion get version; - - /// The witness program. - Uint8List get program; - @JsonKey(ignore: true) - _$$Payload_WitnessProgramImplCopyWith<_$Payload_WitnessProgramImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$PkOrF { - String get value => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(String value) pubkey, - required TResult Function(String value) xOnlyPubkey, - required TResult Function(String value) fingerprint, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String value)? pubkey, - TResult? Function(String value)? xOnlyPubkey, - TResult? Function(String value)? fingerprint, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String value)? pubkey, - TResult Function(String value)? xOnlyPubkey, - TResult Function(String value)? fingerprint, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(PkOrF_Pubkey value) pubkey, - required TResult Function(PkOrF_XOnlyPubkey value) xOnlyPubkey, - required TResult Function(PkOrF_Fingerprint value) fingerprint, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PkOrF_Pubkey value)? pubkey, - TResult? Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, - TResult? Function(PkOrF_Fingerprint value)? fingerprint, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PkOrF_Pubkey value)? pubkey, - TResult Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, - TResult Function(PkOrF_Fingerprint value)? fingerprint, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $PkOrFCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PkOrFCopyWith<$Res> { - factory $PkOrFCopyWith(PkOrF value, $Res Function(PkOrF) then) = - _$PkOrFCopyWithImpl<$Res, PkOrF>; - @useResult - $Res call({String value}); -} - -/// @nodoc -class _$PkOrFCopyWithImpl<$Res, $Val extends PkOrF> - implements $PkOrFCopyWith<$Res> { - _$PkOrFCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? value = null, - }) { - return _then(_value.copyWith( - value: null == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$PkOrF_PubkeyImplCopyWith<$Res> - implements $PkOrFCopyWith<$Res> { - factory _$$PkOrF_PubkeyImplCopyWith( - _$PkOrF_PubkeyImpl value, $Res Function(_$PkOrF_PubkeyImpl) then) = - __$$PkOrF_PubkeyImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String value}); -} - -/// @nodoc -class __$$PkOrF_PubkeyImplCopyWithImpl<$Res> - extends _$PkOrFCopyWithImpl<$Res, _$PkOrF_PubkeyImpl> - implements _$$PkOrF_PubkeyImplCopyWith<$Res> { - __$$PkOrF_PubkeyImplCopyWithImpl( - _$PkOrF_PubkeyImpl _value, $Res Function(_$PkOrF_PubkeyImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? value = null, - }) { - return _then(_$PkOrF_PubkeyImpl( - value: null == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$PkOrF_PubkeyImpl extends PkOrF_Pubkey { - const _$PkOrF_PubkeyImpl({required this.value}) : super._(); - - @override - final String value; - - @override - String toString() { - return 'PkOrF.pubkey(value: $value)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PkOrF_PubkeyImpl && - (identical(other.value, value) || other.value == value)); - } - - @override - int get hashCode => Object.hash(runtimeType, value); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$PkOrF_PubkeyImplCopyWith<_$PkOrF_PubkeyImpl> get copyWith => - __$$PkOrF_PubkeyImplCopyWithImpl<_$PkOrF_PubkeyImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String value) pubkey, - required TResult Function(String value) xOnlyPubkey, - required TResult Function(String value) fingerprint, - }) { - return pubkey(value); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String value)? pubkey, - TResult? Function(String value)? xOnlyPubkey, - TResult? Function(String value)? fingerprint, - }) { - return pubkey?.call(value); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String value)? pubkey, - TResult Function(String value)? xOnlyPubkey, - TResult Function(String value)? fingerprint, - required TResult orElse(), - }) { - if (pubkey != null) { - return pubkey(value); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(PkOrF_Pubkey value) pubkey, - required TResult Function(PkOrF_XOnlyPubkey value) xOnlyPubkey, - required TResult Function(PkOrF_Fingerprint value) fingerprint, - }) { - return pubkey(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PkOrF_Pubkey value)? pubkey, - TResult? Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, - TResult? Function(PkOrF_Fingerprint value)? fingerprint, - }) { - return pubkey?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PkOrF_Pubkey value)? pubkey, - TResult Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, - TResult Function(PkOrF_Fingerprint value)? fingerprint, - required TResult orElse(), - }) { - if (pubkey != null) { - return pubkey(this); - } - return orElse(); - } -} - -abstract class PkOrF_Pubkey extends PkOrF { - const factory PkOrF_Pubkey({required final String value}) = - _$PkOrF_PubkeyImpl; - const PkOrF_Pubkey._() : super._(); - - @override - String get value; - @override - @JsonKey(ignore: true) - _$$PkOrF_PubkeyImplCopyWith<_$PkOrF_PubkeyImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$PkOrF_XOnlyPubkeyImplCopyWith<$Res> - implements $PkOrFCopyWith<$Res> { - factory _$$PkOrF_XOnlyPubkeyImplCopyWith(_$PkOrF_XOnlyPubkeyImpl value, - $Res Function(_$PkOrF_XOnlyPubkeyImpl) then) = - __$$PkOrF_XOnlyPubkeyImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String value}); -} - -/// @nodoc -class __$$PkOrF_XOnlyPubkeyImplCopyWithImpl<$Res> - extends _$PkOrFCopyWithImpl<$Res, _$PkOrF_XOnlyPubkeyImpl> - implements _$$PkOrF_XOnlyPubkeyImplCopyWith<$Res> { - __$$PkOrF_XOnlyPubkeyImplCopyWithImpl(_$PkOrF_XOnlyPubkeyImpl _value, - $Res Function(_$PkOrF_XOnlyPubkeyImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? value = null, - }) { - return _then(_$PkOrF_XOnlyPubkeyImpl( - value: null == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$PkOrF_XOnlyPubkeyImpl extends PkOrF_XOnlyPubkey { - const _$PkOrF_XOnlyPubkeyImpl({required this.value}) : super._(); - - @override - final String value; - - @override - String toString() { - return 'PkOrF.xOnlyPubkey(value: $value)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PkOrF_XOnlyPubkeyImpl && - (identical(other.value, value) || other.value == value)); - } - - @override - int get hashCode => Object.hash(runtimeType, value); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$PkOrF_XOnlyPubkeyImplCopyWith<_$PkOrF_XOnlyPubkeyImpl> get copyWith => - __$$PkOrF_XOnlyPubkeyImplCopyWithImpl<_$PkOrF_XOnlyPubkeyImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String value) pubkey, - required TResult Function(String value) xOnlyPubkey, - required TResult Function(String value) fingerprint, - }) { - return xOnlyPubkey(value); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String value)? pubkey, - TResult? Function(String value)? xOnlyPubkey, - TResult? Function(String value)? fingerprint, - }) { - return xOnlyPubkey?.call(value); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String value)? pubkey, - TResult Function(String value)? xOnlyPubkey, - TResult Function(String value)? fingerprint, - required TResult orElse(), - }) { - if (xOnlyPubkey != null) { - return xOnlyPubkey(value); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(PkOrF_Pubkey value) pubkey, - required TResult Function(PkOrF_XOnlyPubkey value) xOnlyPubkey, - required TResult Function(PkOrF_Fingerprint value) fingerprint, - }) { - return xOnlyPubkey(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PkOrF_Pubkey value)? pubkey, - TResult? Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, - TResult? Function(PkOrF_Fingerprint value)? fingerprint, - }) { - return xOnlyPubkey?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PkOrF_Pubkey value)? pubkey, - TResult Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, - TResult Function(PkOrF_Fingerprint value)? fingerprint, - required TResult orElse(), - }) { - if (xOnlyPubkey != null) { - return xOnlyPubkey(this); - } - return orElse(); - } -} - -abstract class PkOrF_XOnlyPubkey extends PkOrF { - const factory PkOrF_XOnlyPubkey({required final String value}) = - _$PkOrF_XOnlyPubkeyImpl; - const PkOrF_XOnlyPubkey._() : super._(); - - @override - String get value; - @override - @JsonKey(ignore: true) - _$$PkOrF_XOnlyPubkeyImplCopyWith<_$PkOrF_XOnlyPubkeyImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$PkOrF_FingerprintImplCopyWith<$Res> - implements $PkOrFCopyWith<$Res> { - factory _$$PkOrF_FingerprintImplCopyWith(_$PkOrF_FingerprintImpl value, - $Res Function(_$PkOrF_FingerprintImpl) then) = - __$$PkOrF_FingerprintImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String value}); -} - -/// @nodoc -class __$$PkOrF_FingerprintImplCopyWithImpl<$Res> - extends _$PkOrFCopyWithImpl<$Res, _$PkOrF_FingerprintImpl> - implements _$$PkOrF_FingerprintImplCopyWith<$Res> { - __$$PkOrF_FingerprintImplCopyWithImpl(_$PkOrF_FingerprintImpl _value, - $Res Function(_$PkOrF_FingerprintImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? value = null, - }) { - return _then(_$PkOrF_FingerprintImpl( - value: null == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$PkOrF_FingerprintImpl extends PkOrF_Fingerprint { - const _$PkOrF_FingerprintImpl({required this.value}) : super._(); - - @override - final String value; - - @override - String toString() { - return 'PkOrF.fingerprint(value: $value)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PkOrF_FingerprintImpl && - (identical(other.value, value) || other.value == value)); - } - - @override - int get hashCode => Object.hash(runtimeType, value); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$PkOrF_FingerprintImplCopyWith<_$PkOrF_FingerprintImpl> get copyWith => - __$$PkOrF_FingerprintImplCopyWithImpl<_$PkOrF_FingerprintImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String value) pubkey, - required TResult Function(String value) xOnlyPubkey, - required TResult Function(String value) fingerprint, - }) { - return fingerprint(value); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String value)? pubkey, - TResult? Function(String value)? xOnlyPubkey, - TResult? Function(String value)? fingerprint, - }) { - return fingerprint?.call(value); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String value)? pubkey, - TResult Function(String value)? xOnlyPubkey, - TResult Function(String value)? fingerprint, - required TResult orElse(), - }) { - if (fingerprint != null) { - return fingerprint(value); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(PkOrF_Pubkey value) pubkey, - required TResult Function(PkOrF_XOnlyPubkey value) xOnlyPubkey, - required TResult Function(PkOrF_Fingerprint value) fingerprint, - }) { - return fingerprint(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PkOrF_Pubkey value)? pubkey, - TResult? Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, - TResult? Function(PkOrF_Fingerprint value)? fingerprint, - }) { - return fingerprint?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PkOrF_Pubkey value)? pubkey, - TResult Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, - TResult Function(PkOrF_Fingerprint value)? fingerprint, - required TResult orElse(), - }) { - if (fingerprint != null) { - return fingerprint(this); - } - return orElse(); - } -} - -abstract class PkOrF_Fingerprint extends PkOrF { - const factory PkOrF_Fingerprint({required final String value}) = - _$PkOrF_FingerprintImpl; - const PkOrF_Fingerprint._() : super._(); - - @override - String get value; - @override - @JsonKey(ignore: true) - _$$PkOrF_FingerprintImplCopyWith<_$PkOrF_FingerprintImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$RbfValue { - @optionalTypeArgs - TResult when({ - required TResult Function() rbfDefault, - required TResult Function(int field0) value, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? rbfDefault, - TResult? Function(int field0)? value, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? rbfDefault, - TResult Function(int field0)? value, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(RbfValue_RbfDefault value) rbfDefault, - required TResult Function(RbfValue_Value value) value, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(RbfValue_RbfDefault value)? rbfDefault, - TResult? Function(RbfValue_Value value)? value, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(RbfValue_RbfDefault value)? rbfDefault, - TResult Function(RbfValue_Value value)? value, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $RbfValueCopyWith<$Res> { - factory $RbfValueCopyWith(RbfValue value, $Res Function(RbfValue) then) = - _$RbfValueCopyWithImpl<$Res, RbfValue>; -} - -/// @nodoc -class _$RbfValueCopyWithImpl<$Res, $Val extends RbfValue> - implements $RbfValueCopyWith<$Res> { - _$RbfValueCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$RbfValue_RbfDefaultImplCopyWith<$Res> { - factory _$$RbfValue_RbfDefaultImplCopyWith(_$RbfValue_RbfDefaultImpl value, - $Res Function(_$RbfValue_RbfDefaultImpl) then) = - __$$RbfValue_RbfDefaultImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$RbfValue_RbfDefaultImplCopyWithImpl<$Res> - extends _$RbfValueCopyWithImpl<$Res, _$RbfValue_RbfDefaultImpl> - implements _$$RbfValue_RbfDefaultImplCopyWith<$Res> { - __$$RbfValue_RbfDefaultImplCopyWithImpl(_$RbfValue_RbfDefaultImpl _value, - $Res Function(_$RbfValue_RbfDefaultImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$RbfValue_RbfDefaultImpl extends RbfValue_RbfDefault { - const _$RbfValue_RbfDefaultImpl() : super._(); - - @override - String toString() { - return 'RbfValue.rbfDefault()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$RbfValue_RbfDefaultImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() rbfDefault, - required TResult Function(int field0) value, - }) { - return rbfDefault(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? rbfDefault, - TResult? Function(int field0)? value, - }) { - return rbfDefault?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? rbfDefault, - TResult Function(int field0)? value, - required TResult orElse(), - }) { - if (rbfDefault != null) { - return rbfDefault(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(RbfValue_RbfDefault value) rbfDefault, - required TResult Function(RbfValue_Value value) value, - }) { - return rbfDefault(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(RbfValue_RbfDefault value)? rbfDefault, - TResult? Function(RbfValue_Value value)? value, - }) { - return rbfDefault?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(RbfValue_RbfDefault value)? rbfDefault, - TResult Function(RbfValue_Value value)? value, - required TResult orElse(), - }) { - if (rbfDefault != null) { - return rbfDefault(this); - } - return orElse(); - } -} - -abstract class RbfValue_RbfDefault extends RbfValue { - const factory RbfValue_RbfDefault() = _$RbfValue_RbfDefaultImpl; - const RbfValue_RbfDefault._() : super._(); -} - -/// @nodoc -abstract class _$$RbfValue_ValueImplCopyWith<$Res> { - factory _$$RbfValue_ValueImplCopyWith(_$RbfValue_ValueImpl value, - $Res Function(_$RbfValue_ValueImpl) then) = - __$$RbfValue_ValueImplCopyWithImpl<$Res>; - @useResult - $Res call({int field0}); -} - -/// @nodoc -class __$$RbfValue_ValueImplCopyWithImpl<$Res> - extends _$RbfValueCopyWithImpl<$Res, _$RbfValue_ValueImpl> - implements _$$RbfValue_ValueImplCopyWith<$Res> { - __$$RbfValue_ValueImplCopyWithImpl( - _$RbfValue_ValueImpl _value, $Res Function(_$RbfValue_ValueImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$RbfValue_ValueImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$RbfValue_ValueImpl extends RbfValue_Value { - const _$RbfValue_ValueImpl(this.field0) : super._(); - - @override - final int field0; - - @override - String toString() { - return 'RbfValue.value(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$RbfValue_ValueImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$RbfValue_ValueImplCopyWith<_$RbfValue_ValueImpl> get copyWith => - __$$RbfValue_ValueImplCopyWithImpl<_$RbfValue_ValueImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() rbfDefault, - required TResult Function(int field0) value, - }) { - return value(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? rbfDefault, - TResult? Function(int field0)? value, - }) { - return value?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? rbfDefault, - TResult Function(int field0)? value, - required TResult orElse(), - }) { - if (value != null) { - return value(field0); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(RbfValue_RbfDefault value) rbfDefault, - required TResult Function(RbfValue_Value value) value, - }) { - return value(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(RbfValue_RbfDefault value)? rbfDefault, - TResult? Function(RbfValue_Value value)? value, - }) { - return value?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(RbfValue_RbfDefault value)? rbfDefault, - TResult Function(RbfValue_Value value)? value, - required TResult orElse(), - }) { - if (value != null) { - return value(this); - } - return orElse(); - } -} - -abstract class RbfValue_Value extends RbfValue { - const factory RbfValue_Value(final int field0) = _$RbfValue_ValueImpl; - const RbfValue_Value._() : super._(); - - int get field0; - @JsonKey(ignore: true) - _$$RbfValue_ValueImplCopyWith<_$RbfValue_ValueImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$Satisfaction { - @optionalTypeArgs - TResult when({ - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partial, - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partialComplete, - required TResult Function(Condition condition) complete, - required TResult Function(String msg) none, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult? Function(Condition condition)? complete, - TResult? Function(String msg)? none, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult Function(Condition condition)? complete, - TResult Function(String msg)? none, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Satisfaction_Partial value) partial, - required TResult Function(Satisfaction_PartialComplete value) - partialComplete, - required TResult Function(Satisfaction_Complete value) complete, - required TResult Function(Satisfaction_None value) none, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Satisfaction_Partial value)? partial, - TResult? Function(Satisfaction_PartialComplete value)? partialComplete, - TResult? Function(Satisfaction_Complete value)? complete, - TResult? Function(Satisfaction_None value)? none, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Satisfaction_Partial value)? partial, - TResult Function(Satisfaction_PartialComplete value)? partialComplete, - TResult Function(Satisfaction_Complete value)? complete, - TResult Function(Satisfaction_None value)? none, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SatisfactionCopyWith<$Res> { - factory $SatisfactionCopyWith( - Satisfaction value, $Res Function(Satisfaction) then) = - _$SatisfactionCopyWithImpl<$Res, Satisfaction>; -} - -/// @nodoc -class _$SatisfactionCopyWithImpl<$Res, $Val extends Satisfaction> - implements $SatisfactionCopyWith<$Res> { - _$SatisfactionCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$Satisfaction_PartialImplCopyWith<$Res> { - factory _$$Satisfaction_PartialImplCopyWith(_$Satisfaction_PartialImpl value, - $Res Function(_$Satisfaction_PartialImpl) then) = - __$$Satisfaction_PartialImplCopyWithImpl<$Res>; - @useResult - $Res call( - {BigInt n, - BigInt m, - Uint64List items, - bool? sorted, - Map> conditions}); -} - -/// @nodoc -class __$$Satisfaction_PartialImplCopyWithImpl<$Res> - extends _$SatisfactionCopyWithImpl<$Res, _$Satisfaction_PartialImpl> - implements _$$Satisfaction_PartialImplCopyWith<$Res> { - __$$Satisfaction_PartialImplCopyWithImpl(_$Satisfaction_PartialImpl _value, - $Res Function(_$Satisfaction_PartialImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? n = null, - Object? m = null, - Object? items = null, - Object? sorted = freezed, - Object? conditions = null, - }) { - return _then(_$Satisfaction_PartialImpl( - n: null == n - ? _value.n - : n // ignore: cast_nullable_to_non_nullable - as BigInt, - m: null == m - ? _value.m - : m // ignore: cast_nullable_to_non_nullable - as BigInt, - items: null == items - ? _value.items - : items // ignore: cast_nullable_to_non_nullable - as Uint64List, - sorted: freezed == sorted - ? _value.sorted - : sorted // ignore: cast_nullable_to_non_nullable - as bool?, - conditions: null == conditions - ? _value._conditions - : conditions // ignore: cast_nullable_to_non_nullable - as Map>, - )); - } -} - -/// @nodoc - -class _$Satisfaction_PartialImpl extends Satisfaction_Partial { - const _$Satisfaction_PartialImpl( - {required this.n, - required this.m, - required this.items, - this.sorted, - required final Map> conditions}) - : _conditions = conditions, - super._(); - - @override - final BigInt n; - @override - final BigInt m; - @override - final Uint64List items; - @override - final bool? sorted; - final Map> _conditions; - @override - Map> get conditions { - if (_conditions is EqualUnmodifiableMapView) return _conditions; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_conditions); - } - - @override - String toString() { - return 'Satisfaction.partial(n: $n, m: $m, items: $items, sorted: $sorted, conditions: $conditions)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Satisfaction_PartialImpl && - (identical(other.n, n) || other.n == n) && - (identical(other.m, m) || other.m == m) && - const DeepCollectionEquality().equals(other.items, items) && - (identical(other.sorted, sorted) || other.sorted == sorted) && - const DeepCollectionEquality() - .equals(other._conditions, _conditions)); - } - - @override - int get hashCode => Object.hash( - runtimeType, - n, - m, - const DeepCollectionEquality().hash(items), - sorted, - const DeepCollectionEquality().hash(_conditions)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Satisfaction_PartialImplCopyWith<_$Satisfaction_PartialImpl> - get copyWith => - __$$Satisfaction_PartialImplCopyWithImpl<_$Satisfaction_PartialImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partial, - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partialComplete, - required TResult Function(Condition condition) complete, - required TResult Function(String msg) none, - }) { - return partial(n, m, items, sorted, conditions); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult? Function(Condition condition)? complete, - TResult? Function(String msg)? none, - }) { - return partial?.call(n, m, items, sorted, conditions); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult Function(Condition condition)? complete, - TResult Function(String msg)? none, - required TResult orElse(), - }) { - if (partial != null) { - return partial(n, m, items, sorted, conditions); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Satisfaction_Partial value) partial, - required TResult Function(Satisfaction_PartialComplete value) - partialComplete, - required TResult Function(Satisfaction_Complete value) complete, - required TResult Function(Satisfaction_None value) none, - }) { - return partial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Satisfaction_Partial value)? partial, - TResult? Function(Satisfaction_PartialComplete value)? partialComplete, - TResult? Function(Satisfaction_Complete value)? complete, - TResult? Function(Satisfaction_None value)? none, - }) { - return partial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Satisfaction_Partial value)? partial, - TResult Function(Satisfaction_PartialComplete value)? partialComplete, - TResult Function(Satisfaction_Complete value)? complete, - TResult Function(Satisfaction_None value)? none, - required TResult orElse(), - }) { - if (partial != null) { - return partial(this); - } - return orElse(); - } -} - -abstract class Satisfaction_Partial extends Satisfaction { - const factory Satisfaction_Partial( - {required final BigInt n, - required final BigInt m, - required final Uint64List items, - final bool? sorted, - required final Map> conditions}) = - _$Satisfaction_PartialImpl; - const Satisfaction_Partial._() : super._(); - - BigInt get n; - BigInt get m; - Uint64List get items; - bool? get sorted; - Map> get conditions; - @JsonKey(ignore: true) - _$$Satisfaction_PartialImplCopyWith<_$Satisfaction_PartialImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$Satisfaction_PartialCompleteImplCopyWith<$Res> { - factory _$$Satisfaction_PartialCompleteImplCopyWith( - _$Satisfaction_PartialCompleteImpl value, - $Res Function(_$Satisfaction_PartialCompleteImpl) then) = - __$$Satisfaction_PartialCompleteImplCopyWithImpl<$Res>; - @useResult - $Res call( - {BigInt n, - BigInt m, - Uint64List items, - bool? sorted, - Map> conditions}); -} - -/// @nodoc -class __$$Satisfaction_PartialCompleteImplCopyWithImpl<$Res> - extends _$SatisfactionCopyWithImpl<$Res, _$Satisfaction_PartialCompleteImpl> - implements _$$Satisfaction_PartialCompleteImplCopyWith<$Res> { - __$$Satisfaction_PartialCompleteImplCopyWithImpl( - _$Satisfaction_PartialCompleteImpl _value, - $Res Function(_$Satisfaction_PartialCompleteImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? n = null, - Object? m = null, - Object? items = null, - Object? sorted = freezed, - Object? conditions = null, - }) { - return _then(_$Satisfaction_PartialCompleteImpl( - n: null == n - ? _value.n - : n // ignore: cast_nullable_to_non_nullable - as BigInt, - m: null == m - ? _value.m - : m // ignore: cast_nullable_to_non_nullable - as BigInt, - items: null == items - ? _value.items - : items // ignore: cast_nullable_to_non_nullable - as Uint64List, - sorted: freezed == sorted - ? _value.sorted - : sorted // ignore: cast_nullable_to_non_nullable - as bool?, - conditions: null == conditions - ? _value._conditions - : conditions // ignore: cast_nullable_to_non_nullable - as Map>, - )); - } -} - -/// @nodoc - -class _$Satisfaction_PartialCompleteImpl extends Satisfaction_PartialComplete { - const _$Satisfaction_PartialCompleteImpl( - {required this.n, - required this.m, - required this.items, - this.sorted, - required final Map> conditions}) - : _conditions = conditions, - super._(); - - @override - final BigInt n; - @override - final BigInt m; - @override - final Uint64List items; - @override - final bool? sorted; - final Map> _conditions; - @override - Map> get conditions { - if (_conditions is EqualUnmodifiableMapView) return _conditions; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_conditions); - } - - @override - String toString() { - return 'Satisfaction.partialComplete(n: $n, m: $m, items: $items, sorted: $sorted, conditions: $conditions)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Satisfaction_PartialCompleteImpl && - (identical(other.n, n) || other.n == n) && - (identical(other.m, m) || other.m == m) && - const DeepCollectionEquality().equals(other.items, items) && - (identical(other.sorted, sorted) || other.sorted == sorted) && - const DeepCollectionEquality() - .equals(other._conditions, _conditions)); - } - - @override - int get hashCode => Object.hash( - runtimeType, - n, - m, - const DeepCollectionEquality().hash(items), - sorted, - const DeepCollectionEquality().hash(_conditions)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Satisfaction_PartialCompleteImplCopyWith< - _$Satisfaction_PartialCompleteImpl> - get copyWith => __$$Satisfaction_PartialCompleteImplCopyWithImpl< - _$Satisfaction_PartialCompleteImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partial, - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partialComplete, - required TResult Function(Condition condition) complete, - required TResult Function(String msg) none, - }) { - return partialComplete(n, m, items, sorted, conditions); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult? Function(Condition condition)? complete, - TResult? Function(String msg)? none, - }) { - return partialComplete?.call(n, m, items, sorted, conditions); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult Function(Condition condition)? complete, - TResult Function(String msg)? none, - required TResult orElse(), - }) { - if (partialComplete != null) { - return partialComplete(n, m, items, sorted, conditions); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Satisfaction_Partial value) partial, - required TResult Function(Satisfaction_PartialComplete value) - partialComplete, - required TResult Function(Satisfaction_Complete value) complete, - required TResult Function(Satisfaction_None value) none, - }) { - return partialComplete(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Satisfaction_Partial value)? partial, - TResult? Function(Satisfaction_PartialComplete value)? partialComplete, - TResult? Function(Satisfaction_Complete value)? complete, - TResult? Function(Satisfaction_None value)? none, - }) { - return partialComplete?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Satisfaction_Partial value)? partial, - TResult Function(Satisfaction_PartialComplete value)? partialComplete, - TResult Function(Satisfaction_Complete value)? complete, - TResult Function(Satisfaction_None value)? none, - required TResult orElse(), - }) { - if (partialComplete != null) { - return partialComplete(this); - } - return orElse(); - } -} - -abstract class Satisfaction_PartialComplete extends Satisfaction { - const factory Satisfaction_PartialComplete( - {required final BigInt n, - required final BigInt m, - required final Uint64List items, - final bool? sorted, - required final Map> conditions}) = - _$Satisfaction_PartialCompleteImpl; - const Satisfaction_PartialComplete._() : super._(); - - BigInt get n; - BigInt get m; - Uint64List get items; - bool? get sorted; - Map> get conditions; - @JsonKey(ignore: true) - _$$Satisfaction_PartialCompleteImplCopyWith< - _$Satisfaction_PartialCompleteImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$Satisfaction_CompleteImplCopyWith<$Res> { - factory _$$Satisfaction_CompleteImplCopyWith( - _$Satisfaction_CompleteImpl value, - $Res Function(_$Satisfaction_CompleteImpl) then) = - __$$Satisfaction_CompleteImplCopyWithImpl<$Res>; - @useResult - $Res call({Condition condition}); -} - -/// @nodoc -class __$$Satisfaction_CompleteImplCopyWithImpl<$Res> - extends _$SatisfactionCopyWithImpl<$Res, _$Satisfaction_CompleteImpl> - implements _$$Satisfaction_CompleteImplCopyWith<$Res> { - __$$Satisfaction_CompleteImplCopyWithImpl(_$Satisfaction_CompleteImpl _value, - $Res Function(_$Satisfaction_CompleteImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? condition = null, - }) { - return _then(_$Satisfaction_CompleteImpl( - condition: null == condition - ? _value.condition - : condition // ignore: cast_nullable_to_non_nullable - as Condition, - )); - } -} - -/// @nodoc - -class _$Satisfaction_CompleteImpl extends Satisfaction_Complete { - const _$Satisfaction_CompleteImpl({required this.condition}) : super._(); - - @override - final Condition condition; - - @override - String toString() { - return 'Satisfaction.complete(condition: $condition)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Satisfaction_CompleteImpl && - (identical(other.condition, condition) || - other.condition == condition)); - } - - @override - int get hashCode => Object.hash(runtimeType, condition); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Satisfaction_CompleteImplCopyWith<_$Satisfaction_CompleteImpl> - get copyWith => __$$Satisfaction_CompleteImplCopyWithImpl< - _$Satisfaction_CompleteImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partial, - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partialComplete, - required TResult Function(Condition condition) complete, - required TResult Function(String msg) none, - }) { - return complete(condition); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult? Function(Condition condition)? complete, - TResult? Function(String msg)? none, - }) { - return complete?.call(condition); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult Function(Condition condition)? complete, - TResult Function(String msg)? none, - required TResult orElse(), - }) { - if (complete != null) { - return complete(condition); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Satisfaction_Partial value) partial, - required TResult Function(Satisfaction_PartialComplete value) - partialComplete, - required TResult Function(Satisfaction_Complete value) complete, - required TResult Function(Satisfaction_None value) none, - }) { - return complete(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Satisfaction_Partial value)? partial, - TResult? Function(Satisfaction_PartialComplete value)? partialComplete, - TResult? Function(Satisfaction_Complete value)? complete, - TResult? Function(Satisfaction_None value)? none, - }) { - return complete?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Satisfaction_Partial value)? partial, - TResult Function(Satisfaction_PartialComplete value)? partialComplete, - TResult Function(Satisfaction_Complete value)? complete, - TResult Function(Satisfaction_None value)? none, - required TResult orElse(), - }) { - if (complete != null) { - return complete(this); - } - return orElse(); - } -} - -abstract class Satisfaction_Complete extends Satisfaction { - const factory Satisfaction_Complete({required final Condition condition}) = - _$Satisfaction_CompleteImpl; - const Satisfaction_Complete._() : super._(); - - Condition get condition; - @JsonKey(ignore: true) - _$$Satisfaction_CompleteImplCopyWith<_$Satisfaction_CompleteImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$Satisfaction_NoneImplCopyWith<$Res> { - factory _$$Satisfaction_NoneImplCopyWith(_$Satisfaction_NoneImpl value, - $Res Function(_$Satisfaction_NoneImpl) then) = - __$$Satisfaction_NoneImplCopyWithImpl<$Res>; - @useResult - $Res call({String msg}); -} - -/// @nodoc -class __$$Satisfaction_NoneImplCopyWithImpl<$Res> - extends _$SatisfactionCopyWithImpl<$Res, _$Satisfaction_NoneImpl> - implements _$$Satisfaction_NoneImplCopyWith<$Res> { - __$$Satisfaction_NoneImplCopyWithImpl(_$Satisfaction_NoneImpl _value, - $Res Function(_$Satisfaction_NoneImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? msg = null, - }) { - return _then(_$Satisfaction_NoneImpl( - msg: null == msg - ? _value.msg - : msg // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Satisfaction_NoneImpl extends Satisfaction_None { - const _$Satisfaction_NoneImpl({required this.msg}) : super._(); - - @override - final String msg; - - @override - String toString() { - return 'Satisfaction.none(msg: $msg)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Satisfaction_NoneImpl && - (identical(other.msg, msg) || other.msg == msg)); - } - - @override - int get hashCode => Object.hash(runtimeType, msg); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Satisfaction_NoneImplCopyWith<_$Satisfaction_NoneImpl> get copyWith => - __$$Satisfaction_NoneImplCopyWithImpl<_$Satisfaction_NoneImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partial, - required TResult Function(BigInt n, BigInt m, Uint64List items, - bool? sorted, Map> conditions) - partialComplete, - required TResult Function(Condition condition) complete, - required TResult Function(String msg) none, - }) { - return none(msg); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult? Function(Condition condition)? complete, - TResult? Function(String msg)? none, - }) { - return none?.call(msg); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partial, - TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, - Map> conditions)? - partialComplete, - TResult Function(Condition condition)? complete, - TResult Function(String msg)? none, - required TResult orElse(), - }) { - if (none != null) { - return none(msg); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Satisfaction_Partial value) partial, - required TResult Function(Satisfaction_PartialComplete value) - partialComplete, - required TResult Function(Satisfaction_Complete value) complete, - required TResult Function(Satisfaction_None value) none, - }) { - return none(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Satisfaction_Partial value)? partial, - TResult? Function(Satisfaction_PartialComplete value)? partialComplete, - TResult? Function(Satisfaction_Complete value)? complete, - TResult? Function(Satisfaction_None value)? none, - }) { - return none?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Satisfaction_Partial value)? partial, - TResult Function(Satisfaction_PartialComplete value)? partialComplete, - TResult Function(Satisfaction_Complete value)? complete, - TResult Function(Satisfaction_None value)? none, - required TResult orElse(), - }) { - if (none != null) { - return none(this); - } - return orElse(); - } -} - -abstract class Satisfaction_None extends Satisfaction { - const factory Satisfaction_None({required final String msg}) = - _$Satisfaction_NoneImpl; - const Satisfaction_None._() : super._(); - - String get msg; - @JsonKey(ignore: true) - _$$Satisfaction_NoneImplCopyWith<_$Satisfaction_NoneImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$SatisfiableItem { - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SatisfiableItemCopyWith<$Res> { - factory $SatisfiableItemCopyWith( - SatisfiableItem value, $Res Function(SatisfiableItem) then) = - _$SatisfiableItemCopyWithImpl<$Res, SatisfiableItem>; -} - -/// @nodoc -class _$SatisfiableItemCopyWithImpl<$Res, $Val extends SatisfiableItem> - implements $SatisfiableItemCopyWith<$Res> { - _$SatisfiableItemCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$SatisfiableItem_EcdsaSignatureImplCopyWith<$Res> { - factory _$$SatisfiableItem_EcdsaSignatureImplCopyWith( - _$SatisfiableItem_EcdsaSignatureImpl value, - $Res Function(_$SatisfiableItem_EcdsaSignatureImpl) then) = - __$$SatisfiableItem_EcdsaSignatureImplCopyWithImpl<$Res>; - @useResult - $Res call({PkOrF key}); - - $PkOrFCopyWith<$Res> get key; -} - -/// @nodoc -class __$$SatisfiableItem_EcdsaSignatureImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, - _$SatisfiableItem_EcdsaSignatureImpl> - implements _$$SatisfiableItem_EcdsaSignatureImplCopyWith<$Res> { - __$$SatisfiableItem_EcdsaSignatureImplCopyWithImpl( - _$SatisfiableItem_EcdsaSignatureImpl _value, - $Res Function(_$SatisfiableItem_EcdsaSignatureImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? key = null, - }) { - return _then(_$SatisfiableItem_EcdsaSignatureImpl( - key: null == key - ? _value.key - : key // ignore: cast_nullable_to_non_nullable - as PkOrF, - )); - } - - @override - @pragma('vm:prefer-inline') - $PkOrFCopyWith<$Res> get key { - return $PkOrFCopyWith<$Res>(_value.key, (value) { - return _then(_value.copyWith(key: value)); - }); - } -} - -/// @nodoc - -class _$SatisfiableItem_EcdsaSignatureImpl - extends SatisfiableItem_EcdsaSignature { - const _$SatisfiableItem_EcdsaSignatureImpl({required this.key}) : super._(); - - @override - final PkOrF key; - - @override - String toString() { - return 'SatisfiableItem.ecdsaSignature(key: $key)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_EcdsaSignatureImpl && - (identical(other.key, key) || other.key == key)); - } - - @override - int get hashCode => Object.hash(runtimeType, key); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_EcdsaSignatureImplCopyWith< - _$SatisfiableItem_EcdsaSignatureImpl> - get copyWith => __$$SatisfiableItem_EcdsaSignatureImplCopyWithImpl< - _$SatisfiableItem_EcdsaSignatureImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return ecdsaSignature(key); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return ecdsaSignature?.call(key); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (ecdsaSignature != null) { - return ecdsaSignature(key); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return ecdsaSignature(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return ecdsaSignature?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (ecdsaSignature != null) { - return ecdsaSignature(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_EcdsaSignature extends SatisfiableItem { - const factory SatisfiableItem_EcdsaSignature({required final PkOrF key}) = - _$SatisfiableItem_EcdsaSignatureImpl; - const SatisfiableItem_EcdsaSignature._() : super._(); - - PkOrF get key; - @JsonKey(ignore: true) - _$$SatisfiableItem_EcdsaSignatureImplCopyWith< - _$SatisfiableItem_EcdsaSignatureImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SatisfiableItem_SchnorrSignatureImplCopyWith<$Res> { - factory _$$SatisfiableItem_SchnorrSignatureImplCopyWith( - _$SatisfiableItem_SchnorrSignatureImpl value, - $Res Function(_$SatisfiableItem_SchnorrSignatureImpl) then) = - __$$SatisfiableItem_SchnorrSignatureImplCopyWithImpl<$Res>; - @useResult - $Res call({PkOrF key}); - - $PkOrFCopyWith<$Res> get key; -} - -/// @nodoc -class __$$SatisfiableItem_SchnorrSignatureImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, - _$SatisfiableItem_SchnorrSignatureImpl> - implements _$$SatisfiableItem_SchnorrSignatureImplCopyWith<$Res> { - __$$SatisfiableItem_SchnorrSignatureImplCopyWithImpl( - _$SatisfiableItem_SchnorrSignatureImpl _value, - $Res Function(_$SatisfiableItem_SchnorrSignatureImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? key = null, - }) { - return _then(_$SatisfiableItem_SchnorrSignatureImpl( - key: null == key - ? _value.key - : key // ignore: cast_nullable_to_non_nullable - as PkOrF, - )); - } - - @override - @pragma('vm:prefer-inline') - $PkOrFCopyWith<$Res> get key { - return $PkOrFCopyWith<$Res>(_value.key, (value) { - return _then(_value.copyWith(key: value)); - }); - } -} - -/// @nodoc - -class _$SatisfiableItem_SchnorrSignatureImpl - extends SatisfiableItem_SchnorrSignature { - const _$SatisfiableItem_SchnorrSignatureImpl({required this.key}) : super._(); - - @override - final PkOrF key; - - @override - String toString() { - return 'SatisfiableItem.schnorrSignature(key: $key)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_SchnorrSignatureImpl && - (identical(other.key, key) || other.key == key)); - } - - @override - int get hashCode => Object.hash(runtimeType, key); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_SchnorrSignatureImplCopyWith< - _$SatisfiableItem_SchnorrSignatureImpl> - get copyWith => __$$SatisfiableItem_SchnorrSignatureImplCopyWithImpl< - _$SatisfiableItem_SchnorrSignatureImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return schnorrSignature(key); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return schnorrSignature?.call(key); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (schnorrSignature != null) { - return schnorrSignature(key); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return schnorrSignature(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return schnorrSignature?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (schnorrSignature != null) { - return schnorrSignature(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_SchnorrSignature extends SatisfiableItem { - const factory SatisfiableItem_SchnorrSignature({required final PkOrF key}) = - _$SatisfiableItem_SchnorrSignatureImpl; - const SatisfiableItem_SchnorrSignature._() : super._(); - - PkOrF get key; - @JsonKey(ignore: true) - _$$SatisfiableItem_SchnorrSignatureImplCopyWith< - _$SatisfiableItem_SchnorrSignatureImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SatisfiableItem_Sha256PreimageImplCopyWith<$Res> { - factory _$$SatisfiableItem_Sha256PreimageImplCopyWith( - _$SatisfiableItem_Sha256PreimageImpl value, - $Res Function(_$SatisfiableItem_Sha256PreimageImpl) then) = - __$$SatisfiableItem_Sha256PreimageImplCopyWithImpl<$Res>; - @useResult - $Res call({String hash}); -} - -/// @nodoc -class __$$SatisfiableItem_Sha256PreimageImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, - _$SatisfiableItem_Sha256PreimageImpl> - implements _$$SatisfiableItem_Sha256PreimageImplCopyWith<$Res> { - __$$SatisfiableItem_Sha256PreimageImplCopyWithImpl( - _$SatisfiableItem_Sha256PreimageImpl _value, - $Res Function(_$SatisfiableItem_Sha256PreimageImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? hash = null, - }) { - return _then(_$SatisfiableItem_Sha256PreimageImpl( - hash: null == hash - ? _value.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$SatisfiableItem_Sha256PreimageImpl - extends SatisfiableItem_Sha256Preimage { - const _$SatisfiableItem_Sha256PreimageImpl({required this.hash}) : super._(); - - @override - final String hash; - - @override - String toString() { - return 'SatisfiableItem.sha256Preimage(hash: $hash)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_Sha256PreimageImpl && - (identical(other.hash, hash) || other.hash == hash)); - } - - @override - int get hashCode => Object.hash(runtimeType, hash); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_Sha256PreimageImplCopyWith< - _$SatisfiableItem_Sha256PreimageImpl> - get copyWith => __$$SatisfiableItem_Sha256PreimageImplCopyWithImpl< - _$SatisfiableItem_Sha256PreimageImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return sha256Preimage(hash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return sha256Preimage?.call(hash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (sha256Preimage != null) { - return sha256Preimage(hash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return sha256Preimage(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return sha256Preimage?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (sha256Preimage != null) { - return sha256Preimage(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_Sha256Preimage extends SatisfiableItem { - const factory SatisfiableItem_Sha256Preimage({required final String hash}) = - _$SatisfiableItem_Sha256PreimageImpl; - const SatisfiableItem_Sha256Preimage._() : super._(); - - String get hash; - @JsonKey(ignore: true) - _$$SatisfiableItem_Sha256PreimageImplCopyWith< - _$SatisfiableItem_Sha256PreimageImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SatisfiableItem_Hash256PreimageImplCopyWith<$Res> { - factory _$$SatisfiableItem_Hash256PreimageImplCopyWith( - _$SatisfiableItem_Hash256PreimageImpl value, - $Res Function(_$SatisfiableItem_Hash256PreimageImpl) then) = - __$$SatisfiableItem_Hash256PreimageImplCopyWithImpl<$Res>; - @useResult - $Res call({String hash}); -} - -/// @nodoc -class __$$SatisfiableItem_Hash256PreimageImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, - _$SatisfiableItem_Hash256PreimageImpl> - implements _$$SatisfiableItem_Hash256PreimageImplCopyWith<$Res> { - __$$SatisfiableItem_Hash256PreimageImplCopyWithImpl( - _$SatisfiableItem_Hash256PreimageImpl _value, - $Res Function(_$SatisfiableItem_Hash256PreimageImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? hash = null, - }) { - return _then(_$SatisfiableItem_Hash256PreimageImpl( - hash: null == hash - ? _value.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$SatisfiableItem_Hash256PreimageImpl - extends SatisfiableItem_Hash256Preimage { - const _$SatisfiableItem_Hash256PreimageImpl({required this.hash}) : super._(); - - @override - final String hash; - - @override - String toString() { - return 'SatisfiableItem.hash256Preimage(hash: $hash)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_Hash256PreimageImpl && - (identical(other.hash, hash) || other.hash == hash)); - } - - @override - int get hashCode => Object.hash(runtimeType, hash); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_Hash256PreimageImplCopyWith< - _$SatisfiableItem_Hash256PreimageImpl> - get copyWith => __$$SatisfiableItem_Hash256PreimageImplCopyWithImpl< - _$SatisfiableItem_Hash256PreimageImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return hash256Preimage(hash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return hash256Preimage?.call(hash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (hash256Preimage != null) { - return hash256Preimage(hash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return hash256Preimage(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return hash256Preimage?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (hash256Preimage != null) { - return hash256Preimage(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_Hash256Preimage extends SatisfiableItem { - const factory SatisfiableItem_Hash256Preimage({required final String hash}) = - _$SatisfiableItem_Hash256PreimageImpl; - const SatisfiableItem_Hash256Preimage._() : super._(); - - String get hash; - @JsonKey(ignore: true) - _$$SatisfiableItem_Hash256PreimageImplCopyWith< - _$SatisfiableItem_Hash256PreimageImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SatisfiableItem_Ripemd160PreimageImplCopyWith<$Res> { - factory _$$SatisfiableItem_Ripemd160PreimageImplCopyWith( - _$SatisfiableItem_Ripemd160PreimageImpl value, - $Res Function(_$SatisfiableItem_Ripemd160PreimageImpl) then) = - __$$SatisfiableItem_Ripemd160PreimageImplCopyWithImpl<$Res>; - @useResult - $Res call({String hash}); -} - -/// @nodoc -class __$$SatisfiableItem_Ripemd160PreimageImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, - _$SatisfiableItem_Ripemd160PreimageImpl> - implements _$$SatisfiableItem_Ripemd160PreimageImplCopyWith<$Res> { - __$$SatisfiableItem_Ripemd160PreimageImplCopyWithImpl( - _$SatisfiableItem_Ripemd160PreimageImpl _value, - $Res Function(_$SatisfiableItem_Ripemd160PreimageImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? hash = null, - }) { - return _then(_$SatisfiableItem_Ripemd160PreimageImpl( - hash: null == hash - ? _value.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$SatisfiableItem_Ripemd160PreimageImpl - extends SatisfiableItem_Ripemd160Preimage { - const _$SatisfiableItem_Ripemd160PreimageImpl({required this.hash}) - : super._(); - - @override - final String hash; - - @override - String toString() { - return 'SatisfiableItem.ripemd160Preimage(hash: $hash)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_Ripemd160PreimageImpl && - (identical(other.hash, hash) || other.hash == hash)); - } - - @override - int get hashCode => Object.hash(runtimeType, hash); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_Ripemd160PreimageImplCopyWith< - _$SatisfiableItem_Ripemd160PreimageImpl> - get copyWith => __$$SatisfiableItem_Ripemd160PreimageImplCopyWithImpl< - _$SatisfiableItem_Ripemd160PreimageImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return ripemd160Preimage(hash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return ripemd160Preimage?.call(hash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (ripemd160Preimage != null) { - return ripemd160Preimage(hash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return ripemd160Preimage(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return ripemd160Preimage?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (ripemd160Preimage != null) { - return ripemd160Preimage(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_Ripemd160Preimage extends SatisfiableItem { - const factory SatisfiableItem_Ripemd160Preimage( - {required final String hash}) = _$SatisfiableItem_Ripemd160PreimageImpl; - const SatisfiableItem_Ripemd160Preimage._() : super._(); - - String get hash; - @JsonKey(ignore: true) - _$$SatisfiableItem_Ripemd160PreimageImplCopyWith< - _$SatisfiableItem_Ripemd160PreimageImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SatisfiableItem_Hash160PreimageImplCopyWith<$Res> { - factory _$$SatisfiableItem_Hash160PreimageImplCopyWith( - _$SatisfiableItem_Hash160PreimageImpl value, - $Res Function(_$SatisfiableItem_Hash160PreimageImpl) then) = - __$$SatisfiableItem_Hash160PreimageImplCopyWithImpl<$Res>; - @useResult - $Res call({String hash}); -} - -/// @nodoc -class __$$SatisfiableItem_Hash160PreimageImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, - _$SatisfiableItem_Hash160PreimageImpl> - implements _$$SatisfiableItem_Hash160PreimageImplCopyWith<$Res> { - __$$SatisfiableItem_Hash160PreimageImplCopyWithImpl( - _$SatisfiableItem_Hash160PreimageImpl _value, - $Res Function(_$SatisfiableItem_Hash160PreimageImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? hash = null, - }) { - return _then(_$SatisfiableItem_Hash160PreimageImpl( - hash: null == hash - ? _value.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$SatisfiableItem_Hash160PreimageImpl - extends SatisfiableItem_Hash160Preimage { - const _$SatisfiableItem_Hash160PreimageImpl({required this.hash}) : super._(); - - @override - final String hash; - - @override - String toString() { - return 'SatisfiableItem.hash160Preimage(hash: $hash)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_Hash160PreimageImpl && - (identical(other.hash, hash) || other.hash == hash)); - } - - @override - int get hashCode => Object.hash(runtimeType, hash); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_Hash160PreimageImplCopyWith< - _$SatisfiableItem_Hash160PreimageImpl> - get copyWith => __$$SatisfiableItem_Hash160PreimageImplCopyWithImpl< - _$SatisfiableItem_Hash160PreimageImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return hash160Preimage(hash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return hash160Preimage?.call(hash); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (hash160Preimage != null) { - return hash160Preimage(hash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return hash160Preimage(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return hash160Preimage?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (hash160Preimage != null) { - return hash160Preimage(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_Hash160Preimage extends SatisfiableItem { - const factory SatisfiableItem_Hash160Preimage({required final String hash}) = - _$SatisfiableItem_Hash160PreimageImpl; - const SatisfiableItem_Hash160Preimage._() : super._(); - - String get hash; - @JsonKey(ignore: true) - _$$SatisfiableItem_Hash160PreimageImplCopyWith< - _$SatisfiableItem_Hash160PreimageImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SatisfiableItem_AbsoluteTimelockImplCopyWith<$Res> { - factory _$$SatisfiableItem_AbsoluteTimelockImplCopyWith( - _$SatisfiableItem_AbsoluteTimelockImpl value, - $Res Function(_$SatisfiableItem_AbsoluteTimelockImpl) then) = - __$$SatisfiableItem_AbsoluteTimelockImplCopyWithImpl<$Res>; - @useResult - $Res call({LockTime value}); - - $LockTimeCopyWith<$Res> get value; -} - -/// @nodoc -class __$$SatisfiableItem_AbsoluteTimelockImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, - _$SatisfiableItem_AbsoluteTimelockImpl> - implements _$$SatisfiableItem_AbsoluteTimelockImplCopyWith<$Res> { - __$$SatisfiableItem_AbsoluteTimelockImplCopyWithImpl( - _$SatisfiableItem_AbsoluteTimelockImpl _value, - $Res Function(_$SatisfiableItem_AbsoluteTimelockImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? value = null, - }) { - return _then(_$SatisfiableItem_AbsoluteTimelockImpl( - value: null == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as LockTime, - )); - } - - @override - @pragma('vm:prefer-inline') - $LockTimeCopyWith<$Res> get value { - return $LockTimeCopyWith<$Res>(_value.value, (value) { - return _then(_value.copyWith(value: value)); - }); - } -} - -/// @nodoc - -class _$SatisfiableItem_AbsoluteTimelockImpl - extends SatisfiableItem_AbsoluteTimelock { - const _$SatisfiableItem_AbsoluteTimelockImpl({required this.value}) - : super._(); - - @override - final LockTime value; - - @override - String toString() { - return 'SatisfiableItem.absoluteTimelock(value: $value)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_AbsoluteTimelockImpl && - (identical(other.value, value) || other.value == value)); - } - - @override - int get hashCode => Object.hash(runtimeType, value); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_AbsoluteTimelockImplCopyWith< - _$SatisfiableItem_AbsoluteTimelockImpl> - get copyWith => __$$SatisfiableItem_AbsoluteTimelockImplCopyWithImpl< - _$SatisfiableItem_AbsoluteTimelockImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return absoluteTimelock(value); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return absoluteTimelock?.call(value); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (absoluteTimelock != null) { - return absoluteTimelock(value); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return absoluteTimelock(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return absoluteTimelock?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (absoluteTimelock != null) { - return absoluteTimelock(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_AbsoluteTimelock extends SatisfiableItem { - const factory SatisfiableItem_AbsoluteTimelock( - {required final LockTime value}) = _$SatisfiableItem_AbsoluteTimelockImpl; - const SatisfiableItem_AbsoluteTimelock._() : super._(); - - LockTime get value; - @JsonKey(ignore: true) - _$$SatisfiableItem_AbsoluteTimelockImplCopyWith< - _$SatisfiableItem_AbsoluteTimelockImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SatisfiableItem_RelativeTimelockImplCopyWith<$Res> { - factory _$$SatisfiableItem_RelativeTimelockImplCopyWith( - _$SatisfiableItem_RelativeTimelockImpl value, - $Res Function(_$SatisfiableItem_RelativeTimelockImpl) then) = - __$$SatisfiableItem_RelativeTimelockImplCopyWithImpl<$Res>; - @useResult - $Res call({int value}); -} - -/// @nodoc -class __$$SatisfiableItem_RelativeTimelockImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, - _$SatisfiableItem_RelativeTimelockImpl> - implements _$$SatisfiableItem_RelativeTimelockImplCopyWith<$Res> { - __$$SatisfiableItem_RelativeTimelockImplCopyWithImpl( - _$SatisfiableItem_RelativeTimelockImpl _value, - $Res Function(_$SatisfiableItem_RelativeTimelockImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? value = null, - }) { - return _then(_$SatisfiableItem_RelativeTimelockImpl( - value: null == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$SatisfiableItem_RelativeTimelockImpl - extends SatisfiableItem_RelativeTimelock { - const _$SatisfiableItem_RelativeTimelockImpl({required this.value}) - : super._(); - - @override - final int value; - - @override - String toString() { - return 'SatisfiableItem.relativeTimelock(value: $value)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_RelativeTimelockImpl && - (identical(other.value, value) || other.value == value)); - } - - @override - int get hashCode => Object.hash(runtimeType, value); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_RelativeTimelockImplCopyWith< - _$SatisfiableItem_RelativeTimelockImpl> - get copyWith => __$$SatisfiableItem_RelativeTimelockImplCopyWithImpl< - _$SatisfiableItem_RelativeTimelockImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return relativeTimelock(value); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return relativeTimelock?.call(value); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (relativeTimelock != null) { - return relativeTimelock(value); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return relativeTimelock(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return relativeTimelock?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (relativeTimelock != null) { - return relativeTimelock(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_RelativeTimelock extends SatisfiableItem { - const factory SatisfiableItem_RelativeTimelock({required final int value}) = - _$SatisfiableItem_RelativeTimelockImpl; - const SatisfiableItem_RelativeTimelock._() : super._(); - - int get value; - @JsonKey(ignore: true) - _$$SatisfiableItem_RelativeTimelockImplCopyWith< - _$SatisfiableItem_RelativeTimelockImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SatisfiableItem_MultisigImplCopyWith<$Res> { - factory _$$SatisfiableItem_MultisigImplCopyWith( - _$SatisfiableItem_MultisigImpl value, - $Res Function(_$SatisfiableItem_MultisigImpl) then) = - __$$SatisfiableItem_MultisigImplCopyWithImpl<$Res>; - @useResult - $Res call({List keys, BigInt threshold}); -} - -/// @nodoc -class __$$SatisfiableItem_MultisigImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, _$SatisfiableItem_MultisigImpl> - implements _$$SatisfiableItem_MultisigImplCopyWith<$Res> { - __$$SatisfiableItem_MultisigImplCopyWithImpl( - _$SatisfiableItem_MultisigImpl _value, - $Res Function(_$SatisfiableItem_MultisigImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? keys = null, - Object? threshold = null, - }) { - return _then(_$SatisfiableItem_MultisigImpl( - keys: null == keys - ? _value._keys - : keys // ignore: cast_nullable_to_non_nullable - as List, - threshold: null == threshold - ? _value.threshold - : threshold // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$SatisfiableItem_MultisigImpl extends SatisfiableItem_Multisig { - const _$SatisfiableItem_MultisigImpl( - {required final List keys, required this.threshold}) - : _keys = keys, - super._(); - - final List _keys; - @override - List get keys { - if (_keys is EqualUnmodifiableListView) return _keys; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_keys); - } - - @override - final BigInt threshold; - - @override - String toString() { - return 'SatisfiableItem.multisig(keys: $keys, threshold: $threshold)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_MultisigImpl && - const DeepCollectionEquality().equals(other._keys, _keys) && - (identical(other.threshold, threshold) || - other.threshold == threshold)); - } - - @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_keys), threshold); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_MultisigImplCopyWith<_$SatisfiableItem_MultisigImpl> - get copyWith => __$$SatisfiableItem_MultisigImplCopyWithImpl< - _$SatisfiableItem_MultisigImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return multisig(keys, threshold); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return multisig?.call(keys, threshold); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (multisig != null) { - return multisig(keys, threshold); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return multisig(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return multisig?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (multisig != null) { - return multisig(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_Multisig extends SatisfiableItem { - const factory SatisfiableItem_Multisig( - {required final List keys, - required final BigInt threshold}) = _$SatisfiableItem_MultisigImpl; - const SatisfiableItem_Multisig._() : super._(); - - List get keys; - BigInt get threshold; - @JsonKey(ignore: true) - _$$SatisfiableItem_MultisigImplCopyWith<_$SatisfiableItem_MultisigImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SatisfiableItem_ThreshImplCopyWith<$Res> { - factory _$$SatisfiableItem_ThreshImplCopyWith( - _$SatisfiableItem_ThreshImpl value, - $Res Function(_$SatisfiableItem_ThreshImpl) then) = - __$$SatisfiableItem_ThreshImplCopyWithImpl<$Res>; - @useResult - $Res call({List items, BigInt threshold}); -} - -/// @nodoc -class __$$SatisfiableItem_ThreshImplCopyWithImpl<$Res> - extends _$SatisfiableItemCopyWithImpl<$Res, _$SatisfiableItem_ThreshImpl> - implements _$$SatisfiableItem_ThreshImplCopyWith<$Res> { - __$$SatisfiableItem_ThreshImplCopyWithImpl( - _$SatisfiableItem_ThreshImpl _value, - $Res Function(_$SatisfiableItem_ThreshImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? items = null, - Object? threshold = null, - }) { - return _then(_$SatisfiableItem_ThreshImpl( - items: null == items - ? _value._items - : items // ignore: cast_nullable_to_non_nullable - as List, - threshold: null == threshold - ? _value.threshold - : threshold // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } -} - -/// @nodoc - -class _$SatisfiableItem_ThreshImpl extends SatisfiableItem_Thresh { - const _$SatisfiableItem_ThreshImpl( - {required final List items, required this.threshold}) - : _items = items, - super._(); - - final List _items; - @override - List get items { - if (_items is EqualUnmodifiableListView) return _items; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_items); - } - - @override - final BigInt threshold; - - @override - String toString() { - return 'SatisfiableItem.thresh(items: $items, threshold: $threshold)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SatisfiableItem_ThreshImpl && - const DeepCollectionEquality().equals(other._items, _items) && - (identical(other.threshold, threshold) || - other.threshold == threshold)); - } - - @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_items), threshold); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SatisfiableItem_ThreshImplCopyWith<_$SatisfiableItem_ThreshImpl> - get copyWith => __$$SatisfiableItem_ThreshImplCopyWithImpl< - _$SatisfiableItem_ThreshImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(PkOrF key) ecdsaSignature, - required TResult Function(PkOrF key) schnorrSignature, - required TResult Function(String hash) sha256Preimage, - required TResult Function(String hash) hash256Preimage, - required TResult Function(String hash) ripemd160Preimage, - required TResult Function(String hash) hash160Preimage, - required TResult Function(LockTime value) absoluteTimelock, - required TResult Function(int value) relativeTimelock, - required TResult Function(List keys, BigInt threshold) multisig, - required TResult Function(List items, BigInt threshold) thresh, - }) { - return thresh(items, threshold); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(PkOrF key)? ecdsaSignature, - TResult? Function(PkOrF key)? schnorrSignature, - TResult? Function(String hash)? sha256Preimage, - TResult? Function(String hash)? hash256Preimage, - TResult? Function(String hash)? ripemd160Preimage, - TResult? Function(String hash)? hash160Preimage, - TResult? Function(LockTime value)? absoluteTimelock, - TResult? Function(int value)? relativeTimelock, - TResult? Function(List keys, BigInt threshold)? multisig, - TResult? Function(List items, BigInt threshold)? thresh, - }) { - return thresh?.call(items, threshold); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(PkOrF key)? ecdsaSignature, - TResult Function(PkOrF key)? schnorrSignature, - TResult Function(String hash)? sha256Preimage, - TResult Function(String hash)? hash256Preimage, - TResult Function(String hash)? ripemd160Preimage, - TResult Function(String hash)? hash160Preimage, - TResult Function(LockTime value)? absoluteTimelock, - TResult Function(int value)? relativeTimelock, - TResult Function(List keys, BigInt threshold)? multisig, - TResult Function(List items, BigInt threshold)? thresh, - required TResult orElse(), - }) { - if (thresh != null) { - return thresh(items, threshold); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SatisfiableItem_EcdsaSignature value) - ecdsaSignature, - required TResult Function(SatisfiableItem_SchnorrSignature value) - schnorrSignature, - required TResult Function(SatisfiableItem_Sha256Preimage value) - sha256Preimage, - required TResult Function(SatisfiableItem_Hash256Preimage value) - hash256Preimage, - required TResult Function(SatisfiableItem_Ripemd160Preimage value) - ripemd160Preimage, - required TResult Function(SatisfiableItem_Hash160Preimage value) - hash160Preimage, - required TResult Function(SatisfiableItem_AbsoluteTimelock value) - absoluteTimelock, - required TResult Function(SatisfiableItem_RelativeTimelock value) - relativeTimelock, - required TResult Function(SatisfiableItem_Multisig value) multisig, - required TResult Function(SatisfiableItem_Thresh value) thresh, - }) { - return thresh(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult? Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult? Function(SatisfiableItem_Multisig value)? multisig, - TResult? Function(SatisfiableItem_Thresh value)? thresh, - }) { - return thresh?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, - TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, - TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, - TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, - TResult Function(SatisfiableItem_Ripemd160Preimage value)? - ripemd160Preimage, - TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, - TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, - TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, - TResult Function(SatisfiableItem_Multisig value)? multisig, - TResult Function(SatisfiableItem_Thresh value)? thresh, - required TResult orElse(), - }) { - if (thresh != null) { - return thresh(this); - } - return orElse(); - } -} - -abstract class SatisfiableItem_Thresh extends SatisfiableItem { - const factory SatisfiableItem_Thresh( - {required final List items, - required final BigInt threshold}) = _$SatisfiableItem_ThreshImpl; - const SatisfiableItem_Thresh._() : super._(); - - List get items; - BigInt get threshold; - @JsonKey(ignore: true) - _$$SatisfiableItem_ThreshImplCopyWith<_$SatisfiableItem_ThreshImpl> - get copyWith => throw _privateConstructorUsedError; -} diff --git a/lib/src/generated/api/wallet.dart b/lib/src/generated/api/wallet.dart deleted file mode 100644 index e3a5ff39..00000000 --- a/lib/src/generated/api/wallet.dart +++ /dev/null @@ -1,181 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import '../lib.dart'; -import 'blockchain.dart'; -import 'descriptor.dart'; -import 'error.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'psbt.dart'; -import 'types.dart'; - -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt` - -Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( - {required String txid, - required double feeRate, - BdkAddress? allowShrinking, - required BdkWallet wallet, - required bool enableRbf, - int? nSequence}) => - core.instance.api.crateApiWalletFinishBumpFeeTxBuilder( - txid: txid, - feeRate: feeRate, - allowShrinking: allowShrinking, - wallet: wallet, - enableRbf: enableRbf, - nSequence: nSequence); - -Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( - {required BdkWallet wallet, - required List recipients, - required List utxos, - (OutPoint, Input, BigInt)? foreignUtxo, - required List unSpendable, - required ChangeSpendPolicy changePolicy, - required bool manuallySelectedOnly, - double? feeRate, - BigInt? feeAbsolute, - required bool drainWallet, - BdkScriptBuf? drainTo, - RbfValue? rbf, - Map? internalPolicyPath, - Map? externalPolicyPath, - required List data}) => - core.instance.api.crateApiWalletTxBuilderFinish( - wallet: wallet, - recipients: recipients, - utxos: utxos, - foreignUtxo: foreignUtxo, - unSpendable: unSpendable, - changePolicy: changePolicy, - manuallySelectedOnly: manuallySelectedOnly, - feeRate: feeRate, - feeAbsolute: feeAbsolute, - drainWallet: drainWallet, - drainTo: drainTo, - rbf: rbf, - internalPolicyPath: internalPolicyPath, - externalPolicyPath: externalPolicyPath, - data: data); - -class BdkWallet { - final MutexWalletAnyDatabase ptr; - - const BdkWallet({ - required this.ptr, - }); - - /// Return a derived address using the external descriptor, see AddressIndex for available address index selection - /// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) - /// then the same address will always be returned for any AddressIndex. - static (BdkAddress, int) getAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}) => - core.instance.api.crateApiWalletBdkWalletGetAddress( - ptr: ptr, addressIndex: addressIndex); - - /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates - /// on the internal database, which first needs to be Wallet.sync manually. - Balance getBalance() => core.instance.api.crateApiWalletBdkWalletGetBalance( - that: this, - ); - - ///Returns the descriptor used to create addresses for a particular keychain. - static BdkDescriptor getDescriptorForKeychain( - {required BdkWallet ptr, required KeychainKind keychain}) => - core.instance.api.crateApiWalletBdkWalletGetDescriptorForKeychain( - ptr: ptr, keychain: keychain); - - /// Return a derived address using the internal (change) descriptor. - /// - /// If the wallet doesn't have an internal descriptor it will use the external descriptor. - /// - /// see [AddressIndex] for available address index selection strategies. If none of the keys - /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always - /// be returned for any [AddressIndex]. - static (BdkAddress, int) getInternalAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}) => - core.instance.api.crateApiWalletBdkWalletGetInternalAddress( - ptr: ptr, addressIndex: addressIndex); - - ///get the corresponding PSBT Input for a LocalUtxo - Future getPsbtInput( - {required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType}) => - core.instance.api.crateApiWalletBdkWalletGetPsbtInput( - that: this, - utxo: utxo, - onlyWitnessUtxo: onlyWitnessUtxo, - sighashType: sighashType); - - static bool isMine({required BdkWallet ptr, required BdkScriptBuf script}) => - core.instance.api.crateApiWalletBdkWalletIsMine(ptr: ptr, script: script); - - /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. - List listTransactions({required bool includeRaw}) => - core.instance.api.crateApiWalletBdkWalletListTransactions( - that: this, includeRaw: includeRaw); - - /// Return the list of unspent outputs of this wallet. Note that this method only operates on the internal database, - /// which first needs to be Wallet.sync manually. - List listUnspent() => - core.instance.api.crateApiWalletBdkWalletListUnspent( - that: this, - ); - - /// Get the Bitcoin network the wallet is using. - Network network() => core.instance.api.crateApiWalletBdkWalletNetwork( - that: this, - ); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required BdkDescriptor descriptor, - BdkDescriptor? changeDescriptor, - required Network network, - required DatabaseConfig databaseConfig}) => - core.instance.api.crateApiWalletBdkWalletNew( - descriptor: descriptor, - changeDescriptor: changeDescriptor, - network: network, - databaseConfig: databaseConfig); - - static BdkPolicy? policies( - {required BdkWallet ptr, required KeychainKind keychain}) => - core.instance.api - .crateApiWalletBdkWalletPolicies(ptr: ptr, keychain: keychain); - - /// Sign a transaction with all the wallet's signers. This function returns an encapsulated bool that - /// has the value true if the PSBT was finalized, or false otherwise. - /// - /// The [SignOptions] can be used to tweak the behavior of the software signers, and the way - /// the transaction is finalized at the end. Note that it can't be guaranteed that *every* - /// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined - /// in this library will. - static Future sign( - {required BdkWallet ptr, - required BdkPsbt psbt, - SignOptions? signOptions}) => - core.instance.api.crateApiWalletBdkWalletSign( - ptr: ptr, psbt: psbt, signOptions: signOptions); - - /// Sync the internal database with the blockchain. - static Future sync( - {required BdkWallet ptr, required BdkBlockchain blockchain}) => - core.instance.api - .crateApiWalletBdkWalletSync(ptr: ptr, blockchain: blockchain); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkWallet && - runtimeType == other.runtimeType && - ptr == other.ptr; -} diff --git a/lib/src/generated/frb_generated.dart b/lib/src/generated/frb_generated.dart deleted file mode 100644 index 8d2b34e9..00000000 --- a/lib/src/generated/frb_generated.dart +++ /dev/null @@ -1,8595 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field - -import 'api/blockchain.dart'; -import 'api/descriptor.dart'; -import 'api/error.dart'; -import 'api/key.dart'; -import 'api/psbt.dart'; -import 'api/types.dart'; -import 'api/wallet.dart'; -import 'dart:async'; -import 'dart:convert'; -import 'frb_generated.dart'; -import 'frb_generated.io.dart' - if (dart.library.js_interop) 'frb_generated.web.dart'; -import 'lib.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; - -/// Main entrypoint of the Rust API -class core extends BaseEntrypoint { - @internal - static final instance = core._(); - - core._(); - - /// Initialize flutter_rust_bridge - static Future init({ - coreApi? api, - BaseHandler? handler, - ExternalLibrary? externalLibrary, - }) async { - await instance.initImpl( - api: api, - handler: handler, - externalLibrary: externalLibrary, - ); - } - - /// Dispose flutter_rust_bridge - /// - /// The call to this function is optional, since flutter_rust_bridge (and everything else) - /// is automatically disposed when the app stops. - static void dispose() => instance.disposeImpl(); - - @override - ApiImplConstructor get apiImplConstructor => - coreApiImpl.new; - - @override - WireConstructor get wireConstructor => coreWire.fromExternalLibrary; - - @override - Future executeRustInitializers() async {} - - @override - ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => - kDefaultExternalLibraryLoaderConfig; - - @override - String get codegenVersion => '2.0.0'; - - @override - int get rustContentHash => -321771070; - - static const kDefaultExternalLibraryLoaderConfig = - ExternalLibraryLoaderConfig( - stem: 'bdk_flutter', - ioDirectory: 'rust/target/release/', - webPrefix: 'pkg/', - ); -} - -abstract class coreApi extends BaseApi { - Future crateApiBlockchainBdkBlockchainBroadcast( - {required BdkBlockchain ptr, required BdkTransaction transaction}); - - Future crateApiBlockchainBdkBlockchainCreate( - {required BlockchainConfig blockchainConfig}); - - Future crateApiBlockchainBdkBlockchainEstimateFee( - {required BdkBlockchain that, required BigInt target}); - - Future crateApiBlockchainBdkBlockchainGetBlockHash( - {required BdkBlockchain that, required int height}); - - Future crateApiBlockchainBdkBlockchainGetHeight( - {required BdkBlockchain that}); - - String crateApiDescriptorBdkDescriptorAsString({required BdkDescriptor that}); - - BigInt crateApiDescriptorBdkDescriptorMaxSatisfactionWeight( - {required BdkDescriptor that}); - - Future crateApiDescriptorBdkDescriptorNew( - {required String descriptor, required Network network}); - - Future crateApiDescriptorBdkDescriptorNewBip44( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}); - - Future crateApiDescriptorBdkDescriptorNewBip44Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}); - - Future crateApiDescriptorBdkDescriptorNewBip49( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}); - - Future crateApiDescriptorBdkDescriptorNewBip49Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}); - - Future crateApiDescriptorBdkDescriptorNewBip84( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}); - - Future crateApiDescriptorBdkDescriptorNewBip84Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}); - - Future crateApiDescriptorBdkDescriptorNewBip86( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}); - - Future crateApiDescriptorBdkDescriptorNewBip86Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}); - - String crateApiDescriptorBdkDescriptorToStringPrivate( - {required BdkDescriptor that}); - - String crateApiKeyBdkDerivationPathAsString( - {required BdkDerivationPath that}); - - Future crateApiKeyBdkDerivationPathFromString( - {required String path}); - - String crateApiKeyBdkDescriptorPublicKeyAsString( - {required BdkDescriptorPublicKey that}); - - Future crateApiKeyBdkDescriptorPublicKeyDerive( - {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}); - - Future crateApiKeyBdkDescriptorPublicKeyExtend( - {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}); - - Future crateApiKeyBdkDescriptorPublicKeyFromString( - {required String publicKey}); - - BdkDescriptorPublicKey crateApiKeyBdkDescriptorSecretKeyAsPublic( - {required BdkDescriptorSecretKey ptr}); - - String crateApiKeyBdkDescriptorSecretKeyAsString( - {required BdkDescriptorSecretKey that}); - - Future crateApiKeyBdkDescriptorSecretKeyCreate( - {required Network network, - required BdkMnemonic mnemonic, - String? password}); - - Future crateApiKeyBdkDescriptorSecretKeyDerive( - {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}); - - Future crateApiKeyBdkDescriptorSecretKeyExtend( - {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}); - - Future crateApiKeyBdkDescriptorSecretKeyFromString( - {required String secretKey}); - - Uint8List crateApiKeyBdkDescriptorSecretKeySecretBytes( - {required BdkDescriptorSecretKey that}); - - String crateApiKeyBdkMnemonicAsString({required BdkMnemonic that}); - - Future crateApiKeyBdkMnemonicFromEntropy( - {required List entropy}); - - Future crateApiKeyBdkMnemonicFromString( - {required String mnemonic}); - - Future crateApiKeyBdkMnemonicNew({required WordCount wordCount}); - - String crateApiPsbtBdkPsbtAsString({required BdkPsbt that}); - - Future crateApiPsbtBdkPsbtCombine( - {required BdkPsbt ptr, required BdkPsbt other}); - - BdkTransaction crateApiPsbtBdkPsbtExtractTx({required BdkPsbt ptr}); - - BigInt? crateApiPsbtBdkPsbtFeeAmount({required BdkPsbt that}); - - FeeRate? crateApiPsbtBdkPsbtFeeRate({required BdkPsbt that}); - - Future crateApiPsbtBdkPsbtFromStr({required String psbtBase64}); - - String crateApiPsbtBdkPsbtJsonSerialize({required BdkPsbt that}); - - Uint8List crateApiPsbtBdkPsbtSerialize({required BdkPsbt that}); - - String crateApiPsbtBdkPsbtTxid({required BdkPsbt that}); - - String crateApiTypesBdkAddressAsString({required BdkAddress that}); - - Future crateApiTypesBdkAddressFromScript( - {required BdkScriptBuf script, required Network network}); - - Future crateApiTypesBdkAddressFromString( - {required String address, required Network network}); - - bool crateApiTypesBdkAddressIsValidForNetwork( - {required BdkAddress that, required Network network}); - - Network crateApiTypesBdkAddressNetwork({required BdkAddress that}); - - Payload crateApiTypesBdkAddressPayload({required BdkAddress that}); - - BdkScriptBuf crateApiTypesBdkAddressScript({required BdkAddress ptr}); - - String crateApiTypesBdkAddressToQrUri({required BdkAddress that}); - - String crateApiTypesBdkPolicyAsString({required BdkPolicy that}); - - Satisfaction crateApiTypesBdkPolicyContribution({required BdkPolicy that}); - - String crateApiTypesBdkPolicyId({required BdkPolicy that}); - - SatisfiableItem crateApiTypesBdkPolicyItem({required BdkPolicy that}); - - bool crateApiTypesBdkPolicyRequiresPath({required BdkPolicy that}); - - Satisfaction crateApiTypesBdkPolicySatisfaction({required BdkPolicy that}); - - String crateApiTypesBdkScriptBufAsString({required BdkScriptBuf that}); - - BdkScriptBuf crateApiTypesBdkScriptBufEmpty(); - - Future crateApiTypesBdkScriptBufFromHex({required String s}); - - Future crateApiTypesBdkScriptBufWithCapacity( - {required BigInt capacity}); - - Future crateApiTypesBdkTransactionFromBytes( - {required List transactionBytes}); - - Future> crateApiTypesBdkTransactionInput( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionIsCoinBase( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionIsExplicitlyRbf( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionIsLockTimeEnabled( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionLockTime( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionNew( - {required int version, - required LockTime lockTime, - required List input, - required List output}); - - Future> crateApiTypesBdkTransactionOutput( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionSerialize( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionSize( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionTxid( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionVersion( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionVsize( - {required BdkTransaction that}); - - Future crateApiTypesBdkTransactionWeight( - {required BdkTransaction that}); - - (BdkAddress, int) crateApiWalletBdkWalletGetAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}); - - Balance crateApiWalletBdkWalletGetBalance({required BdkWallet that}); - - BdkDescriptor crateApiWalletBdkWalletGetDescriptorForKeychain( - {required BdkWallet ptr, required KeychainKind keychain}); - - (BdkAddress, int) crateApiWalletBdkWalletGetInternalAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}); - - Future crateApiWalletBdkWalletGetPsbtInput( - {required BdkWallet that, - required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType}); - - bool crateApiWalletBdkWalletIsMine( - {required BdkWallet ptr, required BdkScriptBuf script}); - - List crateApiWalletBdkWalletListTransactions( - {required BdkWallet that, required bool includeRaw}); - - List crateApiWalletBdkWalletListUnspent({required BdkWallet that}); - - Network crateApiWalletBdkWalletNetwork({required BdkWallet that}); - - Future crateApiWalletBdkWalletNew( - {required BdkDescriptor descriptor, - BdkDescriptor? changeDescriptor, - required Network network, - required DatabaseConfig databaseConfig}); - - BdkPolicy? crateApiWalletBdkWalletPolicies( - {required BdkWallet ptr, required KeychainKind keychain}); - - Future crateApiWalletBdkWalletSign( - {required BdkWallet ptr, - required BdkPsbt psbt, - SignOptions? signOptions}); - - Future crateApiWalletBdkWalletSync( - {required BdkWallet ptr, required BdkBlockchain blockchain}); - - Future<(BdkPsbt, TransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder( - {required String txid, - required double feeRate, - BdkAddress? allowShrinking, - required BdkWallet wallet, - required bool enableRbf, - int? nSequence}); - - Future<(BdkPsbt, TransactionDetails)> crateApiWalletTxBuilderFinish( - {required BdkWallet wallet, - required List recipients, - required List utxos, - (OutPoint, Input, BigInt)? foreignUtxo, - required List unSpendable, - required ChangeSpendPolicy changePolicy, - required bool manuallySelectedOnly, - double? feeRate, - BigInt? feeAbsolute, - required bool drainWallet, - BdkScriptBuf? drainTo, - RbfValue? rbf, - Map? internalPolicyPath, - Map? externalPolicyPath, - required List data}); - - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Address; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Address; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AddressPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_DerivationPath; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_DerivationPath; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_DerivationPathPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_AnyBlockchain; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_AnyBlockchain; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_AnyBlockchainPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ExtendedDescriptor; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ExtendedDescriptor; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ExtendedDescriptorPtr; - - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Policy; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Policy; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_PolicyPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_DescriptorPublicKey; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_DescriptorPublicKey; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_DescriptorPublicKeyPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_DescriptorSecretKey; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_DescriptorSecretKey; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_DescriptorSecretKeyPtr; - - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_KeyMap; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_KeyMap; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeyMapPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_Mnemonic; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_Mnemonic; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MnemonicPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexWalletAnyDatabase; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexWalletAnyDatabase; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexWalletAnyDatabasePtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexPartiallySignedTransaction; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr; -} - -class coreApiImpl extends coreApiImplPlatform implements coreApi { - coreApiImpl({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - - @override - Future crateApiBlockchainBdkBlockchainBroadcast( - {required BdkBlockchain ptr, required BdkTransaction transaction}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(ptr); - var arg1 = cst_encode_box_autoadd_bdk_transaction(transaction); - return wire.wire__crate__api__blockchain__bdk_blockchain_broadcast( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiBlockchainBdkBlockchainBroadcastConstMeta, - argValues: [ptr, transaction], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiBlockchainBdkBlockchainBroadcastConstMeta => - const TaskConstMeta( - debugName: "bdk_blockchain_broadcast", - argNames: ["ptr", "transaction"], - ); - - @override - Future crateApiBlockchainBdkBlockchainCreate( - {required BlockchainConfig blockchainConfig}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_blockchain_config(blockchainConfig); - return wire.wire__crate__api__blockchain__bdk_blockchain_create( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_blockchain, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiBlockchainBdkBlockchainCreateConstMeta, - argValues: [blockchainConfig], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiBlockchainBdkBlockchainCreateConstMeta => - const TaskConstMeta( - debugName: "bdk_blockchain_create", - argNames: ["blockchainConfig"], - ); - - @override - Future crateApiBlockchainBdkBlockchainEstimateFee( - {required BdkBlockchain that, required BigInt target}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); - var arg1 = cst_encode_u_64(target); - return wire.wire__crate__api__blockchain__bdk_blockchain_estimate_fee( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_fee_rate, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiBlockchainBdkBlockchainEstimateFeeConstMeta, - argValues: [that, target], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiBlockchainBdkBlockchainEstimateFeeConstMeta => - const TaskConstMeta( - debugName: "bdk_blockchain_estimate_fee", - argNames: ["that", "target"], - ); - - @override - Future crateApiBlockchainBdkBlockchainGetBlockHash( - {required BdkBlockchain that, required int height}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); - var arg1 = cst_encode_u_32(height); - return wire.wire__crate__api__blockchain__bdk_blockchain_get_block_hash( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiBlockchainBdkBlockchainGetBlockHashConstMeta, - argValues: [that, height], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiBlockchainBdkBlockchainGetBlockHashConstMeta => - const TaskConstMeta( - debugName: "bdk_blockchain_get_block_hash", - argNames: ["that", "height"], - ); - - @override - Future crateApiBlockchainBdkBlockchainGetHeight( - {required BdkBlockchain that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); - return wire.wire__crate__api__blockchain__bdk_blockchain_get_height( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_32, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiBlockchainBdkBlockchainGetHeightConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiBlockchainBdkBlockchainGetHeightConstMeta => - const TaskConstMeta( - debugName: "bdk_blockchain_get_height", - argNames: ["that"], - ); - - @override - String crateApiDescriptorBdkDescriptorAsString( - {required BdkDescriptor that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); - return wire - .wire__crate__api__descriptor__bdk_descriptor_as_string(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiDescriptorBdkDescriptorAsStringConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_as_string", - argNames: ["that"], - ); - - @override - BigInt crateApiDescriptorBdkDescriptorMaxSatisfactionWeight( - {required BdkDescriptor that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); - return wire - .wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( - arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_usize, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorMaxSatisfactionWeightConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateApiDescriptorBdkDescriptorMaxSatisfactionWeightConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_max_satisfaction_weight", - argNames: ["that"], - ); - - @override - Future crateApiDescriptorBdkDescriptorNew( - {required String descriptor, required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(descriptor); - var arg1 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorNewConstMeta, - argValues: [descriptor, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new", - argNames: ["descriptor", "network"], - ); - - @override - Future crateApiDescriptorBdkDescriptorNewBip44( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); - var arg1 = cst_encode_keychain_kind(keychainKind); - var arg2 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip44( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip44ConstMeta, - argValues: [secretKey, keychainKind, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip44ConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip44", - argNames: ["secretKey", "keychainKind", "network"], - ); - - @override - Future crateApiDescriptorBdkDescriptorNewBip44Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); - var arg1 = cst_encode_String(fingerprint); - var arg2 = cst_encode_keychain_kind(keychainKind); - var arg3 = cst_encode_network(network); - return wire - .wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip44PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip44PublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip44_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], - ); - - @override - Future crateApiDescriptorBdkDescriptorNewBip49( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); - var arg1 = cst_encode_keychain_kind(keychainKind); - var arg2 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip49( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip49ConstMeta, - argValues: [secretKey, keychainKind, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip49ConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip49", - argNames: ["secretKey", "keychainKind", "network"], - ); - - @override - Future crateApiDescriptorBdkDescriptorNewBip49Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); - var arg1 = cst_encode_String(fingerprint); - var arg2 = cst_encode_keychain_kind(keychainKind); - var arg3 = cst_encode_network(network); - return wire - .wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip49PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip49PublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip49_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], - ); - - @override - Future crateApiDescriptorBdkDescriptorNewBip84( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); - var arg1 = cst_encode_keychain_kind(keychainKind); - var arg2 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip84( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip84ConstMeta, - argValues: [secretKey, keychainKind, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip84ConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip84", - argNames: ["secretKey", "keychainKind", "network"], - ); - - @override - Future crateApiDescriptorBdkDescriptorNewBip84Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); - var arg1 = cst_encode_String(fingerprint); - var arg2 = cst_encode_keychain_kind(keychainKind); - var arg3 = cst_encode_network(network); - return wire - .wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip84PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip84PublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip84_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], - ); - - @override - Future crateApiDescriptorBdkDescriptorNewBip86( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); - var arg1 = cst_encode_keychain_kind(keychainKind); - var arg2 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip86( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip86ConstMeta, - argValues: [secretKey, keychainKind, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip86ConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip86", - argNames: ["secretKey", "keychainKind", "network"], - ); - - @override - Future crateApiDescriptorBdkDescriptorNewBip86Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); - var arg1 = cst_encode_String(fingerprint); - var arg2 = cst_encode_keychain_kind(keychainKind); - var arg3 = cst_encode_network(network); - return wire - .wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip86PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip86PublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip86_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], - ); - - @override - String crateApiDescriptorBdkDescriptorToStringPrivate( - {required BdkDescriptor that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); - return wire - .wire__crate__api__descriptor__bdk_descriptor_to_string_private( - arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiDescriptorBdkDescriptorToStringPrivateConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiDescriptorBdkDescriptorToStringPrivateConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_to_string_private", - argNames: ["that"], - ); - - @override - String crateApiKeyBdkDerivationPathAsString( - {required BdkDerivationPath that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_derivation_path(that); - return wire.wire__crate__api__key__bdk_derivation_path_as_string(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiKeyBdkDerivationPathAsStringConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDerivationPathAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_derivation_path_as_string", - argNames: ["that"], - ); - - @override - Future crateApiKeyBdkDerivationPathFromString( - {required String path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(path); - return wire.wire__crate__api__key__bdk_derivation_path_from_string( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_derivation_path, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDerivationPathFromStringConstMeta, - argValues: [path], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDerivationPathFromStringConstMeta => - const TaskConstMeta( - debugName: "bdk_derivation_path_from_string", - argNames: ["path"], - ); - - @override - String crateApiKeyBdkDescriptorPublicKeyAsString( - {required BdkDescriptorPublicKey that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(that); - return wire - .wire__crate__api__key__bdk_descriptor_public_key_as_string(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiKeyBdkDescriptorPublicKeyAsStringConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_public_key_as_string", - argNames: ["that"], - ); - - @override - Future crateApiKeyBdkDescriptorPublicKeyDerive( - {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr); - var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); - return wire.wire__crate__api__key__bdk_descriptor_public_key_derive( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDescriptorPublicKeyDeriveConstMeta, - argValues: [ptr, path], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyDeriveConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_public_key_derive", - argNames: ["ptr", "path"], - ); - - @override - Future crateApiKeyBdkDescriptorPublicKeyExtend( - {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr); - var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); - return wire.wire__crate__api__key__bdk_descriptor_public_key_extend( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDescriptorPublicKeyExtendConstMeta, - argValues: [ptr, path], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyExtendConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_public_key_extend", - argNames: ["ptr", "path"], - ); - - @override - Future crateApiKeyBdkDescriptorPublicKeyFromString( - {required String publicKey}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(publicKey); - return wire - .wire__crate__api__key__bdk_descriptor_public_key_from_string( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDescriptorPublicKeyFromStringConstMeta, - argValues: [publicKey], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyFromStringConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_public_key_from_string", - argNames: ["publicKey"], - ); - - @override - BdkDescriptorPublicKey crateApiKeyBdkDescriptorSecretKeyAsPublic( - {required BdkDescriptorSecretKey ptr}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); - return wire - .wire__crate__api__key__bdk_descriptor_secret_key_as_public(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyAsPublicConstMeta, - argValues: [ptr], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyAsPublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_as_public", - argNames: ["ptr"], - ); - - @override - String crateApiKeyBdkDescriptorSecretKeyAsString( - {required BdkDescriptorSecretKey that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); - return wire - .wire__crate__api__key__bdk_descriptor_secret_key_as_string(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyAsStringConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_as_string", - argNames: ["that"], - ); - - @override - Future crateApiKeyBdkDescriptorSecretKeyCreate( - {required Network network, - required BdkMnemonic mnemonic, - String? password}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_network(network); - var arg1 = cst_encode_box_autoadd_bdk_mnemonic(mnemonic); - var arg2 = cst_encode_opt_String(password); - return wire.wire__crate__api__key__bdk_descriptor_secret_key_create( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyCreateConstMeta, - argValues: [network, mnemonic, password], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyCreateConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_create", - argNames: ["network", "mnemonic", "password"], - ); - - @override - Future crateApiKeyBdkDescriptorSecretKeyDerive( - {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); - var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); - return wire.wire__crate__api__key__bdk_descriptor_secret_key_derive( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyDeriveConstMeta, - argValues: [ptr, path], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyDeriveConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_derive", - argNames: ["ptr", "path"], - ); - - @override - Future crateApiKeyBdkDescriptorSecretKeyExtend( - {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); - var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); - return wire.wire__crate__api__key__bdk_descriptor_secret_key_extend( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyExtendConstMeta, - argValues: [ptr, path], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyExtendConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_extend", - argNames: ["ptr", "path"], - ); - - @override - Future crateApiKeyBdkDescriptorSecretKeyFromString( - {required String secretKey}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(secretKey); - return wire - .wire__crate__api__key__bdk_descriptor_secret_key_from_string( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyFromStringConstMeta, - argValues: [secretKey], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyFromStringConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_from_string", - argNames: ["secretKey"], - ); - - @override - Uint8List crateApiKeyBdkDescriptorSecretKeySecretBytes( - {required BdkDescriptorSecretKey that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); - return wire - .wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( - arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_prim_u_8_strict, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeySecretBytesConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeySecretBytesConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_secret_bytes", - argNames: ["that"], - ); - - @override - String crateApiKeyBdkMnemonicAsString({required BdkMnemonic that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_mnemonic(that); - return wire.wire__crate__api__key__bdk_mnemonic_as_string(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiKeyBdkMnemonicAsStringConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkMnemonicAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_mnemonic_as_string", - argNames: ["that"], - ); - - @override - Future crateApiKeyBdkMnemonicFromEntropy( - {required List entropy}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_list_prim_u_8_loose(entropy); - return wire.wire__crate__api__key__bdk_mnemonic_from_entropy( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_mnemonic, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkMnemonicFromEntropyConstMeta, - argValues: [entropy], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkMnemonicFromEntropyConstMeta => - const TaskConstMeta( - debugName: "bdk_mnemonic_from_entropy", - argNames: ["entropy"], - ); - - @override - Future crateApiKeyBdkMnemonicFromString( - {required String mnemonic}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(mnemonic); - return wire.wire__crate__api__key__bdk_mnemonic_from_string( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_mnemonic, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkMnemonicFromStringConstMeta, - argValues: [mnemonic], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkMnemonicFromStringConstMeta => - const TaskConstMeta( - debugName: "bdk_mnemonic_from_string", - argNames: ["mnemonic"], - ); - - @override - Future crateApiKeyBdkMnemonicNew( - {required WordCount wordCount}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_word_count(wordCount); - return wire.wire__crate__api__key__bdk_mnemonic_new(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_mnemonic, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiKeyBdkMnemonicNewConstMeta, - argValues: [wordCount], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiKeyBdkMnemonicNewConstMeta => const TaskConstMeta( - debugName: "bdk_mnemonic_new", - argNames: ["wordCount"], - ); - - @override - String crateApiPsbtBdkPsbtAsString({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_as_string(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiPsbtBdkPsbtAsStringConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiPsbtBdkPsbtAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_psbt_as_string", - argNames: ["that"], - ); - - @override - Future crateApiPsbtBdkPsbtCombine( - {required BdkPsbt ptr, required BdkPsbt other}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); - var arg1 = cst_encode_box_autoadd_bdk_psbt(other); - return wire.wire__crate__api__psbt__bdk_psbt_combine(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_psbt, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiPsbtBdkPsbtCombineConstMeta, - argValues: [ptr, other], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiPsbtBdkPsbtCombineConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_combine", - argNames: ["ptr", "other"], - ); - - @override - BdkTransaction crateApiPsbtBdkPsbtExtractTx({required BdkPsbt ptr}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); - return wire.wire__crate__api__psbt__bdk_psbt_extract_tx(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_transaction, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiPsbtBdkPsbtExtractTxConstMeta, - argValues: [ptr], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiPsbtBdkPsbtExtractTxConstMeta => - const TaskConstMeta( - debugName: "bdk_psbt_extract_tx", - argNames: ["ptr"], - ); - - @override - BigInt? crateApiPsbtBdkPsbtFeeAmount({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_fee_amount(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_u_64, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiPsbtBdkPsbtFeeAmountConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiPsbtBdkPsbtFeeAmountConstMeta => - const TaskConstMeta( - debugName: "bdk_psbt_fee_amount", - argNames: ["that"], - ); - - @override - FeeRate? crateApiPsbtBdkPsbtFeeRate({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_fee_rate(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_fee_rate, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiPsbtBdkPsbtFeeRateConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiPsbtBdkPsbtFeeRateConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_fee_rate", - argNames: ["that"], - ); - - @override - Future crateApiPsbtBdkPsbtFromStr({required String psbtBase64}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(psbtBase64); - return wire.wire__crate__api__psbt__bdk_psbt_from_str(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_psbt, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiPsbtBdkPsbtFromStrConstMeta, - argValues: [psbtBase64], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiPsbtBdkPsbtFromStrConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_from_str", - argNames: ["psbtBase64"], - ); - - @override - String crateApiPsbtBdkPsbtJsonSerialize({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_json_serialize(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiPsbtBdkPsbtJsonSerializeConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiPsbtBdkPsbtJsonSerializeConstMeta => - const TaskConstMeta( - debugName: "bdk_psbt_json_serialize", - argNames: ["that"], - ); - - @override - Uint8List crateApiPsbtBdkPsbtSerialize({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_serialize(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_prim_u_8_strict, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiPsbtBdkPsbtSerializeConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiPsbtBdkPsbtSerializeConstMeta => - const TaskConstMeta( - debugName: "bdk_psbt_serialize", - argNames: ["that"], - ); - - @override - String crateApiPsbtBdkPsbtTxid({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_txid(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiPsbtBdkPsbtTxidConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiPsbtBdkPsbtTxidConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_txid", - argNames: ["that"], - ); - - @override - String crateApiTypesBdkAddressAsString({required BdkAddress that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire__crate__api__types__bdk_address_as_string(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkAddressAsStringConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkAddressAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_address_as_string", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkAddressFromScript( - {required BdkScriptBuf script, required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_script_buf(script); - var arg1 = cst_encode_network(network); - return wire.wire__crate__api__types__bdk_address_from_script( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_address, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkAddressFromScriptConstMeta, - argValues: [script, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkAddressFromScriptConstMeta => - const TaskConstMeta( - debugName: "bdk_address_from_script", - argNames: ["script", "network"], - ); - - @override - Future crateApiTypesBdkAddressFromString( - {required String address, required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(address); - var arg1 = cst_encode_network(network); - return wire.wire__crate__api__types__bdk_address_from_string( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_address, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkAddressFromStringConstMeta, - argValues: [address, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkAddressFromStringConstMeta => - const TaskConstMeta( - debugName: "bdk_address_from_string", - argNames: ["address", "network"], - ); - - @override - bool crateApiTypesBdkAddressIsValidForNetwork( - {required BdkAddress that, required Network network}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - var arg1 = cst_encode_network(network); - return wire.wire__crate__api__types__bdk_address_is_valid_for_network( - arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkAddressIsValidForNetworkConstMeta, - argValues: [that, network], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkAddressIsValidForNetworkConstMeta => - const TaskConstMeta( - debugName: "bdk_address_is_valid_for_network", - argNames: ["that", "network"], - ); - - @override - Network crateApiTypesBdkAddressNetwork({required BdkAddress that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire__crate__api__types__bdk_address_network(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_network, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkAddressNetworkConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkAddressNetworkConstMeta => - const TaskConstMeta( - debugName: "bdk_address_network", - argNames: ["that"], - ); - - @override - Payload crateApiTypesBdkAddressPayload({required BdkAddress that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire__crate__api__types__bdk_address_payload(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_payload, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkAddressPayloadConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkAddressPayloadConstMeta => - const TaskConstMeta( - debugName: "bdk_address_payload", - argNames: ["that"], - ); - - @override - BdkScriptBuf crateApiTypesBdkAddressScript({required BdkAddress ptr}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(ptr); - return wire.wire__crate__api__types__bdk_address_script(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkAddressScriptConstMeta, - argValues: [ptr], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkAddressScriptConstMeta => - const TaskConstMeta( - debugName: "bdk_address_script", - argNames: ["ptr"], - ); - - @override - String crateApiTypesBdkAddressToQrUri({required BdkAddress that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire__crate__api__types__bdk_address_to_qr_uri(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkAddressToQrUriConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkAddressToQrUriConstMeta => - const TaskConstMeta( - debugName: "bdk_address_to_qr_uri", - argNames: ["that"], - ); - - @override - String crateApiTypesBdkPolicyAsString({required BdkPolicy that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_policy(that); - return wire.wire__crate__api__types__bdk_policy_as_string(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkPolicyAsStringConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkPolicyAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_policy_as_string", - argNames: ["that"], - ); - - @override - Satisfaction crateApiTypesBdkPolicyContribution({required BdkPolicy that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_policy(that); - return wire.wire__crate__api__types__bdk_policy_contribution(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_satisfaction, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkPolicyContributionConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkPolicyContributionConstMeta => - const TaskConstMeta( - debugName: "bdk_policy_contribution", - argNames: ["that"], - ); - - @override - String crateApiTypesBdkPolicyId({required BdkPolicy that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_policy(that); - return wire.wire__crate__api__types__bdk_policy_id(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkPolicyIdConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkPolicyIdConstMeta => const TaskConstMeta( - debugName: "bdk_policy_id", - argNames: ["that"], - ); - - @override - SatisfiableItem crateApiTypesBdkPolicyItem({required BdkPolicy that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_policy(that); - return wire.wire__crate__api__types__bdk_policy_item(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_satisfiable_item, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkPolicyItemConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkPolicyItemConstMeta => const TaskConstMeta( - debugName: "bdk_policy_item", - argNames: ["that"], - ); - - @override - bool crateApiTypesBdkPolicyRequiresPath({required BdkPolicy that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_policy(that); - return wire.wire__crate__api__types__bdk_policy_requires_path(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkPolicyRequiresPathConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkPolicyRequiresPathConstMeta => - const TaskConstMeta( - debugName: "bdk_policy_requires_path", - argNames: ["that"], - ); - - @override - Satisfaction crateApiTypesBdkPolicySatisfaction({required BdkPolicy that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_policy(that); - return wire.wire__crate__api__types__bdk_policy_satisfaction(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_satisfaction, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkPolicySatisfactionConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkPolicySatisfactionConstMeta => - const TaskConstMeta( - debugName: "bdk_policy_satisfaction", - argNames: ["that"], - ); - - @override - String crateApiTypesBdkScriptBufAsString({required BdkScriptBuf that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_script_buf(that); - return wire.wire__crate__api__types__bdk_script_buf_as_string(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkScriptBufAsStringConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkScriptBufAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_script_buf_as_string", - argNames: ["that"], - ); - - @override - BdkScriptBuf crateApiTypesBdkScriptBufEmpty() { - return handler.executeSync(SyncTask( - callFfi: () { - return wire.wire__crate__api__types__bdk_script_buf_empty(); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkScriptBufEmptyConstMeta, - argValues: [], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkScriptBufEmptyConstMeta => - const TaskConstMeta( - debugName: "bdk_script_buf_empty", - argNames: [], - ); - - @override - Future crateApiTypesBdkScriptBufFromHex({required String s}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(s); - return wire.wire__crate__api__types__bdk_script_buf_from_hex( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkScriptBufFromHexConstMeta, - argValues: [s], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkScriptBufFromHexConstMeta => - const TaskConstMeta( - debugName: "bdk_script_buf_from_hex", - argNames: ["s"], - ); - - @override - Future crateApiTypesBdkScriptBufWithCapacity( - {required BigInt capacity}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_usize(capacity); - return wire.wire__crate__api__types__bdk_script_buf_with_capacity( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: null, - ), - constMeta: kCrateApiTypesBdkScriptBufWithCapacityConstMeta, - argValues: [capacity], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkScriptBufWithCapacityConstMeta => - const TaskConstMeta( - debugName: "bdk_script_buf_with_capacity", - argNames: ["capacity"], - ); - - @override - Future crateApiTypesBdkTransactionFromBytes( - {required List transactionBytes}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_list_prim_u_8_loose(transactionBytes); - return wire.wire__crate__api__types__bdk_transaction_from_bytes( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_transaction, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionFromBytesConstMeta, - argValues: [transactionBytes], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionFromBytesConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_from_bytes", - argNames: ["transactionBytes"], - ); - - @override - Future> crateApiTypesBdkTransactionInput( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_input(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_tx_in, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionInputConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionInputConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_input", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionIsCoinBase( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_is_coin_base( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionIsCoinBaseConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionIsCoinBaseConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_is_coin_base", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionIsExplicitlyRbf( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_is_explicitly_rbf( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionIsExplicitlyRbfConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionIsExplicitlyRbfConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_is_explicitly_rbf", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionIsLockTimeEnabled( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire - .wire__crate__api__types__bdk_transaction_is_lock_time_enabled( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionIsLockTimeEnabledConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionIsLockTimeEnabledConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_is_lock_time_enabled", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionLockTime( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_lock_time( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_lock_time, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionLockTimeConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionLockTimeConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_lock_time", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionNew( - {required int version, - required LockTime lockTime, - required List input, - required List output}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_i_32(version); - var arg1 = cst_encode_box_autoadd_lock_time(lockTime); - var arg2 = cst_encode_list_tx_in(input); - var arg3 = cst_encode_list_tx_out(output); - return wire.wire__crate__api__types__bdk_transaction_new( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_transaction, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionNewConstMeta, - argValues: [version, lockTime, input, output], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionNewConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_new", - argNames: ["version", "lockTime", "input", "output"], - ); - - @override - Future> crateApiTypesBdkTransactionOutput( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_output( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_tx_out, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionOutputConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionOutputConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_output", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionSerialize( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_serialize( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_prim_u_8_strict, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionSerializeConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionSerializeConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_serialize", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionSize( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_size(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_64, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionSizeConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionSizeConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_size", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionTxid( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_txid(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionTxidConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionTxidConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_txid", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionVersion( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_version( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_i_32, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionVersionConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionVersionConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_version", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionVsize( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_vsize(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_64, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionVsizeConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionVsizeConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_vsize", - argNames: ["that"], - ); - - @override - Future crateApiTypesBdkTransactionWeight( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_weight( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_64, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiTypesBdkTransactionWeightConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiTypesBdkTransactionWeightConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_weight", - argNames: ["that"], - ); - - @override - (BdkAddress, int) crateApiWalletBdkWalletGetAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_address_index(addressIndex); - return wire.wire__crate__api__wallet__bdk_wallet_get_address( - arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_address_u_32, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletGetAddressConstMeta, - argValues: [ptr, addressIndex], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletGetAddressConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_get_address", - argNames: ["ptr", "addressIndex"], - ); - - @override - Balance crateApiWalletBdkWalletGetBalance({required BdkWallet that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - return wire.wire__crate__api__wallet__bdk_wallet_get_balance(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_balance, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletGetBalanceConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletGetBalanceConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_get_balance", - argNames: ["that"], - ); - - @override - BdkDescriptor crateApiWalletBdkWalletGetDescriptorForKeychain( - {required BdkWallet ptr, required KeychainKind keychain}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_keychain_kind(keychain); - return wire - .wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( - arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletGetDescriptorForKeychainConstMeta, - argValues: [ptr, keychain], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletGetDescriptorForKeychainConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_get_descriptor_for_keychain", - argNames: ["ptr", "keychain"], - ); - - @override - (BdkAddress, int) crateApiWalletBdkWalletGetInternalAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_address_index(addressIndex); - return wire.wire__crate__api__wallet__bdk_wallet_get_internal_address( - arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_address_u_32, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletGetInternalAddressConstMeta, - argValues: [ptr, addressIndex], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletGetInternalAddressConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_get_internal_address", - argNames: ["ptr", "addressIndex"], - ); - - @override - Future crateApiWalletBdkWalletGetPsbtInput( - {required BdkWallet that, - required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - var arg1 = cst_encode_box_autoadd_local_utxo(utxo); - var arg2 = cst_encode_bool(onlyWitnessUtxo); - var arg3 = cst_encode_opt_box_autoadd_psbt_sig_hash_type(sighashType); - return wire.wire__crate__api__wallet__bdk_wallet_get_psbt_input( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_input, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletGetPsbtInputConstMeta, - argValues: [that, utxo, onlyWitnessUtxo, sighashType], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletGetPsbtInputConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_get_psbt_input", - argNames: ["that", "utxo", "onlyWitnessUtxo", "sighashType"], - ); - - @override - bool crateApiWalletBdkWalletIsMine( - {required BdkWallet ptr, required BdkScriptBuf script}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_bdk_script_buf(script); - return wire.wire__crate__api__wallet__bdk_wallet_is_mine(arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletIsMineConstMeta, - argValues: [ptr, script], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletIsMineConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_is_mine", - argNames: ["ptr", "script"], - ); - - @override - List crateApiWalletBdkWalletListTransactions( - {required BdkWallet that, required bool includeRaw}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - var arg1 = cst_encode_bool(includeRaw); - return wire.wire__crate__api__wallet__bdk_wallet_list_transactions( - arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_transaction_details, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletListTransactionsConstMeta, - argValues: [that, includeRaw], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletListTransactionsConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_list_transactions", - argNames: ["that", "includeRaw"], - ); - - @override - List crateApiWalletBdkWalletListUnspent( - {required BdkWallet that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - return wire.wire__crate__api__wallet__bdk_wallet_list_unspent(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_local_utxo, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletListUnspentConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletListUnspentConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_list_unspent", - argNames: ["that"], - ); - - @override - Network crateApiWalletBdkWalletNetwork({required BdkWallet that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - return wire.wire__crate__api__wallet__bdk_wallet_network(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_network, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletNetworkConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletNetworkConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_network", - argNames: ["that"], - ); - - @override - Future crateApiWalletBdkWalletNew( - {required BdkDescriptor descriptor, - BdkDescriptor? changeDescriptor, - required Network network, - required DatabaseConfig databaseConfig}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(descriptor); - var arg1 = cst_encode_opt_box_autoadd_bdk_descriptor(changeDescriptor); - var arg2 = cst_encode_network(network); - var arg3 = cst_encode_box_autoadd_database_config(databaseConfig); - return wire.wire__crate__api__wallet__bdk_wallet_new( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_wallet, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletNewConstMeta, - argValues: [descriptor, changeDescriptor, network, databaseConfig], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletNewConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_new", - argNames: [ - "descriptor", - "changeDescriptor", - "network", - "databaseConfig" - ], - ); - - @override - BdkPolicy? crateApiWalletBdkWalletPolicies( - {required BdkWallet ptr, required KeychainKind keychain}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_keychain_kind(keychain); - return wire.wire__crate__api__wallet__bdk_wallet_policies(arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_bdk_policy, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletPoliciesConstMeta, - argValues: [ptr, keychain], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletPoliciesConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_policies", - argNames: ["ptr", "keychain"], - ); - - @override - Future crateApiWalletBdkWalletSign( - {required BdkWallet ptr, - required BdkPsbt psbt, - SignOptions? signOptions}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_bdk_psbt(psbt); - var arg2 = cst_encode_opt_box_autoadd_sign_options(signOptions); - return wire.wire__crate__api__wallet__bdk_wallet_sign( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletSignConstMeta, - argValues: [ptr, psbt, signOptions], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletSignConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_sign", - argNames: ["ptr", "psbt", "signOptions"], - ); - - @override - Future crateApiWalletBdkWalletSync( - {required BdkWallet ptr, required BdkBlockchain blockchain}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_bdk_blockchain(blockchain); - return wire.wire__crate__api__wallet__bdk_wallet_sync( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletBdkWalletSyncConstMeta, - argValues: [ptr, blockchain], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletBdkWalletSyncConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_sync", - argNames: ["ptr", "blockchain"], - ); - - @override - Future<(BdkPsbt, TransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder( - {required String txid, - required double feeRate, - BdkAddress? allowShrinking, - required BdkWallet wallet, - required bool enableRbf, - int? nSequence}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(txid); - var arg1 = cst_encode_f_32(feeRate); - var arg2 = cst_encode_opt_box_autoadd_bdk_address(allowShrinking); - var arg3 = cst_encode_box_autoadd_bdk_wallet(wallet); - var arg4 = cst_encode_bool(enableRbf); - var arg5 = cst_encode_opt_box_autoadd_u_32(nSequence); - return wire.wire__crate__api__wallet__finish_bump_fee_tx_builder( - port_, arg0, arg1, arg2, arg3, arg4, arg5); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletFinishBumpFeeTxBuilderConstMeta, - argValues: [txid, feeRate, allowShrinking, wallet, enableRbf, nSequence], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletFinishBumpFeeTxBuilderConstMeta => - const TaskConstMeta( - debugName: "finish_bump_fee_tx_builder", - argNames: [ - "txid", - "feeRate", - "allowShrinking", - "wallet", - "enableRbf", - "nSequence" - ], - ); - - @override - Future<(BdkPsbt, TransactionDetails)> crateApiWalletTxBuilderFinish( - {required BdkWallet wallet, - required List recipients, - required List utxos, - (OutPoint, Input, BigInt)? foreignUtxo, - required List unSpendable, - required ChangeSpendPolicy changePolicy, - required bool manuallySelectedOnly, - double? feeRate, - BigInt? feeAbsolute, - required bool drainWallet, - BdkScriptBuf? drainTo, - RbfValue? rbf, - Map? internalPolicyPath, - Map? externalPolicyPath, - required List data}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(wallet); - var arg1 = cst_encode_list_script_amount(recipients); - var arg2 = cst_encode_list_out_point(utxos); - var arg3 = cst_encode_opt_box_autoadd_record_out_point_input_usize( - foreignUtxo); - var arg4 = cst_encode_list_out_point(unSpendable); - var arg5 = cst_encode_change_spend_policy(changePolicy); - var arg6 = cst_encode_bool(manuallySelectedOnly); - var arg7 = cst_encode_opt_box_autoadd_f_32(feeRate); - var arg8 = cst_encode_opt_box_autoadd_u_64(feeAbsolute); - var arg9 = cst_encode_bool(drainWallet); - var arg10 = cst_encode_opt_box_autoadd_bdk_script_buf(drainTo); - var arg11 = cst_encode_opt_box_autoadd_rbf_value(rbf); - var arg12 = - cst_encode_opt_Map_String_list_prim_u_32_strict(internalPolicyPath); - var arg13 = - cst_encode_opt_Map_String_list_prim_u_32_strict(externalPolicyPath); - var arg14 = cst_encode_list_prim_u_8_loose(data); - return wire.wire__crate__api__wallet__tx_builder_finish( - port_, - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, - arg6, - arg7, - arg8, - arg9, - arg10, - arg11, - arg12, - arg13, - arg14); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kCrateApiWalletTxBuilderFinishConstMeta, - argValues: [ - wallet, - recipients, - utxos, - foreignUtxo, - unSpendable, - changePolicy, - manuallySelectedOnly, - feeRate, - feeAbsolute, - drainWallet, - drainTo, - rbf, - internalPolicyPath, - externalPolicyPath, - data - ], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiWalletTxBuilderFinishConstMeta => - const TaskConstMeta( - debugName: "tx_builder_finish", - argNames: [ - "wallet", - "recipients", - "utxos", - "foreignUtxo", - "unSpendable", - "changePolicy", - "manuallySelectedOnly", - "feeRate", - "feeAbsolute", - "drainWallet", - "drainTo", - "rbf", - "internalPolicyPath", - "externalPolicyPath", - "data" - ], - ); - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_Address => - wire.rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_Address => - wire.rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_DerivationPath => wire - .rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_DerivationPath => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_AnyBlockchain => wire - .rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_AnyBlockchain => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ExtendedDescriptor => wire - .rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ExtendedDescriptor => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_Policy => - wire.rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_Policy => - wire.rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_DescriptorPublicKey => wire - .rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_DescriptorPublicKey => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_DescriptorSecretKey => wire - .rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_DescriptorSecretKey => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_KeyMap => - wire.rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_KeyMap => - wire.rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_Mnemonic => - wire.rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_Mnemonic => - wire.rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexWalletAnyDatabase => wire - .rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexWalletAnyDatabase => wire - .rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexPartiallySignedTransaction => wire - .rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction => wire - .rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction; - - @protected - Map dco_decode_Map_String_list_prim_u_32_strict( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return Map.fromEntries( - dco_decode_list_record_string_list_prim_u_32_strict(raw) - .map((e) => MapEntry(e.$1, e.$2))); - } - - @protected - Map> - dco_decode_Map_list_prim_u_32_strict_list_condition(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return Map.fromEntries( - dco_decode_list_record_list_prim_u_32_strict_list_condition(raw) - .map((e) => MapEntry(e.$1, e.$2))); - } - - @protected - Map> dco_decode_Map_u_32_list_condition(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return Map.fromEntries(dco_decode_list_record_u_32_list_condition(raw) - .map((e) => MapEntry(e.$1, e.$2))); - } - - @protected - Address dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return AddressImpl.frbInternalDcoDecode(raw as List); - } - - @protected - DerivationPath dco_decode_RustOpaque_bdkbitcoinbip32DerivationPath( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return DerivationPathImpl.frbInternalDcoDecode(raw as List); - } - - @protected - AnyBlockchain dco_decode_RustOpaque_bdkblockchainAnyBlockchain(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return AnyBlockchainImpl.frbInternalDcoDecode(raw as List); - } - - @protected - ExtendedDescriptor dco_decode_RustOpaque_bdkdescriptorExtendedDescriptor( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ExtendedDescriptorImpl.frbInternalDcoDecode(raw as List); - } - - @protected - Policy dco_decode_RustOpaque_bdkdescriptorPolicy(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return PolicyImpl.frbInternalDcoDecode(raw as List); - } - - @protected - DescriptorPublicKey dco_decode_RustOpaque_bdkkeysDescriptorPublicKey( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return DescriptorPublicKeyImpl.frbInternalDcoDecode(raw as List); - } - - @protected - DescriptorSecretKey dco_decode_RustOpaque_bdkkeysDescriptorSecretKey( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return DescriptorSecretKeyImpl.frbInternalDcoDecode(raw as List); - } - - @protected - KeyMap dco_decode_RustOpaque_bdkkeysKeyMap(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return KeyMapImpl.frbInternalDcoDecode(raw as List); - } - - @protected - Mnemonic dco_decode_RustOpaque_bdkkeysbip39Mnemonic(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return MnemonicImpl.frbInternalDcoDecode(raw as List); - } - - @protected - MutexWalletAnyDatabase - dco_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return MutexWalletAnyDatabaseImpl.frbInternalDcoDecode( - raw as List); - } - - @protected - MutexPartiallySignedTransaction - dco_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return MutexPartiallySignedTransactionImpl.frbInternalDcoDecode( - raw as List); - } - - @protected - String dco_decode_String(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as String; - } - - @protected - AddressError dco_decode_address_error(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return AddressError_Base58( - dco_decode_String(raw[1]), - ); - case 1: - return AddressError_Bech32( - dco_decode_String(raw[1]), - ); - case 2: - return AddressError_EmptyBech32Payload(); - case 3: - return AddressError_InvalidBech32Variant( - expected: dco_decode_variant(raw[1]), - found: dco_decode_variant(raw[2]), - ); - case 4: - return AddressError_InvalidWitnessVersion( - dco_decode_u_8(raw[1]), - ); - case 5: - return AddressError_UnparsableWitnessVersion( - dco_decode_String(raw[1]), - ); - case 6: - return AddressError_MalformedWitnessVersion(); - case 7: - return AddressError_InvalidWitnessProgramLength( - dco_decode_usize(raw[1]), - ); - case 8: - return AddressError_InvalidSegwitV0ProgramLength( - dco_decode_usize(raw[1]), - ); - case 9: - return AddressError_UncompressedPubkey(); - case 10: - return AddressError_ExcessiveScriptSize(); - case 11: - return AddressError_UnrecognizedScript(); - case 12: - return AddressError_UnknownAddressType( - dco_decode_String(raw[1]), - ); - case 13: - return AddressError_NetworkValidation( - networkRequired: dco_decode_network(raw[1]), - networkFound: dco_decode_network(raw[2]), - address: dco_decode_String(raw[3]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - AddressIndex dco_decode_address_index(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return AddressIndex_Increase(); - case 1: - return AddressIndex_LastUnused(); - case 2: - return AddressIndex_Peek( - index: dco_decode_u_32(raw[1]), - ); - case 3: - return AddressIndex_Reset( - index: dco_decode_u_32(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - Auth dco_decode_auth(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return Auth_None(); - case 1: - return Auth_UserPass( - username: dco_decode_String(raw[1]), - password: dco_decode_String(raw[2]), - ); - case 2: - return Auth_Cookie( - file: dco_decode_String(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - Balance dco_decode_balance(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 6) - throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); - return Balance( - immature: dco_decode_u_64(arr[0]), - trustedPending: dco_decode_u_64(arr[1]), - untrustedPending: dco_decode_u_64(arr[2]), - confirmed: dco_decode_u_64(arr[3]), - spendable: dco_decode_u_64(arr[4]), - total: dco_decode_u_64(arr[5]), - ); - } - - @protected - BdkAddress dco_decode_bdk_address(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkAddress( - ptr: dco_decode_RustOpaque_bdkbitcoinAddress(arr[0]), - ); - } - - @protected - BdkBlockchain dco_decode_bdk_blockchain(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkBlockchain( - ptr: dco_decode_RustOpaque_bdkblockchainAnyBlockchain(arr[0]), - ); - } - - @protected - BdkDerivationPath dco_decode_bdk_derivation_path(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkDerivationPath( - ptr: dco_decode_RustOpaque_bdkbitcoinbip32DerivationPath(arr[0]), - ); - } - - @protected - BdkDescriptor dco_decode_bdk_descriptor(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return BdkDescriptor( - extendedDescriptor: - dco_decode_RustOpaque_bdkdescriptorExtendedDescriptor(arr[0]), - keyMap: dco_decode_RustOpaque_bdkkeysKeyMap(arr[1]), - ); - } - - @protected - BdkDescriptorPublicKey dco_decode_bdk_descriptor_public_key(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkDescriptorPublicKey( - ptr: dco_decode_RustOpaque_bdkkeysDescriptorPublicKey(arr[0]), - ); - } - - @protected - BdkDescriptorSecretKey dco_decode_bdk_descriptor_secret_key(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkDescriptorSecretKey( - ptr: dco_decode_RustOpaque_bdkkeysDescriptorSecretKey(arr[0]), - ); - } - - @protected - BdkError dco_decode_bdk_error(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return BdkError_Hex( - dco_decode_box_autoadd_hex_error(raw[1]), - ); - case 1: - return BdkError_Consensus( - dco_decode_box_autoadd_consensus_error(raw[1]), - ); - case 2: - return BdkError_VerifyTransaction( - dco_decode_String(raw[1]), - ); - case 3: - return BdkError_Address( - dco_decode_box_autoadd_address_error(raw[1]), - ); - case 4: - return BdkError_Descriptor( - dco_decode_box_autoadd_descriptor_error(raw[1]), - ); - case 5: - return BdkError_InvalidU32Bytes( - dco_decode_list_prim_u_8_strict(raw[1]), - ); - case 6: - return BdkError_Generic( - dco_decode_String(raw[1]), - ); - case 7: - return BdkError_ScriptDoesntHaveAddressForm(); - case 8: - return BdkError_NoRecipients(); - case 9: - return BdkError_NoUtxosSelected(); - case 10: - return BdkError_OutputBelowDustLimit( - dco_decode_usize(raw[1]), - ); - case 11: - return BdkError_InsufficientFunds( - needed: dco_decode_u_64(raw[1]), - available: dco_decode_u_64(raw[2]), - ); - case 12: - return BdkError_BnBTotalTriesExceeded(); - case 13: - return BdkError_BnBNoExactMatch(); - case 14: - return BdkError_UnknownUtxo(); - case 15: - return BdkError_TransactionNotFound(); - case 16: - return BdkError_TransactionConfirmed(); - case 17: - return BdkError_IrreplaceableTransaction(); - case 18: - return BdkError_FeeRateTooLow( - needed: dco_decode_f_32(raw[1]), - ); - case 19: - return BdkError_FeeTooLow( - needed: dco_decode_u_64(raw[1]), - ); - case 20: - return BdkError_FeeRateUnavailable(); - case 21: - return BdkError_MissingKeyOrigin( - dco_decode_String(raw[1]), - ); - case 22: - return BdkError_Key( - dco_decode_String(raw[1]), - ); - case 23: - return BdkError_ChecksumMismatch(); - case 24: - return BdkError_SpendingPolicyRequired( - dco_decode_keychain_kind(raw[1]), - ); - case 25: - return BdkError_InvalidPolicyPathError( - dco_decode_String(raw[1]), - ); - case 26: - return BdkError_Signer( - dco_decode_String(raw[1]), - ); - case 27: - return BdkError_InvalidNetwork( - requested: dco_decode_network(raw[1]), - found: dco_decode_network(raw[2]), - ); - case 28: - return BdkError_InvalidOutpoint( - dco_decode_box_autoadd_out_point(raw[1]), - ); - case 29: - return BdkError_Encode( - dco_decode_String(raw[1]), - ); - case 30: - return BdkError_Miniscript( - dco_decode_String(raw[1]), - ); - case 31: - return BdkError_MiniscriptPsbt( - dco_decode_String(raw[1]), - ); - case 32: - return BdkError_Bip32( - dco_decode_String(raw[1]), - ); - case 33: - return BdkError_Bip39( - dco_decode_String(raw[1]), - ); - case 34: - return BdkError_Secp256k1( - dco_decode_String(raw[1]), - ); - case 35: - return BdkError_Json( - dco_decode_String(raw[1]), - ); - case 36: - return BdkError_Psbt( - dco_decode_String(raw[1]), - ); - case 37: - return BdkError_PsbtParse( - dco_decode_String(raw[1]), - ); - case 38: - return BdkError_MissingCachedScripts( - dco_decode_usize(raw[1]), - dco_decode_usize(raw[2]), - ); - case 39: - return BdkError_Electrum( - dco_decode_String(raw[1]), - ); - case 40: - return BdkError_Esplora( - dco_decode_String(raw[1]), - ); - case 41: - return BdkError_Sled( - dco_decode_String(raw[1]), - ); - case 42: - return BdkError_Rpc( - dco_decode_String(raw[1]), - ); - case 43: - return BdkError_Rusqlite( - dco_decode_String(raw[1]), - ); - case 44: - return BdkError_InvalidInput( - dco_decode_String(raw[1]), - ); - case 45: - return BdkError_InvalidLockTime( - dco_decode_String(raw[1]), - ); - case 46: - return BdkError_InvalidTransaction( - dco_decode_String(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - BdkMnemonic dco_decode_bdk_mnemonic(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkMnemonic( - ptr: dco_decode_RustOpaque_bdkkeysbip39Mnemonic(arr[0]), - ); - } - - @protected - BdkPolicy dco_decode_bdk_policy(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkPolicy( - ptr: dco_decode_RustOpaque_bdkdescriptorPolicy(arr[0]), - ); - } - - @protected - BdkPsbt dco_decode_bdk_psbt(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkPsbt( - ptr: - dco_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - arr[0]), - ); - } - - @protected - BdkScriptBuf dco_decode_bdk_script_buf(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkScriptBuf( - bytes: dco_decode_list_prim_u_8_strict(arr[0]), - ); - } - - @protected - BdkTransaction dco_decode_bdk_transaction(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkTransaction( - s: dco_decode_String(arr[0]), - ); - } - - @protected - BdkWallet dco_decode_bdk_wallet(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkWallet( - ptr: dco_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - arr[0]), - ); - } - - @protected - BlockTime dco_decode_block_time(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return BlockTime( - height: dco_decode_u_32(arr[0]), - timestamp: dco_decode_u_64(arr[1]), - ); - } - - @protected - BlockchainConfig dco_decode_blockchain_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return BlockchainConfig_Electrum( - config: dco_decode_box_autoadd_electrum_config(raw[1]), - ); - case 1: - return BlockchainConfig_Esplora( - config: dco_decode_box_autoadd_esplora_config(raw[1]), - ); - case 2: - return BlockchainConfig_Rpc( - config: dco_decode_box_autoadd_rpc_config(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - bool dco_decode_bool(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as bool; - } - - @protected - AddressError dco_decode_box_autoadd_address_error(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_address_error(raw); - } - - @protected - AddressIndex dco_decode_box_autoadd_address_index(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_address_index(raw); - } - - @protected - BdkAddress dco_decode_box_autoadd_bdk_address(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_address(raw); - } - - @protected - BdkBlockchain dco_decode_box_autoadd_bdk_blockchain(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_blockchain(raw); - } - - @protected - BdkDerivationPath dco_decode_box_autoadd_bdk_derivation_path(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_derivation_path(raw); - } - - @protected - BdkDescriptor dco_decode_box_autoadd_bdk_descriptor(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_descriptor(raw); - } - - @protected - BdkDescriptorPublicKey dco_decode_box_autoadd_bdk_descriptor_public_key( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_descriptor_public_key(raw); - } - - @protected - BdkDescriptorSecretKey dco_decode_box_autoadd_bdk_descriptor_secret_key( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_descriptor_secret_key(raw); - } - - @protected - BdkMnemonic dco_decode_box_autoadd_bdk_mnemonic(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_mnemonic(raw); - } - - @protected - BdkPolicy dco_decode_box_autoadd_bdk_policy(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_policy(raw); - } - - @protected - BdkPsbt dco_decode_box_autoadd_bdk_psbt(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_psbt(raw); - } - - @protected - BdkScriptBuf dco_decode_box_autoadd_bdk_script_buf(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_script_buf(raw); - } - - @protected - BdkTransaction dco_decode_box_autoadd_bdk_transaction(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_transaction(raw); - } - - @protected - BdkWallet dco_decode_box_autoadd_bdk_wallet(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_wallet(raw); - } - - @protected - BlockTime dco_decode_box_autoadd_block_time(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_block_time(raw); - } - - @protected - BlockchainConfig dco_decode_box_autoadd_blockchain_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_blockchain_config(raw); - } - - @protected - bool dco_decode_box_autoadd_bool(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as bool; - } - - @protected - Condition dco_decode_box_autoadd_condition(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_condition(raw); - } - - @protected - ConsensusError dco_decode_box_autoadd_consensus_error(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_consensus_error(raw); - } - - @protected - DatabaseConfig dco_decode_box_autoadd_database_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_database_config(raw); - } - - @protected - DescriptorError dco_decode_box_autoadd_descriptor_error(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_descriptor_error(raw); - } - - @protected - ElectrumConfig dco_decode_box_autoadd_electrum_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_electrum_config(raw); - } - - @protected - EsploraConfig dco_decode_box_autoadd_esplora_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_esplora_config(raw); - } - - @protected - double dco_decode_box_autoadd_f_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as double; - } - - @protected - FeeRate dco_decode_box_autoadd_fee_rate(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_fee_rate(raw); - } - - @protected - HexError dco_decode_box_autoadd_hex_error(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_hex_error(raw); - } - - @protected - LocalUtxo dco_decode_box_autoadd_local_utxo(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_local_utxo(raw); - } - - @protected - LockTime dco_decode_box_autoadd_lock_time(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_lock_time(raw); - } - - @protected - OutPoint dco_decode_box_autoadd_out_point(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_out_point(raw); - } - - @protected - PkOrF dco_decode_box_autoadd_pk_or_f(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_pk_or_f(raw); - } - - @protected - PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_psbt_sig_hash_type(raw); - } - - @protected - RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_rbf_value(raw); - } - - @protected - (OutPoint, Input, BigInt) dco_decode_box_autoadd_record_out_point_input_usize( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as (OutPoint, Input, BigInt); - } - - @protected - RpcConfig dco_decode_box_autoadd_rpc_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_rpc_config(raw); - } - - @protected - RpcSyncParams dco_decode_box_autoadd_rpc_sync_params(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_rpc_sync_params(raw); - } - - @protected - SignOptions dco_decode_box_autoadd_sign_options(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_sign_options(raw); - } - - @protected - SledDbConfiguration dco_decode_box_autoadd_sled_db_configuration( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_sled_db_configuration(raw); - } - - @protected - SqliteDbConfiguration dco_decode_box_autoadd_sqlite_db_configuration( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_sqlite_db_configuration(raw); - } - - @protected - int dco_decode_box_autoadd_u_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; - } - - @protected - BigInt dco_decode_box_autoadd_u_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_u_64(raw); - } - - @protected - int dco_decode_box_autoadd_u_8(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; - } - - @protected - ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ChangeSpendPolicy.values[raw as int]; - } - - @protected - Condition dco_decode_condition(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return Condition( - csv: dco_decode_opt_box_autoadd_u_32(arr[0]), - timelock: dco_decode_opt_box_autoadd_lock_time(arr[1]), - ); - } - - @protected - ConsensusError dco_decode_consensus_error(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return ConsensusError_Io( - dco_decode_String(raw[1]), - ); - case 1: - return ConsensusError_OversizedVectorAllocation( - requested: dco_decode_usize(raw[1]), - max: dco_decode_usize(raw[2]), - ); - case 2: - return ConsensusError_InvalidChecksum( - expected: dco_decode_u_8_array_4(raw[1]), - actual: dco_decode_u_8_array_4(raw[2]), - ); - case 3: - return ConsensusError_NonMinimalVarInt(); - case 4: - return ConsensusError_ParseFailed( - dco_decode_String(raw[1]), - ); - case 5: - return ConsensusError_UnsupportedSegwitFlag( - dco_decode_u_8(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - DatabaseConfig dco_decode_database_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return DatabaseConfig_Memory(); - case 1: - return DatabaseConfig_Sqlite( - config: dco_decode_box_autoadd_sqlite_db_configuration(raw[1]), - ); - case 2: - return DatabaseConfig_Sled( - config: dco_decode_box_autoadd_sled_db_configuration(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - DescriptorError dco_decode_descriptor_error(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return DescriptorError_InvalidHdKeyPath(); - case 1: - return DescriptorError_InvalidDescriptorChecksum(); - case 2: - return DescriptorError_HardenedDerivationXpub(); - case 3: - return DescriptorError_MultiPath(); - case 4: - return DescriptorError_Key( - dco_decode_String(raw[1]), - ); - case 5: - return DescriptorError_Policy( - dco_decode_String(raw[1]), - ); - case 6: - return DescriptorError_InvalidDescriptorCharacter( - dco_decode_u_8(raw[1]), - ); - case 7: - return DescriptorError_Bip32( - dco_decode_String(raw[1]), - ); - case 8: - return DescriptorError_Base58( - dco_decode_String(raw[1]), - ); - case 9: - return DescriptorError_Pk( - dco_decode_String(raw[1]), - ); - case 10: - return DescriptorError_Miniscript( - dco_decode_String(raw[1]), - ); - case 11: - return DescriptorError_Hex( - dco_decode_String(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - ElectrumConfig dco_decode_electrum_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 6) - throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); - return ElectrumConfig( - url: dco_decode_String(arr[0]), - socks5: dco_decode_opt_String(arr[1]), - retry: dco_decode_u_8(arr[2]), - timeout: dco_decode_opt_box_autoadd_u_8(arr[3]), - stopGap: dco_decode_u_64(arr[4]), - validateDomain: dco_decode_bool(arr[5]), - ); - } - - @protected - EsploraConfig dco_decode_esplora_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 5) - throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return EsploraConfig( - baseUrl: dco_decode_String(arr[0]), - proxy: dco_decode_opt_String(arr[1]), - concurrency: dco_decode_opt_box_autoadd_u_8(arr[2]), - stopGap: dco_decode_u_64(arr[3]), - timeout: dco_decode_opt_box_autoadd_u_64(arr[4]), - ); - } - - @protected - double dco_decode_f_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as double; - } - - @protected - FeeRate dco_decode_fee_rate(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return FeeRate( - satPerVb: dco_decode_f_32(arr[0]), - ); - } - - @protected - HexError dco_decode_hex_error(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return HexError_InvalidChar( - dco_decode_u_8(raw[1]), - ); - case 1: - return HexError_OddLengthString( - dco_decode_usize(raw[1]), - ); - case 2: - return HexError_InvalidLength( - dco_decode_usize(raw[1]), - dco_decode_usize(raw[2]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - int dco_decode_i_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; - } - - @protected - Input dco_decode_input(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return Input( - s: dco_decode_String(arr[0]), - ); - } - - @protected - KeychainKind dco_decode_keychain_kind(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return KeychainKind.values[raw as int]; - } - - @protected - List dco_decode_list_bdk_policy(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_bdk_policy).toList(); - } - - @protected - List dco_decode_list_condition(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_condition).toList(); - } - - @protected - List dco_decode_list_list_prim_u_8_strict(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_list_prim_u_8_strict).toList(); - } - - @protected - List dco_decode_list_local_utxo(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_local_utxo).toList(); - } - - @protected - List dco_decode_list_out_point(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_out_point).toList(); - } - - @protected - List dco_decode_list_pk_or_f(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_pk_or_f).toList(); - } - - @protected - Uint32List dco_decode_list_prim_u_32_strict(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as Uint32List; - } - - @protected - Uint64List dco_decode_list_prim_u_64_strict(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeUint64List(raw); - } - - @protected - List dco_decode_list_prim_u_8_loose(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as List; - } - - @protected - Uint8List dco_decode_list_prim_u_8_strict(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as Uint8List; - } - - @protected - List<(Uint32List, List)> - dco_decode_list_record_list_prim_u_32_strict_list_condition(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List) - .map(dco_decode_record_list_prim_u_32_strict_list_condition) - .toList(); - } - - @protected - List<(String, Uint32List)> - dco_decode_list_record_string_list_prim_u_32_strict(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List) - .map(dco_decode_record_string_list_prim_u_32_strict) - .toList(); - } - - @protected - List<(int, List)> dco_decode_list_record_u_32_list_condition( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List) - .map(dco_decode_record_u_32_list_condition) - .toList(); - } - - @protected - List dco_decode_list_script_amount(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_script_amount).toList(); - } - - @protected - List dco_decode_list_transaction_details(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_transaction_details).toList(); - } - - @protected - List dco_decode_list_tx_in(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_tx_in).toList(); - } - - @protected - List dco_decode_list_tx_out(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_tx_out).toList(); - } - - @protected - LocalUtxo dco_decode_local_utxo(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 4) - throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return LocalUtxo( - outpoint: dco_decode_out_point(arr[0]), - txout: dco_decode_tx_out(arr[1]), - keychain: dco_decode_keychain_kind(arr[2]), - isSpent: dco_decode_bool(arr[3]), - ); - } - - @protected - LockTime dco_decode_lock_time(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return LockTime_Blocks( - dco_decode_u_32(raw[1]), - ); - case 1: - return LockTime_Seconds( - dco_decode_u_32(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - Network dco_decode_network(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return Network.values[raw as int]; - } - - @protected - Map? dco_decode_opt_Map_String_list_prim_u_32_strict( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null - ? null - : dco_decode_Map_String_list_prim_u_32_strict(raw); - } - - @protected - String? dco_decode_opt_String(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_String(raw); - } - - @protected - BdkAddress? dco_decode_opt_box_autoadd_bdk_address(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_bdk_address(raw); - } - - @protected - BdkDescriptor? dco_decode_opt_box_autoadd_bdk_descriptor(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_bdk_descriptor(raw); - } - - @protected - BdkPolicy? dco_decode_opt_box_autoadd_bdk_policy(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_bdk_policy(raw); - } - - @protected - BdkScriptBuf? dco_decode_opt_box_autoadd_bdk_script_buf(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_bdk_script_buf(raw); - } - - @protected - BdkTransaction? dco_decode_opt_box_autoadd_bdk_transaction(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_bdk_transaction(raw); - } - - @protected - BlockTime? dco_decode_opt_box_autoadd_block_time(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_block_time(raw); - } - - @protected - bool? dco_decode_opt_box_autoadd_bool(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_bool(raw); - } - - @protected - double? dco_decode_opt_box_autoadd_f_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_f_32(raw); - } - - @protected - FeeRate? dco_decode_opt_box_autoadd_fee_rate(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_fee_rate(raw); - } - - @protected - LockTime? dco_decode_opt_box_autoadd_lock_time(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_lock_time(raw); - } - - @protected - PsbtSigHashType? dco_decode_opt_box_autoadd_psbt_sig_hash_type(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_psbt_sig_hash_type(raw); - } - - @protected - RbfValue? dco_decode_opt_box_autoadd_rbf_value(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_rbf_value(raw); - } - - @protected - (OutPoint, Input, BigInt)? - dco_decode_opt_box_autoadd_record_out_point_input_usize(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null - ? null - : dco_decode_box_autoadd_record_out_point_input_usize(raw); - } - - @protected - RpcSyncParams? dco_decode_opt_box_autoadd_rpc_sync_params(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_rpc_sync_params(raw); - } - - @protected - SignOptions? dco_decode_opt_box_autoadd_sign_options(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_sign_options(raw); - } - - @protected - int? dco_decode_opt_box_autoadd_u_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_u_32(raw); - } - - @protected - BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_u_64(raw); - } - - @protected - int? dco_decode_opt_box_autoadd_u_8(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_u_8(raw); - } - - @protected - OutPoint dco_decode_out_point(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return OutPoint( - txid: dco_decode_String(arr[0]), - vout: dco_decode_u_32(arr[1]), - ); - } - - @protected - Payload dco_decode_payload(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return Payload_PubkeyHash( - pubkeyHash: dco_decode_String(raw[1]), - ); - case 1: - return Payload_ScriptHash( - scriptHash: dco_decode_String(raw[1]), - ); - case 2: - return Payload_WitnessProgram( - version: dco_decode_witness_version(raw[1]), - program: dco_decode_list_prim_u_8_strict(raw[2]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - PkOrF dco_decode_pk_or_f(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return PkOrF_Pubkey( - value: dco_decode_String(raw[1]), - ); - case 1: - return PkOrF_XOnlyPubkey( - value: dco_decode_String(raw[1]), - ); - case 2: - return PkOrF_Fingerprint( - value: dco_decode_String(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - PsbtSigHashType dco_decode_psbt_sig_hash_type(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return PsbtSigHashType( - inner: dco_decode_u_32(arr[0]), - ); - } - - @protected - RbfValue dco_decode_rbf_value(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return RbfValue_RbfDefault(); - case 1: - return RbfValue_Value( - dco_decode_u_32(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - (BdkAddress, int) dco_decode_record_bdk_address_u_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) { - throw Exception('Expected 2 elements, got ${arr.length}'); - } - return ( - dco_decode_bdk_address(arr[0]), - dco_decode_u_32(arr[1]), - ); - } - - @protected - (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) { - throw Exception('Expected 2 elements, got ${arr.length}'); - } - return ( - dco_decode_bdk_psbt(arr[0]), - dco_decode_transaction_details(arr[1]), - ); - } - - @protected - (Uint32List, List) - dco_decode_record_list_prim_u_32_strict_list_condition(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) { - throw Exception('Expected 2 elements, got ${arr.length}'); - } - return ( - dco_decode_list_prim_u_32_strict(arr[0]), - dco_decode_list_condition(arr[1]), - ); - } - - @protected - (OutPoint, Input, BigInt) dco_decode_record_out_point_input_usize( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 3) { - throw Exception('Expected 3 elements, got ${arr.length}'); - } - return ( - dco_decode_out_point(arr[0]), - dco_decode_input(arr[1]), - dco_decode_usize(arr[2]), - ); - } - - @protected - (String, Uint32List) dco_decode_record_string_list_prim_u_32_strict( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) { - throw Exception('Expected 2 elements, got ${arr.length}'); - } - return ( - dco_decode_String(arr[0]), - dco_decode_list_prim_u_32_strict(arr[1]), - ); - } - - @protected - (int, List) dco_decode_record_u_32_list_condition(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) { - throw Exception('Expected 2 elements, got ${arr.length}'); - } - return ( - dco_decode_u_32(arr[0]), - dco_decode_list_condition(arr[1]), - ); - } - - @protected - RpcConfig dco_decode_rpc_config(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 5) - throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return RpcConfig( - url: dco_decode_String(arr[0]), - auth: dco_decode_auth(arr[1]), - network: dco_decode_network(arr[2]), - walletName: dco_decode_String(arr[3]), - syncParams: dco_decode_opt_box_autoadd_rpc_sync_params(arr[4]), - ); - } - - @protected - RpcSyncParams dco_decode_rpc_sync_params(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 4) - throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return RpcSyncParams( - startScriptCount: dco_decode_u_64(arr[0]), - startTime: dco_decode_u_64(arr[1]), - forceStartTime: dco_decode_bool(arr[2]), - pollRateSec: dco_decode_u_64(arr[3]), - ); - } - - @protected - Satisfaction dco_decode_satisfaction(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return Satisfaction_Partial( - n: dco_decode_u_64(raw[1]), - m: dco_decode_u_64(raw[2]), - items: dco_decode_list_prim_u_64_strict(raw[3]), - sorted: dco_decode_opt_box_autoadd_bool(raw[4]), - conditions: dco_decode_Map_u_32_list_condition(raw[5]), - ); - case 1: - return Satisfaction_PartialComplete( - n: dco_decode_u_64(raw[1]), - m: dco_decode_u_64(raw[2]), - items: dco_decode_list_prim_u_64_strict(raw[3]), - sorted: dco_decode_opt_box_autoadd_bool(raw[4]), - conditions: - dco_decode_Map_list_prim_u_32_strict_list_condition(raw[5]), - ); - case 2: - return Satisfaction_Complete( - condition: dco_decode_box_autoadd_condition(raw[1]), - ); - case 3: - return Satisfaction_None( - msg: dco_decode_String(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - SatisfiableItem dco_decode_satisfiable_item(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return SatisfiableItem_EcdsaSignature( - key: dco_decode_box_autoadd_pk_or_f(raw[1]), - ); - case 1: - return SatisfiableItem_SchnorrSignature( - key: dco_decode_box_autoadd_pk_or_f(raw[1]), - ); - case 2: - return SatisfiableItem_Sha256Preimage( - hash: dco_decode_String(raw[1]), - ); - case 3: - return SatisfiableItem_Hash256Preimage( - hash: dco_decode_String(raw[1]), - ); - case 4: - return SatisfiableItem_Ripemd160Preimage( - hash: dco_decode_String(raw[1]), - ); - case 5: - return SatisfiableItem_Hash160Preimage( - hash: dco_decode_String(raw[1]), - ); - case 6: - return SatisfiableItem_AbsoluteTimelock( - value: dco_decode_box_autoadd_lock_time(raw[1]), - ); - case 7: - return SatisfiableItem_RelativeTimelock( - value: dco_decode_u_32(raw[1]), - ); - case 8: - return SatisfiableItem_Multisig( - keys: dco_decode_list_pk_or_f(raw[1]), - threshold: dco_decode_u_64(raw[2]), - ); - case 9: - return SatisfiableItem_Thresh( - items: dco_decode_list_bdk_policy(raw[1]), - threshold: dco_decode_u_64(raw[2]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - ScriptAmount dco_decode_script_amount(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return ScriptAmount( - script: dco_decode_bdk_script_buf(arr[0]), - amount: dco_decode_u_64(arr[1]), - ); - } - - @protected - SignOptions dco_decode_sign_options(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 7) - throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return SignOptions( - trustWitnessUtxo: dco_decode_bool(arr[0]), - assumeHeight: dco_decode_opt_box_autoadd_u_32(arr[1]), - allowAllSighashes: dco_decode_bool(arr[2]), - removePartialSigs: dco_decode_bool(arr[3]), - tryFinalize: dco_decode_bool(arr[4]), - signWithTapInternalKey: dco_decode_bool(arr[5]), - allowGrinding: dco_decode_bool(arr[6]), - ); - } - - @protected - SledDbConfiguration dco_decode_sled_db_configuration(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return SledDbConfiguration( - path: dco_decode_String(arr[0]), - treeName: dco_decode_String(arr[1]), - ); - } - - @protected - SqliteDbConfiguration dco_decode_sqlite_db_configuration(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SqliteDbConfiguration( - path: dco_decode_String(arr[0]), - ); - } - - @protected - TransactionDetails dco_decode_transaction_details(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 6) - throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); - return TransactionDetails( - transaction: dco_decode_opt_box_autoadd_bdk_transaction(arr[0]), - txid: dco_decode_String(arr[1]), - received: dco_decode_u_64(arr[2]), - sent: dco_decode_u_64(arr[3]), - fee: dco_decode_opt_box_autoadd_u_64(arr[4]), - confirmationTime: dco_decode_opt_box_autoadd_block_time(arr[5]), - ); - } - - @protected - TxIn dco_decode_tx_in(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 4) - throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return TxIn( - previousOutput: dco_decode_out_point(arr[0]), - scriptSig: dco_decode_bdk_script_buf(arr[1]), - sequence: dco_decode_u_32(arr[2]), - witness: dco_decode_list_list_prim_u_8_strict(arr[3]), - ); - } - - @protected - TxOut dco_decode_tx_out(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return TxOut( - value: dco_decode_u_64(arr[0]), - scriptPubkey: dco_decode_bdk_script_buf(arr[1]), - ); - } - - @protected - int dco_decode_u_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; - } - - @protected - BigInt dco_decode_u_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeU64(raw); - } - - @protected - int dco_decode_u_8(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; - } - - @protected - U8Array4 dco_decode_u_8_array_4(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return U8Array4(dco_decode_list_prim_u_8_strict(raw)); - } - - @protected - void dco_decode_unit(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return; - } - - @protected - BigInt dco_decode_usize(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeU64(raw); - } - - @protected - Variant dco_decode_variant(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return Variant.values[raw as int]; - } - - @protected - WitnessVersion dco_decode_witness_version(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return WitnessVersion.values[raw as int]; - } - - @protected - WordCount dco_decode_word_count(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return WordCount.values[raw as int]; - } - - @protected - Map sse_decode_Map_String_list_prim_u_32_strict( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = - sse_decode_list_record_string_list_prim_u_32_strict(deserializer); - return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); - } - - @protected - Map> - sse_decode_Map_list_prim_u_32_strict_list_condition( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_list_record_list_prim_u_32_strict_list_condition( - deserializer); - return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); - } - - @protected - Map> sse_decode_Map_u_32_list_condition( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_list_record_u_32_list_condition(deserializer); - return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); - } - - @protected - Address sse_decode_RustOpaque_bdkbitcoinAddress( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return AddressImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - DerivationPath sse_decode_RustOpaque_bdkbitcoinbip32DerivationPath( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return DerivationPathImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - AnyBlockchain sse_decode_RustOpaque_bdkblockchainAnyBlockchain( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return AnyBlockchainImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - ExtendedDescriptor sse_decode_RustOpaque_bdkdescriptorExtendedDescriptor( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ExtendedDescriptorImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - Policy sse_decode_RustOpaque_bdkdescriptorPolicy( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return PolicyImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - DescriptorPublicKey sse_decode_RustOpaque_bdkkeysDescriptorPublicKey( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return DescriptorPublicKeyImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - DescriptorSecretKey sse_decode_RustOpaque_bdkkeysDescriptorSecretKey( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return DescriptorSecretKeyImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - KeyMap sse_decode_RustOpaque_bdkkeysKeyMap(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return KeyMapImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - Mnemonic sse_decode_RustOpaque_bdkkeysbip39Mnemonic( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return MnemonicImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - MutexWalletAnyDatabase - sse_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return MutexWalletAnyDatabaseImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - MutexPartiallySignedTransaction - sse_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return MutexPartiallySignedTransactionImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - String sse_decode_String(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_list_prim_u_8_strict(deserializer); - return utf8.decoder.convert(inner); - } - - @protected - AddressError sse_decode_address_error(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_field0 = sse_decode_String(deserializer); - return AddressError_Base58(var_field0); - case 1: - var var_field0 = sse_decode_String(deserializer); - return AddressError_Bech32(var_field0); - case 2: - return AddressError_EmptyBech32Payload(); - case 3: - var var_expected = sse_decode_variant(deserializer); - var var_found = sse_decode_variant(deserializer); - return AddressError_InvalidBech32Variant( - expected: var_expected, found: var_found); - case 4: - var var_field0 = sse_decode_u_8(deserializer); - return AddressError_InvalidWitnessVersion(var_field0); - case 5: - var var_field0 = sse_decode_String(deserializer); - return AddressError_UnparsableWitnessVersion(var_field0); - case 6: - return AddressError_MalformedWitnessVersion(); - case 7: - var var_field0 = sse_decode_usize(deserializer); - return AddressError_InvalidWitnessProgramLength(var_field0); - case 8: - var var_field0 = sse_decode_usize(deserializer); - return AddressError_InvalidSegwitV0ProgramLength(var_field0); - case 9: - return AddressError_UncompressedPubkey(); - case 10: - return AddressError_ExcessiveScriptSize(); - case 11: - return AddressError_UnrecognizedScript(); - case 12: - var var_field0 = sse_decode_String(deserializer); - return AddressError_UnknownAddressType(var_field0); - case 13: - var var_networkRequired = sse_decode_network(deserializer); - var var_networkFound = sse_decode_network(deserializer); - var var_address = sse_decode_String(deserializer); - return AddressError_NetworkValidation( - networkRequired: var_networkRequired, - networkFound: var_networkFound, - address: var_address); - default: - throw UnimplementedError(''); - } - } - - @protected - AddressIndex sse_decode_address_index(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - return AddressIndex_Increase(); - case 1: - return AddressIndex_LastUnused(); - case 2: - var var_index = sse_decode_u_32(deserializer); - return AddressIndex_Peek(index: var_index); - case 3: - var var_index = sse_decode_u_32(deserializer); - return AddressIndex_Reset(index: var_index); - default: - throw UnimplementedError(''); - } - } - - @protected - Auth sse_decode_auth(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - return Auth_None(); - case 1: - var var_username = sse_decode_String(deserializer); - var var_password = sse_decode_String(deserializer); - return Auth_UserPass(username: var_username, password: var_password); - case 2: - var var_file = sse_decode_String(deserializer); - return Auth_Cookie(file: var_file); - default: - throw UnimplementedError(''); - } - } - - @protected - Balance sse_decode_balance(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_immature = sse_decode_u_64(deserializer); - var var_trustedPending = sse_decode_u_64(deserializer); - var var_untrustedPending = sse_decode_u_64(deserializer); - var var_confirmed = sse_decode_u_64(deserializer); - var var_spendable = sse_decode_u_64(deserializer); - var var_total = sse_decode_u_64(deserializer); - return Balance( - immature: var_immature, - trustedPending: var_trustedPending, - untrustedPending: var_untrustedPending, - confirmed: var_confirmed, - spendable: var_spendable, - total: var_total); - } - - @protected - BdkAddress sse_decode_bdk_address(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_bdkbitcoinAddress(deserializer); - return BdkAddress(ptr: var_ptr); - } - - @protected - BdkBlockchain sse_decode_bdk_blockchain(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_bdkblockchainAnyBlockchain(deserializer); - return BdkBlockchain(ptr: var_ptr); - } - - @protected - BdkDerivationPath sse_decode_bdk_derivation_path( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_bdkbitcoinbip32DerivationPath(deserializer); - return BdkDerivationPath(ptr: var_ptr); - } - - @protected - BdkDescriptor sse_decode_bdk_descriptor(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_extendedDescriptor = - sse_decode_RustOpaque_bdkdescriptorExtendedDescriptor(deserializer); - var var_keyMap = sse_decode_RustOpaque_bdkkeysKeyMap(deserializer); - return BdkDescriptor( - extendedDescriptor: var_extendedDescriptor, keyMap: var_keyMap); - } - - @protected - BdkDescriptorPublicKey sse_decode_bdk_descriptor_public_key( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_bdkkeysDescriptorPublicKey(deserializer); - return BdkDescriptorPublicKey(ptr: var_ptr); - } - - @protected - BdkDescriptorSecretKey sse_decode_bdk_descriptor_secret_key( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_bdkkeysDescriptorSecretKey(deserializer); - return BdkDescriptorSecretKey(ptr: var_ptr); - } - - @protected - BdkError sse_decode_bdk_error(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_field0 = sse_decode_box_autoadd_hex_error(deserializer); - return BdkError_Hex(var_field0); - case 1: - var var_field0 = sse_decode_box_autoadd_consensus_error(deserializer); - return BdkError_Consensus(var_field0); - case 2: - var var_field0 = sse_decode_String(deserializer); - return BdkError_VerifyTransaction(var_field0); - case 3: - var var_field0 = sse_decode_box_autoadd_address_error(deserializer); - return BdkError_Address(var_field0); - case 4: - var var_field0 = sse_decode_box_autoadd_descriptor_error(deserializer); - return BdkError_Descriptor(var_field0); - case 5: - var var_field0 = sse_decode_list_prim_u_8_strict(deserializer); - return BdkError_InvalidU32Bytes(var_field0); - case 6: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Generic(var_field0); - case 7: - return BdkError_ScriptDoesntHaveAddressForm(); - case 8: - return BdkError_NoRecipients(); - case 9: - return BdkError_NoUtxosSelected(); - case 10: - var var_field0 = sse_decode_usize(deserializer); - return BdkError_OutputBelowDustLimit(var_field0); - case 11: - var var_needed = sse_decode_u_64(deserializer); - var var_available = sse_decode_u_64(deserializer); - return BdkError_InsufficientFunds( - needed: var_needed, available: var_available); - case 12: - return BdkError_BnBTotalTriesExceeded(); - case 13: - return BdkError_BnBNoExactMatch(); - case 14: - return BdkError_UnknownUtxo(); - case 15: - return BdkError_TransactionNotFound(); - case 16: - return BdkError_TransactionConfirmed(); - case 17: - return BdkError_IrreplaceableTransaction(); - case 18: - var var_needed = sse_decode_f_32(deserializer); - return BdkError_FeeRateTooLow(needed: var_needed); - case 19: - var var_needed = sse_decode_u_64(deserializer); - return BdkError_FeeTooLow(needed: var_needed); - case 20: - return BdkError_FeeRateUnavailable(); - case 21: - var var_field0 = sse_decode_String(deserializer); - return BdkError_MissingKeyOrigin(var_field0); - case 22: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Key(var_field0); - case 23: - return BdkError_ChecksumMismatch(); - case 24: - var var_field0 = sse_decode_keychain_kind(deserializer); - return BdkError_SpendingPolicyRequired(var_field0); - case 25: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidPolicyPathError(var_field0); - case 26: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Signer(var_field0); - case 27: - var var_requested = sse_decode_network(deserializer); - var var_found = sse_decode_network(deserializer); - return BdkError_InvalidNetwork( - requested: var_requested, found: var_found); - case 28: - var var_field0 = sse_decode_box_autoadd_out_point(deserializer); - return BdkError_InvalidOutpoint(var_field0); - case 29: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Encode(var_field0); - case 30: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Miniscript(var_field0); - case 31: - var var_field0 = sse_decode_String(deserializer); - return BdkError_MiniscriptPsbt(var_field0); - case 32: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Bip32(var_field0); - case 33: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Bip39(var_field0); - case 34: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Secp256k1(var_field0); - case 35: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Json(var_field0); - case 36: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Psbt(var_field0); - case 37: - var var_field0 = sse_decode_String(deserializer); - return BdkError_PsbtParse(var_field0); - case 38: - var var_field0 = sse_decode_usize(deserializer); - var var_field1 = sse_decode_usize(deserializer); - return BdkError_MissingCachedScripts(var_field0, var_field1); - case 39: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Electrum(var_field0); - case 40: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Esplora(var_field0); - case 41: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Sled(var_field0); - case 42: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Rpc(var_field0); - case 43: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Rusqlite(var_field0); - case 44: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidInput(var_field0); - case 45: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidLockTime(var_field0); - case 46: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidTransaction(var_field0); - default: - throw UnimplementedError(''); - } - } - - @protected - BdkMnemonic sse_decode_bdk_mnemonic(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_bdkkeysbip39Mnemonic(deserializer); - return BdkMnemonic(ptr: var_ptr); - } - - @protected - BdkPolicy sse_decode_bdk_policy(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_bdkdescriptorPolicy(deserializer); - return BdkPolicy(ptr: var_ptr); - } - - @protected - BdkPsbt sse_decode_bdk_psbt(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - deserializer); - return BdkPsbt(ptr: var_ptr); - } - - @protected - BdkScriptBuf sse_decode_bdk_script_buf(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_bytes = sse_decode_list_prim_u_8_strict(deserializer); - return BdkScriptBuf(bytes: var_bytes); - } - - @protected - BdkTransaction sse_decode_bdk_transaction(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_s = sse_decode_String(deserializer); - return BdkTransaction(s: var_s); - } - - @protected - BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - deserializer); - return BdkWallet(ptr: var_ptr); - } - - @protected - BlockTime sse_decode_block_time(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_height = sse_decode_u_32(deserializer); - var var_timestamp = sse_decode_u_64(deserializer); - return BlockTime(height: var_height, timestamp: var_timestamp); - } - - @protected - BlockchainConfig sse_decode_blockchain_config(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_config = sse_decode_box_autoadd_electrum_config(deserializer); - return BlockchainConfig_Electrum(config: var_config); - case 1: - var var_config = sse_decode_box_autoadd_esplora_config(deserializer); - return BlockchainConfig_Esplora(config: var_config); - case 2: - var var_config = sse_decode_box_autoadd_rpc_config(deserializer); - return BlockchainConfig_Rpc(config: var_config); - default: - throw UnimplementedError(''); - } - } - - @protected - bool sse_decode_bool(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint8() != 0; - } - - @protected - AddressError sse_decode_box_autoadd_address_error( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_address_error(deserializer)); - } - - @protected - AddressIndex sse_decode_box_autoadd_address_index( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_address_index(deserializer)); - } - - @protected - BdkAddress sse_decode_box_autoadd_bdk_address(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_address(deserializer)); - } - - @protected - BdkBlockchain sse_decode_box_autoadd_bdk_blockchain( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_blockchain(deserializer)); - } - - @protected - BdkDerivationPath sse_decode_box_autoadd_bdk_derivation_path( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_derivation_path(deserializer)); - } - - @protected - BdkDescriptor sse_decode_box_autoadd_bdk_descriptor( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_descriptor(deserializer)); - } - - @protected - BdkDescriptorPublicKey sse_decode_box_autoadd_bdk_descriptor_public_key( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_descriptor_public_key(deserializer)); - } - - @protected - BdkDescriptorSecretKey sse_decode_box_autoadd_bdk_descriptor_secret_key( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_descriptor_secret_key(deserializer)); - } - - @protected - BdkMnemonic sse_decode_box_autoadd_bdk_mnemonic( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_mnemonic(deserializer)); - } - - @protected - BdkPolicy sse_decode_box_autoadd_bdk_policy(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_policy(deserializer)); - } - - @protected - BdkPsbt sse_decode_box_autoadd_bdk_psbt(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_psbt(deserializer)); - } - - @protected - BdkScriptBuf sse_decode_box_autoadd_bdk_script_buf( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_script_buf(deserializer)); - } - - @protected - BdkTransaction sse_decode_box_autoadd_bdk_transaction( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_transaction(deserializer)); - } - - @protected - BdkWallet sse_decode_box_autoadd_bdk_wallet(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_wallet(deserializer)); - } - - @protected - BlockTime sse_decode_box_autoadd_block_time(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_block_time(deserializer)); - } - - @protected - BlockchainConfig sse_decode_box_autoadd_blockchain_config( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_blockchain_config(deserializer)); - } - - @protected - bool sse_decode_box_autoadd_bool(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bool(deserializer)); - } - - @protected - Condition sse_decode_box_autoadd_condition(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_condition(deserializer)); - } - - @protected - ConsensusError sse_decode_box_autoadd_consensus_error( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_consensus_error(deserializer)); - } - - @protected - DatabaseConfig sse_decode_box_autoadd_database_config( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_database_config(deserializer)); - } - - @protected - DescriptorError sse_decode_box_autoadd_descriptor_error( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_descriptor_error(deserializer)); - } - - @protected - ElectrumConfig sse_decode_box_autoadd_electrum_config( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_electrum_config(deserializer)); - } - - @protected - EsploraConfig sse_decode_box_autoadd_esplora_config( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_esplora_config(deserializer)); - } - - @protected - double sse_decode_box_autoadd_f_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_f_32(deserializer)); - } - - @protected - FeeRate sse_decode_box_autoadd_fee_rate(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_fee_rate(deserializer)); - } - - @protected - HexError sse_decode_box_autoadd_hex_error(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_hex_error(deserializer)); - } - - @protected - LocalUtxo sse_decode_box_autoadd_local_utxo(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_local_utxo(deserializer)); - } - - @protected - LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_lock_time(deserializer)); - } - - @protected - OutPoint sse_decode_box_autoadd_out_point(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_out_point(deserializer)); - } - - @protected - PkOrF sse_decode_box_autoadd_pk_or_f(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_pk_or_f(deserializer)); - } - - @protected - PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_psbt_sig_hash_type(deserializer)); - } - - @protected - RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_rbf_value(deserializer)); - } - - @protected - (OutPoint, Input, BigInt) sse_decode_box_autoadd_record_out_point_input_usize( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_record_out_point_input_usize(deserializer)); - } - - @protected - RpcConfig sse_decode_box_autoadd_rpc_config(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_rpc_config(deserializer)); - } - - @protected - RpcSyncParams sse_decode_box_autoadd_rpc_sync_params( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_rpc_sync_params(deserializer)); - } - - @protected - SignOptions sse_decode_box_autoadd_sign_options( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_sign_options(deserializer)); - } - - @protected - SledDbConfiguration sse_decode_box_autoadd_sled_db_configuration( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_sled_db_configuration(deserializer)); - } - - @protected - SqliteDbConfiguration sse_decode_box_autoadd_sqlite_db_configuration( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_sqlite_db_configuration(deserializer)); - } - - @protected - int sse_decode_box_autoadd_u_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_u_32(deserializer)); - } - - @protected - BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_u_64(deserializer)); - } - - @protected - int sse_decode_box_autoadd_u_8(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_u_8(deserializer)); - } - - @protected - ChangeSpendPolicy sse_decode_change_spend_policy( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return ChangeSpendPolicy.values[inner]; - } - - @protected - Condition sse_decode_condition(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_csv = sse_decode_opt_box_autoadd_u_32(deserializer); - var var_timelock = sse_decode_opt_box_autoadd_lock_time(deserializer); - return Condition(csv: var_csv, timelock: var_timelock); - } - - @protected - ConsensusError sse_decode_consensus_error(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_field0 = sse_decode_String(deserializer); - return ConsensusError_Io(var_field0); - case 1: - var var_requested = sse_decode_usize(deserializer); - var var_max = sse_decode_usize(deserializer); - return ConsensusError_OversizedVectorAllocation( - requested: var_requested, max: var_max); - case 2: - var var_expected = sse_decode_u_8_array_4(deserializer); - var var_actual = sse_decode_u_8_array_4(deserializer); - return ConsensusError_InvalidChecksum( - expected: var_expected, actual: var_actual); - case 3: - return ConsensusError_NonMinimalVarInt(); - case 4: - var var_field0 = sse_decode_String(deserializer); - return ConsensusError_ParseFailed(var_field0); - case 5: - var var_field0 = sse_decode_u_8(deserializer); - return ConsensusError_UnsupportedSegwitFlag(var_field0); - default: - throw UnimplementedError(''); - } - } - - @protected - DatabaseConfig sse_decode_database_config(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - return DatabaseConfig_Memory(); - case 1: - var var_config = - sse_decode_box_autoadd_sqlite_db_configuration(deserializer); - return DatabaseConfig_Sqlite(config: var_config); - case 2: - var var_config = - sse_decode_box_autoadd_sled_db_configuration(deserializer); - return DatabaseConfig_Sled(config: var_config); - default: - throw UnimplementedError(''); - } - } - - @protected - DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - return DescriptorError_InvalidHdKeyPath(); - case 1: - return DescriptorError_InvalidDescriptorChecksum(); - case 2: - return DescriptorError_HardenedDerivationXpub(); - case 3: - return DescriptorError_MultiPath(); - case 4: - var var_field0 = sse_decode_String(deserializer); - return DescriptorError_Key(var_field0); - case 5: - var var_field0 = sse_decode_String(deserializer); - return DescriptorError_Policy(var_field0); - case 6: - var var_field0 = sse_decode_u_8(deserializer); - return DescriptorError_InvalidDescriptorCharacter(var_field0); - case 7: - var var_field0 = sse_decode_String(deserializer); - return DescriptorError_Bip32(var_field0); - case 8: - var var_field0 = sse_decode_String(deserializer); - return DescriptorError_Base58(var_field0); - case 9: - var var_field0 = sse_decode_String(deserializer); - return DescriptorError_Pk(var_field0); - case 10: - var var_field0 = sse_decode_String(deserializer); - return DescriptorError_Miniscript(var_field0); - case 11: - var var_field0 = sse_decode_String(deserializer); - return DescriptorError_Hex(var_field0); - default: - throw UnimplementedError(''); - } - } - - @protected - ElectrumConfig sse_decode_electrum_config(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_url = sse_decode_String(deserializer); - var var_socks5 = sse_decode_opt_String(deserializer); - var var_retry = sse_decode_u_8(deserializer); - var var_timeout = sse_decode_opt_box_autoadd_u_8(deserializer); - var var_stopGap = sse_decode_u_64(deserializer); - var var_validateDomain = sse_decode_bool(deserializer); - return ElectrumConfig( - url: var_url, - socks5: var_socks5, - retry: var_retry, - timeout: var_timeout, - stopGap: var_stopGap, - validateDomain: var_validateDomain); - } - - @protected - EsploraConfig sse_decode_esplora_config(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_baseUrl = sse_decode_String(deserializer); - var var_proxy = sse_decode_opt_String(deserializer); - var var_concurrency = sse_decode_opt_box_autoadd_u_8(deserializer); - var var_stopGap = sse_decode_u_64(deserializer); - var var_timeout = sse_decode_opt_box_autoadd_u_64(deserializer); - return EsploraConfig( - baseUrl: var_baseUrl, - proxy: var_proxy, - concurrency: var_concurrency, - stopGap: var_stopGap, - timeout: var_timeout); - } - - @protected - double sse_decode_f_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getFloat32(); - } - - @protected - FeeRate sse_decode_fee_rate(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_satPerVb = sse_decode_f_32(deserializer); - return FeeRate(satPerVb: var_satPerVb); - } - - @protected - HexError sse_decode_hex_error(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_field0 = sse_decode_u_8(deserializer); - return HexError_InvalidChar(var_field0); - case 1: - var var_field0 = sse_decode_usize(deserializer); - return HexError_OddLengthString(var_field0); - case 2: - var var_field0 = sse_decode_usize(deserializer); - var var_field1 = sse_decode_usize(deserializer); - return HexError_InvalidLength(var_field0, var_field1); - default: - throw UnimplementedError(''); - } - } - - @protected - int sse_decode_i_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getInt32(); - } - - @protected - Input sse_decode_input(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_s = sse_decode_String(deserializer); - return Input(s: var_s); - } - - @protected - KeychainKind sse_decode_keychain_kind(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return KeychainKind.values[inner]; - } - - @protected - List sse_decode_list_bdk_policy(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_bdk_policy(deserializer)); - } - return ans_; - } - - @protected - List sse_decode_list_condition(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_condition(deserializer)); - } - return ans_; - } - - @protected - List sse_decode_list_list_prim_u_8_strict( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_list_prim_u_8_strict(deserializer)); - } - return ans_; - } - - @protected - List sse_decode_list_local_utxo(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_local_utxo(deserializer)); - } - return ans_; - } - - @protected - List sse_decode_list_out_point(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_out_point(deserializer)); - } - return ans_; - } - - @protected - List sse_decode_list_pk_or_f(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_pk_or_f(deserializer)); - } - return ans_; - } - - @protected - Uint32List sse_decode_list_prim_u_32_strict(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var len_ = sse_decode_i_32(deserializer); - return deserializer.buffer.getUint32List(len_); - } - - @protected - Uint64List sse_decode_list_prim_u_64_strict(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var len_ = sse_decode_i_32(deserializer); - return deserializer.buffer.getUint64List(len_); - } - - @protected - List sse_decode_list_prim_u_8_loose(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var len_ = sse_decode_i_32(deserializer); - return deserializer.buffer.getUint8List(len_); - } - - @protected - Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var len_ = sse_decode_i_32(deserializer); - return deserializer.buffer.getUint8List(len_); - } - - @protected - List<(Uint32List, List)> - sse_decode_list_record_list_prim_u_32_strict_list_condition( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = <(Uint32List, List)>[]; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add( - sse_decode_record_list_prim_u_32_strict_list_condition(deserializer)); - } - return ans_; - } - - @protected - List<(String, Uint32List)> - sse_decode_list_record_string_list_prim_u_32_strict( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = <(String, Uint32List)>[]; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_record_string_list_prim_u_32_strict(deserializer)); - } - return ans_; - } - - @protected - List<(int, List)> sse_decode_list_record_u_32_list_condition( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = <(int, List)>[]; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_record_u_32_list_condition(deserializer)); - } - return ans_; - } - - @protected - List sse_decode_list_script_amount( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_script_amount(deserializer)); - } - return ans_; - } - - @protected - List sse_decode_list_transaction_details( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_transaction_details(deserializer)); - } - return ans_; - } - - @protected - List sse_decode_list_tx_in(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_tx_in(deserializer)); - } - return ans_; - } - - @protected - List sse_decode_list_tx_out(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_tx_out(deserializer)); - } - return ans_; - } - - @protected - LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_outpoint = sse_decode_out_point(deserializer); - var var_txout = sse_decode_tx_out(deserializer); - var var_keychain = sse_decode_keychain_kind(deserializer); - var var_isSpent = sse_decode_bool(deserializer); - return LocalUtxo( - outpoint: var_outpoint, - txout: var_txout, - keychain: var_keychain, - isSpent: var_isSpent); - } - - @protected - LockTime sse_decode_lock_time(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_field0 = sse_decode_u_32(deserializer); - return LockTime_Blocks(var_field0); - case 1: - var var_field0 = sse_decode_u_32(deserializer); - return LockTime_Seconds(var_field0); - default: - throw UnimplementedError(''); - } - } - - @protected - Network sse_decode_network(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return Network.values[inner]; - } - - @protected - Map? sse_decode_opt_Map_String_list_prim_u_32_strict( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_Map_String_list_prim_u_32_strict(deserializer)); - } else { - return null; - } - } - - @protected - String? sse_decode_opt_String(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_String(deserializer)); - } else { - return null; - } - } - - @protected - BdkAddress? sse_decode_opt_box_autoadd_bdk_address( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_bdk_address(deserializer)); - } else { - return null; - } - } - - @protected - BdkDescriptor? sse_decode_opt_box_autoadd_bdk_descriptor( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_bdk_descriptor(deserializer)); - } else { - return null; - } - } - - @protected - BdkPolicy? sse_decode_opt_box_autoadd_bdk_policy( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_bdk_policy(deserializer)); - } else { - return null; - } - } - - @protected - BdkScriptBuf? sse_decode_opt_box_autoadd_bdk_script_buf( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_bdk_script_buf(deserializer)); - } else { - return null; - } - } - - @protected - BdkTransaction? sse_decode_opt_box_autoadd_bdk_transaction( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_bdk_transaction(deserializer)); - } else { - return null; - } - } - - @protected - BlockTime? sse_decode_opt_box_autoadd_block_time( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_block_time(deserializer)); - } else { - return null; - } - } - - @protected - bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_bool(deserializer)); - } else { - return null; - } - } - - @protected - double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_f_32(deserializer)); - } else { - return null; - } - } - - @protected - FeeRate? sse_decode_opt_box_autoadd_fee_rate(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_fee_rate(deserializer)); - } else { - return null; - } - } - - @protected - LockTime? sse_decode_opt_box_autoadd_lock_time(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_lock_time(deserializer)); - } else { - return null; - } - } - - @protected - PsbtSigHashType? sse_decode_opt_box_autoadd_psbt_sig_hash_type( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_psbt_sig_hash_type(deserializer)); - } else { - return null; - } - } - - @protected - RbfValue? sse_decode_opt_box_autoadd_rbf_value(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_rbf_value(deserializer)); - } else { - return null; - } - } - - @protected - (OutPoint, Input, BigInt)? - sse_decode_opt_box_autoadd_record_out_point_input_usize( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_record_out_point_input_usize( - deserializer)); - } else { - return null; - } - } - - @protected - RpcSyncParams? sse_decode_opt_box_autoadd_rpc_sync_params( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_rpc_sync_params(deserializer)); - } else { - return null; - } - } - - @protected - SignOptions? sse_decode_opt_box_autoadd_sign_options( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_sign_options(deserializer)); - } else { - return null; - } - } - - @protected - int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_u_32(deserializer)); - } else { - return null; - } - } - - @protected - BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_u_64(deserializer)); - } else { - return null; - } - } - - @protected - int? sse_decode_opt_box_autoadd_u_8(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_u_8(deserializer)); - } else { - return null; - } - } - - @protected - OutPoint sse_decode_out_point(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_txid = sse_decode_String(deserializer); - var var_vout = sse_decode_u_32(deserializer); - return OutPoint(txid: var_txid, vout: var_vout); - } - - @protected - Payload sse_decode_payload(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_pubkeyHash = sse_decode_String(deserializer); - return Payload_PubkeyHash(pubkeyHash: var_pubkeyHash); - case 1: - var var_scriptHash = sse_decode_String(deserializer); - return Payload_ScriptHash(scriptHash: var_scriptHash); - case 2: - var var_version = sse_decode_witness_version(deserializer); - var var_program = sse_decode_list_prim_u_8_strict(deserializer); - return Payload_WitnessProgram( - version: var_version, program: var_program); - default: - throw UnimplementedError(''); - } - } - - @protected - PkOrF sse_decode_pk_or_f(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_value = sse_decode_String(deserializer); - return PkOrF_Pubkey(value: var_value); - case 1: - var var_value = sse_decode_String(deserializer); - return PkOrF_XOnlyPubkey(value: var_value); - case 2: - var var_value = sse_decode_String(deserializer); - return PkOrF_Fingerprint(value: var_value); - default: - throw UnimplementedError(''); - } - } - - @protected - PsbtSigHashType sse_decode_psbt_sig_hash_type(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_inner = sse_decode_u_32(deserializer); - return PsbtSigHashType(inner: var_inner); - } - - @protected - RbfValue sse_decode_rbf_value(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - return RbfValue_RbfDefault(); - case 1: - var var_field0 = sse_decode_u_32(deserializer); - return RbfValue_Value(var_field0); - default: - throw UnimplementedError(''); - } - } - - @protected - (BdkAddress, int) sse_decode_record_bdk_address_u_32( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_field0 = sse_decode_bdk_address(deserializer); - var var_field1 = sse_decode_u_32(deserializer); - return (var_field0, var_field1); - } - - @protected - (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_field0 = sse_decode_bdk_psbt(deserializer); - var var_field1 = sse_decode_transaction_details(deserializer); - return (var_field0, var_field1); - } - - @protected - (Uint32List, List) - sse_decode_record_list_prim_u_32_strict_list_condition( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_field0 = sse_decode_list_prim_u_32_strict(deserializer); - var var_field1 = sse_decode_list_condition(deserializer); - return (var_field0, var_field1); - } - - @protected - (OutPoint, Input, BigInt) sse_decode_record_out_point_input_usize( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_field0 = sse_decode_out_point(deserializer); - var var_field1 = sse_decode_input(deserializer); - var var_field2 = sse_decode_usize(deserializer); - return (var_field0, var_field1, var_field2); - } - - @protected - (String, Uint32List) sse_decode_record_string_list_prim_u_32_strict( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_field0 = sse_decode_String(deserializer); - var var_field1 = sse_decode_list_prim_u_32_strict(deserializer); - return (var_field0, var_field1); - } - - @protected - (int, List) sse_decode_record_u_32_list_condition( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_field0 = sse_decode_u_32(deserializer); - var var_field1 = sse_decode_list_condition(deserializer); - return (var_field0, var_field1); - } - - @protected - RpcConfig sse_decode_rpc_config(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_url = sse_decode_String(deserializer); - var var_auth = sse_decode_auth(deserializer); - var var_network = sse_decode_network(deserializer); - var var_walletName = sse_decode_String(deserializer); - var var_syncParams = - sse_decode_opt_box_autoadd_rpc_sync_params(deserializer); - return RpcConfig( - url: var_url, - auth: var_auth, - network: var_network, - walletName: var_walletName, - syncParams: var_syncParams); - } - - @protected - RpcSyncParams sse_decode_rpc_sync_params(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_startScriptCount = sse_decode_u_64(deserializer); - var var_startTime = sse_decode_u_64(deserializer); - var var_forceStartTime = sse_decode_bool(deserializer); - var var_pollRateSec = sse_decode_u_64(deserializer); - return RpcSyncParams( - startScriptCount: var_startScriptCount, - startTime: var_startTime, - forceStartTime: var_forceStartTime, - pollRateSec: var_pollRateSec); - } - - @protected - Satisfaction sse_decode_satisfaction(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_n = sse_decode_u_64(deserializer); - var var_m = sse_decode_u_64(deserializer); - var var_items = sse_decode_list_prim_u_64_strict(deserializer); - var var_sorted = sse_decode_opt_box_autoadd_bool(deserializer); - var var_conditions = sse_decode_Map_u_32_list_condition(deserializer); - return Satisfaction_Partial( - n: var_n, - m: var_m, - items: var_items, - sorted: var_sorted, - conditions: var_conditions); - case 1: - var var_n = sse_decode_u_64(deserializer); - var var_m = sse_decode_u_64(deserializer); - var var_items = sse_decode_list_prim_u_64_strict(deserializer); - var var_sorted = sse_decode_opt_box_autoadd_bool(deserializer); - var var_conditions = - sse_decode_Map_list_prim_u_32_strict_list_condition(deserializer); - return Satisfaction_PartialComplete( - n: var_n, - m: var_m, - items: var_items, - sorted: var_sorted, - conditions: var_conditions); - case 2: - var var_condition = sse_decode_box_autoadd_condition(deserializer); - return Satisfaction_Complete(condition: var_condition); - case 3: - var var_msg = sse_decode_String(deserializer); - return Satisfaction_None(msg: var_msg); - default: - throw UnimplementedError(''); - } - } - - @protected - SatisfiableItem sse_decode_satisfiable_item(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_key = sse_decode_box_autoadd_pk_or_f(deserializer); - return SatisfiableItem_EcdsaSignature(key: var_key); - case 1: - var var_key = sse_decode_box_autoadd_pk_or_f(deserializer); - return SatisfiableItem_SchnorrSignature(key: var_key); - case 2: - var var_hash = sse_decode_String(deserializer); - return SatisfiableItem_Sha256Preimage(hash: var_hash); - case 3: - var var_hash = sse_decode_String(deserializer); - return SatisfiableItem_Hash256Preimage(hash: var_hash); - case 4: - var var_hash = sse_decode_String(deserializer); - return SatisfiableItem_Ripemd160Preimage(hash: var_hash); - case 5: - var var_hash = sse_decode_String(deserializer); - return SatisfiableItem_Hash160Preimage(hash: var_hash); - case 6: - var var_value = sse_decode_box_autoadd_lock_time(deserializer); - return SatisfiableItem_AbsoluteTimelock(value: var_value); - case 7: - var var_value = sse_decode_u_32(deserializer); - return SatisfiableItem_RelativeTimelock(value: var_value); - case 8: - var var_keys = sse_decode_list_pk_or_f(deserializer); - var var_threshold = sse_decode_u_64(deserializer); - return SatisfiableItem_Multisig( - keys: var_keys, threshold: var_threshold); - case 9: - var var_items = sse_decode_list_bdk_policy(deserializer); - var var_threshold = sse_decode_u_64(deserializer); - return SatisfiableItem_Thresh( - items: var_items, threshold: var_threshold); - default: - throw UnimplementedError(''); - } - } - - @protected - ScriptAmount sse_decode_script_amount(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_script = sse_decode_bdk_script_buf(deserializer); - var var_amount = sse_decode_u_64(deserializer); - return ScriptAmount(script: var_script, amount: var_amount); - } - - @protected - SignOptions sse_decode_sign_options(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_trustWitnessUtxo = sse_decode_bool(deserializer); - var var_assumeHeight = sse_decode_opt_box_autoadd_u_32(deserializer); - var var_allowAllSighashes = sse_decode_bool(deserializer); - var var_removePartialSigs = sse_decode_bool(deserializer); - var var_tryFinalize = sse_decode_bool(deserializer); - var var_signWithTapInternalKey = sse_decode_bool(deserializer); - var var_allowGrinding = sse_decode_bool(deserializer); - return SignOptions( - trustWitnessUtxo: var_trustWitnessUtxo, - assumeHeight: var_assumeHeight, - allowAllSighashes: var_allowAllSighashes, - removePartialSigs: var_removePartialSigs, - tryFinalize: var_tryFinalize, - signWithTapInternalKey: var_signWithTapInternalKey, - allowGrinding: var_allowGrinding); - } - - @protected - SledDbConfiguration sse_decode_sled_db_configuration( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_path = sse_decode_String(deserializer); - var var_treeName = sse_decode_String(deserializer); - return SledDbConfiguration(path: var_path, treeName: var_treeName); - } - - @protected - SqliteDbConfiguration sse_decode_sqlite_db_configuration( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_path = sse_decode_String(deserializer); - return SqliteDbConfiguration(path: var_path); - } - - @protected - TransactionDetails sse_decode_transaction_details( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_transaction = - sse_decode_opt_box_autoadd_bdk_transaction(deserializer); - var var_txid = sse_decode_String(deserializer); - var var_received = sse_decode_u_64(deserializer); - var var_sent = sse_decode_u_64(deserializer); - var var_fee = sse_decode_opt_box_autoadd_u_64(deserializer); - var var_confirmationTime = - sse_decode_opt_box_autoadd_block_time(deserializer); - return TransactionDetails( - transaction: var_transaction, - txid: var_txid, - received: var_received, - sent: var_sent, - fee: var_fee, - confirmationTime: var_confirmationTime); - } - - @protected - TxIn sse_decode_tx_in(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_previousOutput = sse_decode_out_point(deserializer); - var var_scriptSig = sse_decode_bdk_script_buf(deserializer); - var var_sequence = sse_decode_u_32(deserializer); - var var_witness = sse_decode_list_list_prim_u_8_strict(deserializer); - return TxIn( - previousOutput: var_previousOutput, - scriptSig: var_scriptSig, - sequence: var_sequence, - witness: var_witness); - } - - @protected - TxOut sse_decode_tx_out(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_value = sse_decode_u_64(deserializer); - var var_scriptPubkey = sse_decode_bdk_script_buf(deserializer); - return TxOut(value: var_value, scriptPubkey: var_scriptPubkey); - } - - @protected - int sse_decode_u_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint32(); - } - - @protected - BigInt sse_decode_u_64(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getBigUint64(); - } - - @protected - int sse_decode_u_8(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint8(); - } - - @protected - U8Array4 sse_decode_u_8_array_4(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_list_prim_u_8_strict(deserializer); - return U8Array4(inner); - } - - @protected - void sse_decode_unit(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - } - - @protected - BigInt sse_decode_usize(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getBigUint64(); - } - - @protected - Variant sse_decode_variant(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return Variant.values[inner]; - } - - @protected - WitnessVersion sse_decode_witness_version(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return WitnessVersion.values[inner]; - } - - @protected - WordCount sse_decode_word_count(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return WordCount.values[inner]; - } - - @protected - int cst_encode_RustOpaque_bdkbitcoinAddress(Address raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as AddressImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_bdkbitcoinbip32DerivationPath(DerivationPath raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as DerivationPathImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_bdkblockchainAnyBlockchain(AnyBlockchain raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as AnyBlockchainImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - ExtendedDescriptor raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ExtendedDescriptorImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_bdkdescriptorPolicy(Policy raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as PolicyImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_bdkkeysDescriptorPublicKey( - DescriptorPublicKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as DescriptorPublicKeyImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_bdkkeysDescriptorSecretKey( - DescriptorSecretKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as DescriptorSecretKeyImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_bdkkeysKeyMap(KeyMap raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as KeyMapImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_bdkkeysbip39Mnemonic(Mnemonic raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as MnemonicImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - MutexWalletAnyDatabase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as MutexWalletAnyDatabaseImpl).frbInternalCstEncode(); - } - - @protected - int cst_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - MutexPartiallySignedTransaction raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as MutexPartiallySignedTransactionImpl).frbInternalCstEncode(); - } - - @protected - bool cst_encode_bool(bool raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - int cst_encode_change_spend_policy(ChangeSpendPolicy raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); - } - - @protected - double cst_encode_f_32(double raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - int cst_encode_i_32(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - int cst_encode_keychain_kind(KeychainKind raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); - } - - @protected - int cst_encode_network(Network raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); - } - - @protected - int cst_encode_u_32(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - int cst_encode_u_8(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - void cst_encode_unit(void raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - int cst_encode_variant(Variant raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); - } - - @protected - int cst_encode_witness_version(WitnessVersion raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); - } - - @protected - int cst_encode_word_count(WordCount raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); - } - - @protected - void sse_encode_Map_String_list_prim_u_32_strict( - Map self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_record_string_list_prim_u_32_strict( - self.entries.map((e) => (e.key, e.value)).toList(), serializer); - } - - @protected - void sse_encode_Map_list_prim_u_32_strict_list_condition( - Map> self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_record_list_prim_u_32_strict_list_condition( - self.entries.map((e) => (e.key, e.value)).toList(), serializer); - } - - @protected - void sse_encode_Map_u_32_list_condition( - Map> self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_record_u_32_list_condition( - self.entries.map((e) => (e.key, e.value)).toList(), serializer); - } - - @protected - void sse_encode_RustOpaque_bdkbitcoinAddress( - Address self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as AddressImpl).frbInternalSseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_bdkbitcoinbip32DerivationPath( - DerivationPath self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as DerivationPathImpl).frbInternalSseEncode(move: null), - serializer); - } - - @protected - void sse_encode_RustOpaque_bdkblockchainAnyBlockchain( - AnyBlockchain self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as AnyBlockchainImpl).frbInternalSseEncode(move: null), - serializer); - } - - @protected - void sse_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - ExtendedDescriptor self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as ExtendedDescriptorImpl).frbInternalSseEncode(move: null), - serializer); - } - - @protected - void sse_encode_RustOpaque_bdkdescriptorPolicy( - Policy self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as PolicyImpl).frbInternalSseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_bdkkeysDescriptorPublicKey( - DescriptorPublicKey self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as DescriptorPublicKeyImpl).frbInternalSseEncode(move: null), - serializer); - } - - @protected - void sse_encode_RustOpaque_bdkkeysDescriptorSecretKey( - DescriptorSecretKey self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as DescriptorSecretKeyImpl).frbInternalSseEncode(move: null), - serializer); - } - - @protected - void sse_encode_RustOpaque_bdkkeysKeyMap( - KeyMap self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as KeyMapImpl).frbInternalSseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_bdkkeysbip39Mnemonic( - Mnemonic self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as MnemonicImpl).frbInternalSseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - MutexWalletAnyDatabase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as MutexWalletAnyDatabaseImpl).frbInternalSseEncode(move: null), - serializer); - } - - @protected - void - sse_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - MutexPartiallySignedTransaction self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as MutexPartiallySignedTransactionImpl) - .frbInternalSseEncode(move: null), - serializer); - } - - @protected - void sse_encode_String(String self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_prim_u_8_strict(utf8.encoder.convert(self), serializer); - } - - @protected - void sse_encode_address_error(AddressError self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case AddressError_Base58(field0: final field0): - sse_encode_i_32(0, serializer); - sse_encode_String(field0, serializer); - case AddressError_Bech32(field0: final field0): - sse_encode_i_32(1, serializer); - sse_encode_String(field0, serializer); - case AddressError_EmptyBech32Payload(): - sse_encode_i_32(2, serializer); - case AddressError_InvalidBech32Variant( - expected: final expected, - found: final found - ): - sse_encode_i_32(3, serializer); - sse_encode_variant(expected, serializer); - sse_encode_variant(found, serializer); - case AddressError_InvalidWitnessVersion(field0: final field0): - sse_encode_i_32(4, serializer); - sse_encode_u_8(field0, serializer); - case AddressError_UnparsableWitnessVersion(field0: final field0): - sse_encode_i_32(5, serializer); - sse_encode_String(field0, serializer); - case AddressError_MalformedWitnessVersion(): - sse_encode_i_32(6, serializer); - case AddressError_InvalidWitnessProgramLength(field0: final field0): - sse_encode_i_32(7, serializer); - sse_encode_usize(field0, serializer); - case AddressError_InvalidSegwitV0ProgramLength(field0: final field0): - sse_encode_i_32(8, serializer); - sse_encode_usize(field0, serializer); - case AddressError_UncompressedPubkey(): - sse_encode_i_32(9, serializer); - case AddressError_ExcessiveScriptSize(): - sse_encode_i_32(10, serializer); - case AddressError_UnrecognizedScript(): - sse_encode_i_32(11, serializer); - case AddressError_UnknownAddressType(field0: final field0): - sse_encode_i_32(12, serializer); - sse_encode_String(field0, serializer); - case AddressError_NetworkValidation( - networkRequired: final networkRequired, - networkFound: final networkFound, - address: final address - ): - sse_encode_i_32(13, serializer); - sse_encode_network(networkRequired, serializer); - sse_encode_network(networkFound, serializer); - sse_encode_String(address, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_address_index(AddressIndex self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case AddressIndex_Increase(): - sse_encode_i_32(0, serializer); - case AddressIndex_LastUnused(): - sse_encode_i_32(1, serializer); - case AddressIndex_Peek(index: final index): - sse_encode_i_32(2, serializer); - sse_encode_u_32(index, serializer); - case AddressIndex_Reset(index: final index): - sse_encode_i_32(3, serializer); - sse_encode_u_32(index, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_auth(Auth self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case Auth_None(): - sse_encode_i_32(0, serializer); - case Auth_UserPass(username: final username, password: final password): - sse_encode_i_32(1, serializer); - sse_encode_String(username, serializer); - sse_encode_String(password, serializer); - case Auth_Cookie(file: final file): - sse_encode_i_32(2, serializer); - sse_encode_String(file, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_balance(Balance self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_64(self.immature, serializer); - sse_encode_u_64(self.trustedPending, serializer); - sse_encode_u_64(self.untrustedPending, serializer); - sse_encode_u_64(self.confirmed, serializer); - sse_encode_u_64(self.spendable, serializer); - sse_encode_u_64(self.total, serializer); - } - - @protected - void sse_encode_bdk_address(BdkAddress self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkbitcoinAddress(self.ptr, serializer); - } - - @protected - void sse_encode_bdk_blockchain(BdkBlockchain self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkblockchainAnyBlockchain(self.ptr, serializer); - } - - @protected - void sse_encode_bdk_derivation_path( - BdkDerivationPath self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkbitcoinbip32DerivationPath(self.ptr, serializer); - } - - @protected - void sse_encode_bdk_descriptor(BdkDescriptor self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - self.extendedDescriptor, serializer); - sse_encode_RustOpaque_bdkkeysKeyMap(self.keyMap, serializer); - } - - @protected - void sse_encode_bdk_descriptor_public_key( - BdkDescriptorPublicKey self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkkeysDescriptorPublicKey(self.ptr, serializer); - } - - @protected - void sse_encode_bdk_descriptor_secret_key( - BdkDescriptorSecretKey self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkkeysDescriptorSecretKey(self.ptr, serializer); - } - - @protected - void sse_encode_bdk_error(BdkError self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case BdkError_Hex(field0: final field0): - sse_encode_i_32(0, serializer); - sse_encode_box_autoadd_hex_error(field0, serializer); - case BdkError_Consensus(field0: final field0): - sse_encode_i_32(1, serializer); - sse_encode_box_autoadd_consensus_error(field0, serializer); - case BdkError_VerifyTransaction(field0: final field0): - sse_encode_i_32(2, serializer); - sse_encode_String(field0, serializer); - case BdkError_Address(field0: final field0): - sse_encode_i_32(3, serializer); - sse_encode_box_autoadd_address_error(field0, serializer); - case BdkError_Descriptor(field0: final field0): - sse_encode_i_32(4, serializer); - sse_encode_box_autoadd_descriptor_error(field0, serializer); - case BdkError_InvalidU32Bytes(field0: final field0): - sse_encode_i_32(5, serializer); - sse_encode_list_prim_u_8_strict(field0, serializer); - case BdkError_Generic(field0: final field0): - sse_encode_i_32(6, serializer); - sse_encode_String(field0, serializer); - case BdkError_ScriptDoesntHaveAddressForm(): - sse_encode_i_32(7, serializer); - case BdkError_NoRecipients(): - sse_encode_i_32(8, serializer); - case BdkError_NoUtxosSelected(): - sse_encode_i_32(9, serializer); - case BdkError_OutputBelowDustLimit(field0: final field0): - sse_encode_i_32(10, serializer); - sse_encode_usize(field0, serializer); - case BdkError_InsufficientFunds( - needed: final needed, - available: final available - ): - sse_encode_i_32(11, serializer); - sse_encode_u_64(needed, serializer); - sse_encode_u_64(available, serializer); - case BdkError_BnBTotalTriesExceeded(): - sse_encode_i_32(12, serializer); - case BdkError_BnBNoExactMatch(): - sse_encode_i_32(13, serializer); - case BdkError_UnknownUtxo(): - sse_encode_i_32(14, serializer); - case BdkError_TransactionNotFound(): - sse_encode_i_32(15, serializer); - case BdkError_TransactionConfirmed(): - sse_encode_i_32(16, serializer); - case BdkError_IrreplaceableTransaction(): - sse_encode_i_32(17, serializer); - case BdkError_FeeRateTooLow(needed: final needed): - sse_encode_i_32(18, serializer); - sse_encode_f_32(needed, serializer); - case BdkError_FeeTooLow(needed: final needed): - sse_encode_i_32(19, serializer); - sse_encode_u_64(needed, serializer); - case BdkError_FeeRateUnavailable(): - sse_encode_i_32(20, serializer); - case BdkError_MissingKeyOrigin(field0: final field0): - sse_encode_i_32(21, serializer); - sse_encode_String(field0, serializer); - case BdkError_Key(field0: final field0): - sse_encode_i_32(22, serializer); - sse_encode_String(field0, serializer); - case BdkError_ChecksumMismatch(): - sse_encode_i_32(23, serializer); - case BdkError_SpendingPolicyRequired(field0: final field0): - sse_encode_i_32(24, serializer); - sse_encode_keychain_kind(field0, serializer); - case BdkError_InvalidPolicyPathError(field0: final field0): - sse_encode_i_32(25, serializer); - sse_encode_String(field0, serializer); - case BdkError_Signer(field0: final field0): - sse_encode_i_32(26, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidNetwork( - requested: final requested, - found: final found - ): - sse_encode_i_32(27, serializer); - sse_encode_network(requested, serializer); - sse_encode_network(found, serializer); - case BdkError_InvalidOutpoint(field0: final field0): - sse_encode_i_32(28, serializer); - sse_encode_box_autoadd_out_point(field0, serializer); - case BdkError_Encode(field0: final field0): - sse_encode_i_32(29, serializer); - sse_encode_String(field0, serializer); - case BdkError_Miniscript(field0: final field0): - sse_encode_i_32(30, serializer); - sse_encode_String(field0, serializer); - case BdkError_MiniscriptPsbt(field0: final field0): - sse_encode_i_32(31, serializer); - sse_encode_String(field0, serializer); - case BdkError_Bip32(field0: final field0): - sse_encode_i_32(32, serializer); - sse_encode_String(field0, serializer); - case BdkError_Bip39(field0: final field0): - sse_encode_i_32(33, serializer); - sse_encode_String(field0, serializer); - case BdkError_Secp256k1(field0: final field0): - sse_encode_i_32(34, serializer); - sse_encode_String(field0, serializer); - case BdkError_Json(field0: final field0): - sse_encode_i_32(35, serializer); - sse_encode_String(field0, serializer); - case BdkError_Psbt(field0: final field0): - sse_encode_i_32(36, serializer); - sse_encode_String(field0, serializer); - case BdkError_PsbtParse(field0: final field0): - sse_encode_i_32(37, serializer); - sse_encode_String(field0, serializer); - case BdkError_MissingCachedScripts( - field0: final field0, - field1: final field1 - ): - sse_encode_i_32(38, serializer); - sse_encode_usize(field0, serializer); - sse_encode_usize(field1, serializer); - case BdkError_Electrum(field0: final field0): - sse_encode_i_32(39, serializer); - sse_encode_String(field0, serializer); - case BdkError_Esplora(field0: final field0): - sse_encode_i_32(40, serializer); - sse_encode_String(field0, serializer); - case BdkError_Sled(field0: final field0): - sse_encode_i_32(41, serializer); - sse_encode_String(field0, serializer); - case BdkError_Rpc(field0: final field0): - sse_encode_i_32(42, serializer); - sse_encode_String(field0, serializer); - case BdkError_Rusqlite(field0: final field0): - sse_encode_i_32(43, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidInput(field0: final field0): - sse_encode_i_32(44, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidLockTime(field0: final field0): - sse_encode_i_32(45, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidTransaction(field0: final field0): - sse_encode_i_32(46, serializer); - sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_bdk_mnemonic(BdkMnemonic self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkkeysbip39Mnemonic(self.ptr, serializer); - } - - @protected - void sse_encode_bdk_policy(BdkPolicy self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkdescriptorPolicy(self.ptr, serializer); - } - - @protected - void sse_encode_bdk_psbt(BdkPsbt self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - self.ptr, serializer); - } - - @protected - void sse_encode_bdk_script_buf(BdkScriptBuf self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_prim_u_8_strict(self.bytes, serializer); - } - - @protected - void sse_encode_bdk_transaction( - BdkTransaction self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.s, serializer); - } - - @protected - void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - self.ptr, serializer); - } - - @protected - void sse_encode_block_time(BlockTime self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_32(self.height, serializer); - sse_encode_u_64(self.timestamp, serializer); - } - - @protected - void sse_encode_blockchain_config( - BlockchainConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case BlockchainConfig_Electrum(config: final config): - sse_encode_i_32(0, serializer); - sse_encode_box_autoadd_electrum_config(config, serializer); - case BlockchainConfig_Esplora(config: final config): - sse_encode_i_32(1, serializer); - sse_encode_box_autoadd_esplora_config(config, serializer); - case BlockchainConfig_Rpc(config: final config): - sse_encode_i_32(2, serializer); - sse_encode_box_autoadd_rpc_config(config, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_bool(bool self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putUint8(self ? 1 : 0); - } - - @protected - void sse_encode_box_autoadd_address_error( - AddressError self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_address_error(self, serializer); - } - - @protected - void sse_encode_box_autoadd_address_index( - AddressIndex self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_address_index(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_address( - BdkAddress self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_address(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_blockchain( - BdkBlockchain self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_blockchain(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_derivation_path( - BdkDerivationPath self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_derivation_path(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_descriptor( - BdkDescriptor self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_descriptor(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_descriptor_public_key( - BdkDescriptorPublicKey self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_descriptor_public_key(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_descriptor_secret_key( - BdkDescriptorSecretKey self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_descriptor_secret_key(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_mnemonic( - BdkMnemonic self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_mnemonic(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_policy( - BdkPolicy self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_policy(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_psbt(BdkPsbt self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_psbt(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_script_buf( - BdkScriptBuf self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_script_buf(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_transaction( - BdkTransaction self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_transaction(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bdk_wallet( - BdkWallet self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_wallet(self, serializer); - } - - @protected - void sse_encode_box_autoadd_block_time( - BlockTime self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_block_time(self, serializer); - } - - @protected - void sse_encode_box_autoadd_blockchain_config( - BlockchainConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_blockchain_config(self, serializer); - } - - @protected - void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bool(self, serializer); - } - - @protected - void sse_encode_box_autoadd_condition( - Condition self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_condition(self, serializer); - } - - @protected - void sse_encode_box_autoadd_consensus_error( - ConsensusError self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_consensus_error(self, serializer); - } - - @protected - void sse_encode_box_autoadd_database_config( - DatabaseConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_database_config(self, serializer); - } - - @protected - void sse_encode_box_autoadd_descriptor_error( - DescriptorError self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_descriptor_error(self, serializer); - } - - @protected - void sse_encode_box_autoadd_electrum_config( - ElectrumConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_electrum_config(self, serializer); - } - - @protected - void sse_encode_box_autoadd_esplora_config( - EsploraConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_esplora_config(self, serializer); - } - - @protected - void sse_encode_box_autoadd_f_32(double self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_f_32(self, serializer); - } - - @protected - void sse_encode_box_autoadd_fee_rate(FeeRate self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_fee_rate(self, serializer); - } - - @protected - void sse_encode_box_autoadd_hex_error( - HexError self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_hex_error(self, serializer); - } - - @protected - void sse_encode_box_autoadd_local_utxo( - LocalUtxo self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_local_utxo(self, serializer); - } - - @protected - void sse_encode_box_autoadd_lock_time( - LockTime self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_lock_time(self, serializer); - } - - @protected - void sse_encode_box_autoadd_out_point( - OutPoint self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_out_point(self, serializer); - } - - @protected - void sse_encode_box_autoadd_pk_or_f(PkOrF self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_pk_or_f(self, serializer); - } - - @protected - void sse_encode_box_autoadd_psbt_sig_hash_type( - PsbtSigHashType self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_psbt_sig_hash_type(self, serializer); - } - - @protected - void sse_encode_box_autoadd_rbf_value( - RbfValue self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_rbf_value(self, serializer); - } - - @protected - void sse_encode_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt) self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_record_out_point_input_usize(self, serializer); - } - - @protected - void sse_encode_box_autoadd_rpc_config( - RpcConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_rpc_config(self, serializer); - } - - @protected - void sse_encode_box_autoadd_rpc_sync_params( - RpcSyncParams self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_rpc_sync_params(self, serializer); - } - - @protected - void sse_encode_box_autoadd_sign_options( - SignOptions self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_sign_options(self, serializer); - } - - @protected - void sse_encode_box_autoadd_sled_db_configuration( - SledDbConfiguration self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_sled_db_configuration(self, serializer); - } - - @protected - void sse_encode_box_autoadd_sqlite_db_configuration( - SqliteDbConfiguration self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_sqlite_db_configuration(self, serializer); - } - - @protected - void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_32(self, serializer); - } - - @protected - void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_64(self, serializer); - } - - @protected - void sse_encode_box_autoadd_u_8(int self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_8(self, serializer); - } - - @protected - void sse_encode_change_spend_policy( - ChangeSpendPolicy self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); - } - - @protected - void sse_encode_condition(Condition self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_opt_box_autoadd_u_32(self.csv, serializer); - sse_encode_opt_box_autoadd_lock_time(self.timelock, serializer); - } - - @protected - void sse_encode_consensus_error( - ConsensusError self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case ConsensusError_Io(field0: final field0): - sse_encode_i_32(0, serializer); - sse_encode_String(field0, serializer); - case ConsensusError_OversizedVectorAllocation( - requested: final requested, - max: final max - ): - sse_encode_i_32(1, serializer); - sse_encode_usize(requested, serializer); - sse_encode_usize(max, serializer); - case ConsensusError_InvalidChecksum( - expected: final expected, - actual: final actual - ): - sse_encode_i_32(2, serializer); - sse_encode_u_8_array_4(expected, serializer); - sse_encode_u_8_array_4(actual, serializer); - case ConsensusError_NonMinimalVarInt(): - sse_encode_i_32(3, serializer); - case ConsensusError_ParseFailed(field0: final field0): - sse_encode_i_32(4, serializer); - sse_encode_String(field0, serializer); - case ConsensusError_UnsupportedSegwitFlag(field0: final field0): - sse_encode_i_32(5, serializer); - sse_encode_u_8(field0, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_database_config( - DatabaseConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case DatabaseConfig_Memory(): - sse_encode_i_32(0, serializer); - case DatabaseConfig_Sqlite(config: final config): - sse_encode_i_32(1, serializer); - sse_encode_box_autoadd_sqlite_db_configuration(config, serializer); - case DatabaseConfig_Sled(config: final config): - sse_encode_i_32(2, serializer); - sse_encode_box_autoadd_sled_db_configuration(config, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_descriptor_error( - DescriptorError self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case DescriptorError_InvalidHdKeyPath(): - sse_encode_i_32(0, serializer); - case DescriptorError_InvalidDescriptorChecksum(): - sse_encode_i_32(1, serializer); - case DescriptorError_HardenedDerivationXpub(): - sse_encode_i_32(2, serializer); - case DescriptorError_MultiPath(): - sse_encode_i_32(3, serializer); - case DescriptorError_Key(field0: final field0): - sse_encode_i_32(4, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Policy(field0: final field0): - sse_encode_i_32(5, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_InvalidDescriptorCharacter(field0: final field0): - sse_encode_i_32(6, serializer); - sse_encode_u_8(field0, serializer); - case DescriptorError_Bip32(field0: final field0): - sse_encode_i_32(7, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Base58(field0: final field0): - sse_encode_i_32(8, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Pk(field0: final field0): - sse_encode_i_32(9, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Miniscript(field0: final field0): - sse_encode_i_32(10, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Hex(field0: final field0): - sse_encode_i_32(11, serializer); - sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_electrum_config( - ElectrumConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.url, serializer); - sse_encode_opt_String(self.socks5, serializer); - sse_encode_u_8(self.retry, serializer); - sse_encode_opt_box_autoadd_u_8(self.timeout, serializer); - sse_encode_u_64(self.stopGap, serializer); - sse_encode_bool(self.validateDomain, serializer); - } - - @protected - void sse_encode_esplora_config(EsploraConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.baseUrl, serializer); - sse_encode_opt_String(self.proxy, serializer); - sse_encode_opt_box_autoadd_u_8(self.concurrency, serializer); - sse_encode_u_64(self.stopGap, serializer); - sse_encode_opt_box_autoadd_u_64(self.timeout, serializer); - } - - @protected - void sse_encode_f_32(double self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putFloat32(self); - } - - @protected - void sse_encode_fee_rate(FeeRate self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_f_32(self.satPerVb, serializer); - } - - @protected - void sse_encode_hex_error(HexError self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case HexError_InvalidChar(field0: final field0): - sse_encode_i_32(0, serializer); - sse_encode_u_8(field0, serializer); - case HexError_OddLengthString(field0: final field0): - sse_encode_i_32(1, serializer); - sse_encode_usize(field0, serializer); - case HexError_InvalidLength(field0: final field0, field1: final field1): - sse_encode_i_32(2, serializer); - sse_encode_usize(field0, serializer); - sse_encode_usize(field1, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_i_32(int self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putInt32(self); - } - - @protected - void sse_encode_input(Input self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.s, serializer); - } - - @protected - void sse_encode_keychain_kind(KeychainKind self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); - } - - @protected - void sse_encode_list_bdk_policy( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_bdk_policy(item, serializer); - } - } - - @protected - void sse_encode_list_condition( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_condition(item, serializer); - } - } - - @protected - void sse_encode_list_list_prim_u_8_strict( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_list_prim_u_8_strict(item, serializer); - } - } - - @protected - void sse_encode_list_local_utxo( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_local_utxo(item, serializer); - } - } - - @protected - void sse_encode_list_out_point( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_out_point(item, serializer); - } - } - - @protected - void sse_encode_list_pk_or_f(List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_pk_or_f(item, serializer); - } - } - - @protected - void sse_encode_list_prim_u_32_strict( - Uint32List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - serializer.buffer.putUint32List(self); - } - - @protected - void sse_encode_list_prim_u_64_strict( - Uint64List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - serializer.buffer.putUint64List(self); - } - - @protected - void sse_encode_list_prim_u_8_loose( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - serializer.buffer - .putUint8List(self is Uint8List ? self : Uint8List.fromList(self)); - } - - @protected - void sse_encode_list_prim_u_8_strict( - Uint8List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - serializer.buffer.putUint8List(self); - } - - @protected - void sse_encode_list_record_list_prim_u_32_strict_list_condition( - List<(Uint32List, List)> self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_record_list_prim_u_32_strict_list_condition(item, serializer); - } - } - - @protected - void sse_encode_list_record_string_list_prim_u_32_strict( - List<(String, Uint32List)> self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_record_string_list_prim_u_32_strict(item, serializer); - } - } - - @protected - void sse_encode_list_record_u_32_list_condition( - List<(int, List)> self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_record_u_32_list_condition(item, serializer); - } - } - - @protected - void sse_encode_list_script_amount( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_script_amount(item, serializer); - } - } - - @protected - void sse_encode_list_transaction_details( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_transaction_details(item, serializer); - } - } - - @protected - void sse_encode_list_tx_in(List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_tx_in(item, serializer); - } - } - - @protected - void sse_encode_list_tx_out(List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_tx_out(item, serializer); - } - } - - @protected - void sse_encode_local_utxo(LocalUtxo self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_out_point(self.outpoint, serializer); - sse_encode_tx_out(self.txout, serializer); - sse_encode_keychain_kind(self.keychain, serializer); - sse_encode_bool(self.isSpent, serializer); - } - - @protected - void sse_encode_lock_time(LockTime self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case LockTime_Blocks(field0: final field0): - sse_encode_i_32(0, serializer); - sse_encode_u_32(field0, serializer); - case LockTime_Seconds(field0: final field0): - sse_encode_i_32(1, serializer); - sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_network(Network self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); - } - - @protected - void sse_encode_opt_Map_String_list_prim_u_32_strict( - Map? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_Map_String_list_prim_u_32_strict(self, serializer); - } - } - - @protected - void sse_encode_opt_String(String? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_String(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_bdk_address( - BdkAddress? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_bdk_address(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_bdk_descriptor( - BdkDescriptor? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_bdk_descriptor(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_bdk_policy( - BdkPolicy? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_bdk_policy(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_bdk_script_buf( - BdkScriptBuf? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_bdk_script_buf(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_bdk_transaction( - BdkTransaction? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_bdk_transaction(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_block_time( - BlockTime? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_block_time(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_bool(bool? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_bool(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_f_32(double? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_f_32(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_fee_rate( - FeeRate? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_fee_rate(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_lock_time( - LockTime? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_lock_time(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_psbt_sig_hash_type( - PsbtSigHashType? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_psbt_sig_hash_type(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_rbf_value( - RbfValue? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_rbf_value(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt)? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_record_out_point_input_usize(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_rpc_sync_params( - RpcSyncParams? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_rpc_sync_params(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_sign_options( - SignOptions? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_sign_options(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_u_32(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_u_64(BigInt? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_u_64(self, serializer); - } - } - - @protected - void sse_encode_opt_box_autoadd_u_8(int? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_u_8(self, serializer); - } - } - - @protected - void sse_encode_out_point(OutPoint self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.txid, serializer); - sse_encode_u_32(self.vout, serializer); - } - - @protected - void sse_encode_payload(Payload self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case Payload_PubkeyHash(pubkeyHash: final pubkeyHash): - sse_encode_i_32(0, serializer); - sse_encode_String(pubkeyHash, serializer); - case Payload_ScriptHash(scriptHash: final scriptHash): - sse_encode_i_32(1, serializer); - sse_encode_String(scriptHash, serializer); - case Payload_WitnessProgram( - version: final version, - program: final program - ): - sse_encode_i_32(2, serializer); - sse_encode_witness_version(version, serializer); - sse_encode_list_prim_u_8_strict(program, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_pk_or_f(PkOrF self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case PkOrF_Pubkey(value: final value): - sse_encode_i_32(0, serializer); - sse_encode_String(value, serializer); - case PkOrF_XOnlyPubkey(value: final value): - sse_encode_i_32(1, serializer); - sse_encode_String(value, serializer); - case PkOrF_Fingerprint(value: final value): - sse_encode_i_32(2, serializer); - sse_encode_String(value, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_psbt_sig_hash_type( - PsbtSigHashType self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_32(self.inner, serializer); - } - - @protected - void sse_encode_rbf_value(RbfValue self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case RbfValue_RbfDefault(): - sse_encode_i_32(0, serializer); - case RbfValue_Value(field0: final field0): - sse_encode_i_32(1, serializer); - sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_record_bdk_address_u_32( - (BdkAddress, int) self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_address(self.$1, serializer); - sse_encode_u_32(self.$2, serializer); - } - - @protected - void sse_encode_record_bdk_psbt_transaction_details( - (BdkPsbt, TransactionDetails) self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_psbt(self.$1, serializer); - sse_encode_transaction_details(self.$2, serializer); - } - - @protected - void sse_encode_record_list_prim_u_32_strict_list_condition( - (Uint32List, List) self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_prim_u_32_strict(self.$1, serializer); - sse_encode_list_condition(self.$2, serializer); - } - - @protected - void sse_encode_record_out_point_input_usize( - (OutPoint, Input, BigInt) self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_out_point(self.$1, serializer); - sse_encode_input(self.$2, serializer); - sse_encode_usize(self.$3, serializer); - } - - @protected - void sse_encode_record_string_list_prim_u_32_strict( - (String, Uint32List) self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.$1, serializer); - sse_encode_list_prim_u_32_strict(self.$2, serializer); - } - - @protected - void sse_encode_record_u_32_list_condition( - (int, List) self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_32(self.$1, serializer); - sse_encode_list_condition(self.$2, serializer); - } - - @protected - void sse_encode_rpc_config(RpcConfig self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.url, serializer); - sse_encode_auth(self.auth, serializer); - sse_encode_network(self.network, serializer); - sse_encode_String(self.walletName, serializer); - sse_encode_opt_box_autoadd_rpc_sync_params(self.syncParams, serializer); - } - - @protected - void sse_encode_rpc_sync_params( - RpcSyncParams self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_64(self.startScriptCount, serializer); - sse_encode_u_64(self.startTime, serializer); - sse_encode_bool(self.forceStartTime, serializer); - sse_encode_u_64(self.pollRateSec, serializer); - } - - @protected - void sse_encode_satisfaction(Satisfaction self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case Satisfaction_Partial( - n: final n, - m: final m, - items: final items, - sorted: final sorted, - conditions: final conditions - ): - sse_encode_i_32(0, serializer); - sse_encode_u_64(n, serializer); - sse_encode_u_64(m, serializer); - sse_encode_list_prim_u_64_strict(items, serializer); - sse_encode_opt_box_autoadd_bool(sorted, serializer); - sse_encode_Map_u_32_list_condition(conditions, serializer); - case Satisfaction_PartialComplete( - n: final n, - m: final m, - items: final items, - sorted: final sorted, - conditions: final conditions - ): - sse_encode_i_32(1, serializer); - sse_encode_u_64(n, serializer); - sse_encode_u_64(m, serializer); - sse_encode_list_prim_u_64_strict(items, serializer); - sse_encode_opt_box_autoadd_bool(sorted, serializer); - sse_encode_Map_list_prim_u_32_strict_list_condition( - conditions, serializer); - case Satisfaction_Complete(condition: final condition): - sse_encode_i_32(2, serializer); - sse_encode_box_autoadd_condition(condition, serializer); - case Satisfaction_None(msg: final msg): - sse_encode_i_32(3, serializer); - sse_encode_String(msg, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_satisfiable_item( - SatisfiableItem self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case SatisfiableItem_EcdsaSignature(key: final key): - sse_encode_i_32(0, serializer); - sse_encode_box_autoadd_pk_or_f(key, serializer); - case SatisfiableItem_SchnorrSignature(key: final key): - sse_encode_i_32(1, serializer); - sse_encode_box_autoadd_pk_or_f(key, serializer); - case SatisfiableItem_Sha256Preimage(hash: final hash): - sse_encode_i_32(2, serializer); - sse_encode_String(hash, serializer); - case SatisfiableItem_Hash256Preimage(hash: final hash): - sse_encode_i_32(3, serializer); - sse_encode_String(hash, serializer); - case SatisfiableItem_Ripemd160Preimage(hash: final hash): - sse_encode_i_32(4, serializer); - sse_encode_String(hash, serializer); - case SatisfiableItem_Hash160Preimage(hash: final hash): - sse_encode_i_32(5, serializer); - sse_encode_String(hash, serializer); - case SatisfiableItem_AbsoluteTimelock(value: final value): - sse_encode_i_32(6, serializer); - sse_encode_box_autoadd_lock_time(value, serializer); - case SatisfiableItem_RelativeTimelock(value: final value): - sse_encode_i_32(7, serializer); - sse_encode_u_32(value, serializer); - case SatisfiableItem_Multisig( - keys: final keys, - threshold: final threshold - ): - sse_encode_i_32(8, serializer); - sse_encode_list_pk_or_f(keys, serializer); - sse_encode_u_64(threshold, serializer); - case SatisfiableItem_Thresh( - items: final items, - threshold: final threshold - ): - sse_encode_i_32(9, serializer); - sse_encode_list_bdk_policy(items, serializer); - sse_encode_u_64(threshold, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_script_amount(ScriptAmount self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_script_buf(self.script, serializer); - sse_encode_u_64(self.amount, serializer); - } - - @protected - void sse_encode_sign_options(SignOptions self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bool(self.trustWitnessUtxo, serializer); - sse_encode_opt_box_autoadd_u_32(self.assumeHeight, serializer); - sse_encode_bool(self.allowAllSighashes, serializer); - sse_encode_bool(self.removePartialSigs, serializer); - sse_encode_bool(self.tryFinalize, serializer); - sse_encode_bool(self.signWithTapInternalKey, serializer); - sse_encode_bool(self.allowGrinding, serializer); - } - - @protected - void sse_encode_sled_db_configuration( - SledDbConfiguration self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.path, serializer); - sse_encode_String(self.treeName, serializer); - } - - @protected - void sse_encode_sqlite_db_configuration( - SqliteDbConfiguration self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.path, serializer); - } - - @protected - void sse_encode_transaction_details( - TransactionDetails self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_opt_box_autoadd_bdk_transaction(self.transaction, serializer); - sse_encode_String(self.txid, serializer); - sse_encode_u_64(self.received, serializer); - sse_encode_u_64(self.sent, serializer); - sse_encode_opt_box_autoadd_u_64(self.fee, serializer); - sse_encode_opt_box_autoadd_block_time(self.confirmationTime, serializer); - } - - @protected - void sse_encode_tx_in(TxIn self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_out_point(self.previousOutput, serializer); - sse_encode_bdk_script_buf(self.scriptSig, serializer); - sse_encode_u_32(self.sequence, serializer); - sse_encode_list_list_prim_u_8_strict(self.witness, serializer); - } - - @protected - void sse_encode_tx_out(TxOut self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_64(self.value, serializer); - sse_encode_bdk_script_buf(self.scriptPubkey, serializer); - } - - @protected - void sse_encode_u_32(int self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putUint32(self); - } - - @protected - void sse_encode_u_64(BigInt self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putBigUint64(self); - } - - @protected - void sse_encode_u_8(int self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putUint8(self); - } - - @protected - void sse_encode_u_8_array_4(U8Array4 self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_prim_u_8_strict(self.inner, serializer); - } - - @protected - void sse_encode_unit(void self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - } - - @protected - void sse_encode_usize(BigInt self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putBigUint64(self); - } - - @protected - void sse_encode_variant(Variant self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); - } - - @protected - void sse_encode_witness_version( - WitnessVersion self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); - } - - @protected - void sse_encode_word_count(WordCount self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); - } -} - -@sealed -class AddressImpl extends RustOpaque implements Address { - // Not to be used by end users - AddressImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - AddressImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_Address, - rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_Address, - rustArcDecrementStrongCountPtr: - core.instance.api.rust_arc_decrement_strong_count_AddressPtr, - ); -} - -@sealed -class AnyBlockchainImpl extends RustOpaque implements AnyBlockchain { - // Not to be used by end users - AnyBlockchainImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - AnyBlockchainImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_AnyBlockchain, - rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_AnyBlockchain, - rustArcDecrementStrongCountPtr: - core.instance.api.rust_arc_decrement_strong_count_AnyBlockchainPtr, - ); -} - -@sealed -class DerivationPathImpl extends RustOpaque implements DerivationPath { - // Not to be used by end users - DerivationPathImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - DerivationPathImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_DerivationPath, - rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_DerivationPath, - rustArcDecrementStrongCountPtr: - core.instance.api.rust_arc_decrement_strong_count_DerivationPathPtr, - ); -} - -@sealed -class DescriptorPublicKeyImpl extends RustOpaque - implements DescriptorPublicKey { - // Not to be used by end users - DescriptorPublicKeyImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - DescriptorPublicKeyImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_DescriptorPublicKey, - rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_DescriptorPublicKey, - rustArcDecrementStrongCountPtr: core - .instance.api.rust_arc_decrement_strong_count_DescriptorPublicKeyPtr, - ); -} - -@sealed -class DescriptorSecretKeyImpl extends RustOpaque - implements DescriptorSecretKey { - // Not to be used by end users - DescriptorSecretKeyImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - DescriptorSecretKeyImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_DescriptorSecretKey, - rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_DescriptorSecretKey, - rustArcDecrementStrongCountPtr: core - .instance.api.rust_arc_decrement_strong_count_DescriptorSecretKeyPtr, - ); -} - -@sealed -class ExtendedDescriptorImpl extends RustOpaque implements ExtendedDescriptor { - // Not to be used by end users - ExtendedDescriptorImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - ExtendedDescriptorImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_ExtendedDescriptor, - rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptor, - rustArcDecrementStrongCountPtr: - core.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptorPtr, - ); -} - -@sealed -class KeyMapImpl extends RustOpaque implements KeyMap { - // Not to be used by end users - KeyMapImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - KeyMapImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_KeyMap, - rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_KeyMap, - rustArcDecrementStrongCountPtr: - core.instance.api.rust_arc_decrement_strong_count_KeyMapPtr, - ); -} - -@sealed -class MnemonicImpl extends RustOpaque implements Mnemonic { - // Not to be used by end users - MnemonicImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - MnemonicImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_Mnemonic, - rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_Mnemonic, - rustArcDecrementStrongCountPtr: - core.instance.api.rust_arc_decrement_strong_count_MnemonicPtr, - ); -} - -@sealed -class MutexPartiallySignedTransactionImpl extends RustOpaque - implements MutexPartiallySignedTransaction { - // Not to be used by end users - MutexPartiallySignedTransactionImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - MutexPartiallySignedTransactionImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: core.instance.api - .rust_arc_increment_strong_count_MutexPartiallySignedTransaction, - rustArcDecrementStrongCount: core.instance.api - .rust_arc_decrement_strong_count_MutexPartiallySignedTransaction, - rustArcDecrementStrongCountPtr: core.instance.api - .rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr, - ); -} - -@sealed -class MutexWalletAnyDatabaseImpl extends RustOpaque - implements MutexWalletAnyDatabase { - // Not to be used by end users - MutexWalletAnyDatabaseImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - MutexWalletAnyDatabaseImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: core - .instance.api.rust_arc_increment_strong_count_MutexWalletAnyDatabase, - rustArcDecrementStrongCount: core - .instance.api.rust_arc_decrement_strong_count_MutexWalletAnyDatabase, - rustArcDecrementStrongCountPtr: core - .instance.api.rust_arc_decrement_strong_count_MutexWalletAnyDatabasePtr, - ); -} - -@sealed -class PolicyImpl extends RustOpaque implements Policy { - // Not to be used by end users - PolicyImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - PolicyImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_Policy, - rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_Policy, - rustArcDecrementStrongCountPtr: - core.instance.api.rust_arc_decrement_strong_count_PolicyPtr, - ); -} diff --git a/lib/src/generated/frb_generated.io.dart b/lib/src/generated/frb_generated.io.dart deleted file mode 100644 index 2b17a149..00000000 --- a/lib/src/generated/frb_generated.io.dart +++ /dev/null @@ -1,8116 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field - -import 'api/blockchain.dart'; -import 'api/descriptor.dart'; -import 'api/error.dart'; -import 'api/key.dart'; -import 'api/psbt.dart'; -import 'api/types.dart'; -import 'api/wallet.dart'; -import 'dart:async'; -import 'dart:convert'; -import 'dart:ffi' as ffi; -import 'frb_generated.dart'; -import 'lib.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; - -abstract class coreApiImplPlatform extends BaseApiImpl { - coreApiImplPlatform({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AddressPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_DerivationPathPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_AnyBlockchainPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ExtendedDescriptorPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_PolicyPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicyPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_DescriptorPublicKeyPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_DescriptorSecretKeyPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeyMapPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMapPtr; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MnemonicPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexWalletAnyDatabasePtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr; - - @protected - Map dco_decode_Map_String_list_prim_u_32_strict( - dynamic raw); - - @protected - Map> - dco_decode_Map_list_prim_u_32_strict_list_condition(dynamic raw); - - @protected - Map> dco_decode_Map_u_32_list_condition(dynamic raw); - - @protected - Address dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw); - - @protected - DerivationPath dco_decode_RustOpaque_bdkbitcoinbip32DerivationPath( - dynamic raw); - - @protected - AnyBlockchain dco_decode_RustOpaque_bdkblockchainAnyBlockchain(dynamic raw); - - @protected - ExtendedDescriptor dco_decode_RustOpaque_bdkdescriptorExtendedDescriptor( - dynamic raw); - - @protected - Policy dco_decode_RustOpaque_bdkdescriptorPolicy(dynamic raw); - - @protected - DescriptorPublicKey dco_decode_RustOpaque_bdkkeysDescriptorPublicKey( - dynamic raw); - - @protected - DescriptorSecretKey dco_decode_RustOpaque_bdkkeysDescriptorSecretKey( - dynamic raw); - - @protected - KeyMap dco_decode_RustOpaque_bdkkeysKeyMap(dynamic raw); - - @protected - Mnemonic dco_decode_RustOpaque_bdkkeysbip39Mnemonic(dynamic raw); - - @protected - MutexWalletAnyDatabase - dco_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - dynamic raw); - - @protected - MutexPartiallySignedTransaction - dco_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - dynamic raw); - - @protected - String dco_decode_String(dynamic raw); - - @protected - AddressError dco_decode_address_error(dynamic raw); - - @protected - AddressIndex dco_decode_address_index(dynamic raw); - - @protected - Auth dco_decode_auth(dynamic raw); - - @protected - Balance dco_decode_balance(dynamic raw); - - @protected - BdkAddress dco_decode_bdk_address(dynamic raw); - - @protected - BdkBlockchain dco_decode_bdk_blockchain(dynamic raw); - - @protected - BdkDerivationPath dco_decode_bdk_derivation_path(dynamic raw); - - @protected - BdkDescriptor dco_decode_bdk_descriptor(dynamic raw); - - @protected - BdkDescriptorPublicKey dco_decode_bdk_descriptor_public_key(dynamic raw); - - @protected - BdkDescriptorSecretKey dco_decode_bdk_descriptor_secret_key(dynamic raw); - - @protected - BdkError dco_decode_bdk_error(dynamic raw); - - @protected - BdkMnemonic dco_decode_bdk_mnemonic(dynamic raw); - - @protected - BdkPolicy dco_decode_bdk_policy(dynamic raw); - - @protected - BdkPsbt dco_decode_bdk_psbt(dynamic raw); - - @protected - BdkScriptBuf dco_decode_bdk_script_buf(dynamic raw); - - @protected - BdkTransaction dco_decode_bdk_transaction(dynamic raw); - - @protected - BdkWallet dco_decode_bdk_wallet(dynamic raw); - - @protected - BlockTime dco_decode_block_time(dynamic raw); - - @protected - BlockchainConfig dco_decode_blockchain_config(dynamic raw); - - @protected - bool dco_decode_bool(dynamic raw); - - @protected - AddressError dco_decode_box_autoadd_address_error(dynamic raw); - - @protected - AddressIndex dco_decode_box_autoadd_address_index(dynamic raw); - - @protected - BdkAddress dco_decode_box_autoadd_bdk_address(dynamic raw); - - @protected - BdkBlockchain dco_decode_box_autoadd_bdk_blockchain(dynamic raw); - - @protected - BdkDerivationPath dco_decode_box_autoadd_bdk_derivation_path(dynamic raw); - - @protected - BdkDescriptor dco_decode_box_autoadd_bdk_descriptor(dynamic raw); - - @protected - BdkDescriptorPublicKey dco_decode_box_autoadd_bdk_descriptor_public_key( - dynamic raw); - - @protected - BdkDescriptorSecretKey dco_decode_box_autoadd_bdk_descriptor_secret_key( - dynamic raw); - - @protected - BdkMnemonic dco_decode_box_autoadd_bdk_mnemonic(dynamic raw); - - @protected - BdkPolicy dco_decode_box_autoadd_bdk_policy(dynamic raw); - - @protected - BdkPsbt dco_decode_box_autoadd_bdk_psbt(dynamic raw); - - @protected - BdkScriptBuf dco_decode_box_autoadd_bdk_script_buf(dynamic raw); - - @protected - BdkTransaction dco_decode_box_autoadd_bdk_transaction(dynamic raw); - - @protected - BdkWallet dco_decode_box_autoadd_bdk_wallet(dynamic raw); - - @protected - BlockTime dco_decode_box_autoadd_block_time(dynamic raw); - - @protected - BlockchainConfig dco_decode_box_autoadd_blockchain_config(dynamic raw); - - @protected - bool dco_decode_box_autoadd_bool(dynamic raw); - - @protected - Condition dco_decode_box_autoadd_condition(dynamic raw); - - @protected - ConsensusError dco_decode_box_autoadd_consensus_error(dynamic raw); - - @protected - DatabaseConfig dco_decode_box_autoadd_database_config(dynamic raw); - - @protected - DescriptorError dco_decode_box_autoadd_descriptor_error(dynamic raw); - - @protected - ElectrumConfig dco_decode_box_autoadd_electrum_config(dynamic raw); - - @protected - EsploraConfig dco_decode_box_autoadd_esplora_config(dynamic raw); - - @protected - double dco_decode_box_autoadd_f_32(dynamic raw); - - @protected - FeeRate dco_decode_box_autoadd_fee_rate(dynamic raw); - - @protected - HexError dco_decode_box_autoadd_hex_error(dynamic raw); - - @protected - LocalUtxo dco_decode_box_autoadd_local_utxo(dynamic raw); - - @protected - LockTime dco_decode_box_autoadd_lock_time(dynamic raw); - - @protected - OutPoint dco_decode_box_autoadd_out_point(dynamic raw); - - @protected - PkOrF dco_decode_box_autoadd_pk_or_f(dynamic raw); - - @protected - PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw); - - @protected - RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw); - - @protected - (OutPoint, Input, BigInt) dco_decode_box_autoadd_record_out_point_input_usize( - dynamic raw); - - @protected - RpcConfig dco_decode_box_autoadd_rpc_config(dynamic raw); - - @protected - RpcSyncParams dco_decode_box_autoadd_rpc_sync_params(dynamic raw); - - @protected - SignOptions dco_decode_box_autoadd_sign_options(dynamic raw); - - @protected - SledDbConfiguration dco_decode_box_autoadd_sled_db_configuration(dynamic raw); - - @protected - SqliteDbConfiguration dco_decode_box_autoadd_sqlite_db_configuration( - dynamic raw); - - @protected - int dco_decode_box_autoadd_u_32(dynamic raw); - - @protected - BigInt dco_decode_box_autoadd_u_64(dynamic raw); - - @protected - int dco_decode_box_autoadd_u_8(dynamic raw); - - @protected - ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw); - - @protected - Condition dco_decode_condition(dynamic raw); - - @protected - ConsensusError dco_decode_consensus_error(dynamic raw); - - @protected - DatabaseConfig dco_decode_database_config(dynamic raw); - - @protected - DescriptorError dco_decode_descriptor_error(dynamic raw); - - @protected - ElectrumConfig dco_decode_electrum_config(dynamic raw); - - @protected - EsploraConfig dco_decode_esplora_config(dynamic raw); - - @protected - double dco_decode_f_32(dynamic raw); - - @protected - FeeRate dco_decode_fee_rate(dynamic raw); - - @protected - HexError dco_decode_hex_error(dynamic raw); - - @protected - int dco_decode_i_32(dynamic raw); - - @protected - Input dco_decode_input(dynamic raw); - - @protected - KeychainKind dco_decode_keychain_kind(dynamic raw); - - @protected - List dco_decode_list_bdk_policy(dynamic raw); - - @protected - List dco_decode_list_condition(dynamic raw); - - @protected - List dco_decode_list_list_prim_u_8_strict(dynamic raw); - - @protected - List dco_decode_list_local_utxo(dynamic raw); - - @protected - List dco_decode_list_out_point(dynamic raw); - - @protected - List dco_decode_list_pk_or_f(dynamic raw); - - @protected - Uint32List dco_decode_list_prim_u_32_strict(dynamic raw); - - @protected - Uint64List dco_decode_list_prim_u_64_strict(dynamic raw); - - @protected - List dco_decode_list_prim_u_8_loose(dynamic raw); - - @protected - Uint8List dco_decode_list_prim_u_8_strict(dynamic raw); - - @protected - List<(Uint32List, List)> - dco_decode_list_record_list_prim_u_32_strict_list_condition(dynamic raw); - - @protected - List<(String, Uint32List)> - dco_decode_list_record_string_list_prim_u_32_strict(dynamic raw); - - @protected - List<(int, List)> dco_decode_list_record_u_32_list_condition( - dynamic raw); - - @protected - List dco_decode_list_script_amount(dynamic raw); - - @protected - List dco_decode_list_transaction_details(dynamic raw); - - @protected - List dco_decode_list_tx_in(dynamic raw); - - @protected - List dco_decode_list_tx_out(dynamic raw); - - @protected - LocalUtxo dco_decode_local_utxo(dynamic raw); - - @protected - LockTime dco_decode_lock_time(dynamic raw); - - @protected - Network dco_decode_network(dynamic raw); - - @protected - Map? dco_decode_opt_Map_String_list_prim_u_32_strict( - dynamic raw); - - @protected - String? dco_decode_opt_String(dynamic raw); - - @protected - BdkAddress? dco_decode_opt_box_autoadd_bdk_address(dynamic raw); - - @protected - BdkDescriptor? dco_decode_opt_box_autoadd_bdk_descriptor(dynamic raw); - - @protected - BdkPolicy? dco_decode_opt_box_autoadd_bdk_policy(dynamic raw); - - @protected - BdkScriptBuf? dco_decode_opt_box_autoadd_bdk_script_buf(dynamic raw); - - @protected - BdkTransaction? dco_decode_opt_box_autoadd_bdk_transaction(dynamic raw); - - @protected - BlockTime? dco_decode_opt_box_autoadd_block_time(dynamic raw); - - @protected - bool? dco_decode_opt_box_autoadd_bool(dynamic raw); - - @protected - double? dco_decode_opt_box_autoadd_f_32(dynamic raw); - - @protected - FeeRate? dco_decode_opt_box_autoadd_fee_rate(dynamic raw); - - @protected - LockTime? dco_decode_opt_box_autoadd_lock_time(dynamic raw); - - @protected - PsbtSigHashType? dco_decode_opt_box_autoadd_psbt_sig_hash_type(dynamic raw); - - @protected - RbfValue? dco_decode_opt_box_autoadd_rbf_value(dynamic raw); - - @protected - (OutPoint, Input, BigInt)? - dco_decode_opt_box_autoadd_record_out_point_input_usize(dynamic raw); - - @protected - RpcSyncParams? dco_decode_opt_box_autoadd_rpc_sync_params(dynamic raw); - - @protected - SignOptions? dco_decode_opt_box_autoadd_sign_options(dynamic raw); - - @protected - int? dco_decode_opt_box_autoadd_u_32(dynamic raw); - - @protected - BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw); - - @protected - int? dco_decode_opt_box_autoadd_u_8(dynamic raw); - - @protected - OutPoint dco_decode_out_point(dynamic raw); - - @protected - Payload dco_decode_payload(dynamic raw); - - @protected - PkOrF dco_decode_pk_or_f(dynamic raw); - - @protected - PsbtSigHashType dco_decode_psbt_sig_hash_type(dynamic raw); - - @protected - RbfValue dco_decode_rbf_value(dynamic raw); - - @protected - (BdkAddress, int) dco_decode_record_bdk_address_u_32(dynamic raw); - - @protected - (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details( - dynamic raw); - - @protected - (Uint32List, List) - dco_decode_record_list_prim_u_32_strict_list_condition(dynamic raw); - - @protected - (OutPoint, Input, BigInt) dco_decode_record_out_point_input_usize( - dynamic raw); - - @protected - (String, Uint32List) dco_decode_record_string_list_prim_u_32_strict( - dynamic raw); - - @protected - (int, List) dco_decode_record_u_32_list_condition(dynamic raw); - - @protected - RpcConfig dco_decode_rpc_config(dynamic raw); - - @protected - RpcSyncParams dco_decode_rpc_sync_params(dynamic raw); - - @protected - Satisfaction dco_decode_satisfaction(dynamic raw); - - @protected - SatisfiableItem dco_decode_satisfiable_item(dynamic raw); - - @protected - ScriptAmount dco_decode_script_amount(dynamic raw); - - @protected - SignOptions dco_decode_sign_options(dynamic raw); - - @protected - SledDbConfiguration dco_decode_sled_db_configuration(dynamic raw); - - @protected - SqliteDbConfiguration dco_decode_sqlite_db_configuration(dynamic raw); - - @protected - TransactionDetails dco_decode_transaction_details(dynamic raw); - - @protected - TxIn dco_decode_tx_in(dynamic raw); - - @protected - TxOut dco_decode_tx_out(dynamic raw); - - @protected - int dco_decode_u_32(dynamic raw); - - @protected - BigInt dco_decode_u_64(dynamic raw); - - @protected - int dco_decode_u_8(dynamic raw); - - @protected - U8Array4 dco_decode_u_8_array_4(dynamic raw); - - @protected - void dco_decode_unit(dynamic raw); - - @protected - BigInt dco_decode_usize(dynamic raw); - - @protected - Variant dco_decode_variant(dynamic raw); - - @protected - WitnessVersion dco_decode_witness_version(dynamic raw); - - @protected - WordCount dco_decode_word_count(dynamic raw); - - @protected - Map sse_decode_Map_String_list_prim_u_32_strict( - SseDeserializer deserializer); - - @protected - Map> - sse_decode_Map_list_prim_u_32_strict_list_condition( - SseDeserializer deserializer); - - @protected - Map> sse_decode_Map_u_32_list_condition( - SseDeserializer deserializer); - - @protected - Address sse_decode_RustOpaque_bdkbitcoinAddress(SseDeserializer deserializer); - - @protected - DerivationPath sse_decode_RustOpaque_bdkbitcoinbip32DerivationPath( - SseDeserializer deserializer); - - @protected - AnyBlockchain sse_decode_RustOpaque_bdkblockchainAnyBlockchain( - SseDeserializer deserializer); - - @protected - ExtendedDescriptor sse_decode_RustOpaque_bdkdescriptorExtendedDescriptor( - SseDeserializer deserializer); - - @protected - Policy sse_decode_RustOpaque_bdkdescriptorPolicy( - SseDeserializer deserializer); - - @protected - DescriptorPublicKey sse_decode_RustOpaque_bdkkeysDescriptorPublicKey( - SseDeserializer deserializer); - - @protected - DescriptorSecretKey sse_decode_RustOpaque_bdkkeysDescriptorSecretKey( - SseDeserializer deserializer); - - @protected - KeyMap sse_decode_RustOpaque_bdkkeysKeyMap(SseDeserializer deserializer); - - @protected - Mnemonic sse_decode_RustOpaque_bdkkeysbip39Mnemonic( - SseDeserializer deserializer); - - @protected - MutexWalletAnyDatabase - sse_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - SseDeserializer deserializer); - - @protected - MutexPartiallySignedTransaction - sse_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - SseDeserializer deserializer); - - @protected - String sse_decode_String(SseDeserializer deserializer); - - @protected - AddressError sse_decode_address_error(SseDeserializer deserializer); - - @protected - AddressIndex sse_decode_address_index(SseDeserializer deserializer); - - @protected - Auth sse_decode_auth(SseDeserializer deserializer); - - @protected - Balance sse_decode_balance(SseDeserializer deserializer); - - @protected - BdkAddress sse_decode_bdk_address(SseDeserializer deserializer); - - @protected - BdkBlockchain sse_decode_bdk_blockchain(SseDeserializer deserializer); - - @protected - BdkDerivationPath sse_decode_bdk_derivation_path( - SseDeserializer deserializer); - - @protected - BdkDescriptor sse_decode_bdk_descriptor(SseDeserializer deserializer); - - @protected - BdkDescriptorPublicKey sse_decode_bdk_descriptor_public_key( - SseDeserializer deserializer); - - @protected - BdkDescriptorSecretKey sse_decode_bdk_descriptor_secret_key( - SseDeserializer deserializer); - - @protected - BdkError sse_decode_bdk_error(SseDeserializer deserializer); - - @protected - BdkMnemonic sse_decode_bdk_mnemonic(SseDeserializer deserializer); - - @protected - BdkPolicy sse_decode_bdk_policy(SseDeserializer deserializer); - - @protected - BdkPsbt sse_decode_bdk_psbt(SseDeserializer deserializer); - - @protected - BdkScriptBuf sse_decode_bdk_script_buf(SseDeserializer deserializer); - - @protected - BdkTransaction sse_decode_bdk_transaction(SseDeserializer deserializer); - - @protected - BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer); - - @protected - BlockTime sse_decode_block_time(SseDeserializer deserializer); - - @protected - BlockchainConfig sse_decode_blockchain_config(SseDeserializer deserializer); - - @protected - bool sse_decode_bool(SseDeserializer deserializer); - - @protected - AddressError sse_decode_box_autoadd_address_error( - SseDeserializer deserializer); - - @protected - AddressIndex sse_decode_box_autoadd_address_index( - SseDeserializer deserializer); - - @protected - BdkAddress sse_decode_box_autoadd_bdk_address(SseDeserializer deserializer); - - @protected - BdkBlockchain sse_decode_box_autoadd_bdk_blockchain( - SseDeserializer deserializer); - - @protected - BdkDerivationPath sse_decode_box_autoadd_bdk_derivation_path( - SseDeserializer deserializer); - - @protected - BdkDescriptor sse_decode_box_autoadd_bdk_descriptor( - SseDeserializer deserializer); - - @protected - BdkDescriptorPublicKey sse_decode_box_autoadd_bdk_descriptor_public_key( - SseDeserializer deserializer); - - @protected - BdkDescriptorSecretKey sse_decode_box_autoadd_bdk_descriptor_secret_key( - SseDeserializer deserializer); - - @protected - BdkMnemonic sse_decode_box_autoadd_bdk_mnemonic(SseDeserializer deserializer); - - @protected - BdkPolicy sse_decode_box_autoadd_bdk_policy(SseDeserializer deserializer); - - @protected - BdkPsbt sse_decode_box_autoadd_bdk_psbt(SseDeserializer deserializer); - - @protected - BdkScriptBuf sse_decode_box_autoadd_bdk_script_buf( - SseDeserializer deserializer); - - @protected - BdkTransaction sse_decode_box_autoadd_bdk_transaction( - SseDeserializer deserializer); - - @protected - BdkWallet sse_decode_box_autoadd_bdk_wallet(SseDeserializer deserializer); - - @protected - BlockTime sse_decode_box_autoadd_block_time(SseDeserializer deserializer); - - @protected - BlockchainConfig sse_decode_box_autoadd_blockchain_config( - SseDeserializer deserializer); - - @protected - bool sse_decode_box_autoadd_bool(SseDeserializer deserializer); - - @protected - Condition sse_decode_box_autoadd_condition(SseDeserializer deserializer); - - @protected - ConsensusError sse_decode_box_autoadd_consensus_error( - SseDeserializer deserializer); - - @protected - DatabaseConfig sse_decode_box_autoadd_database_config( - SseDeserializer deserializer); - - @protected - DescriptorError sse_decode_box_autoadd_descriptor_error( - SseDeserializer deserializer); - - @protected - ElectrumConfig sse_decode_box_autoadd_electrum_config( - SseDeserializer deserializer); - - @protected - EsploraConfig sse_decode_box_autoadd_esplora_config( - SseDeserializer deserializer); - - @protected - double sse_decode_box_autoadd_f_32(SseDeserializer deserializer); - - @protected - FeeRate sse_decode_box_autoadd_fee_rate(SseDeserializer deserializer); - - @protected - HexError sse_decode_box_autoadd_hex_error(SseDeserializer deserializer); - - @protected - LocalUtxo sse_decode_box_autoadd_local_utxo(SseDeserializer deserializer); - - @protected - LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer); - - @protected - OutPoint sse_decode_box_autoadd_out_point(SseDeserializer deserializer); - - @protected - PkOrF sse_decode_box_autoadd_pk_or_f(SseDeserializer deserializer); - - @protected - PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( - SseDeserializer deserializer); - - @protected - RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer); - - @protected - (OutPoint, Input, BigInt) sse_decode_box_autoadd_record_out_point_input_usize( - SseDeserializer deserializer); - - @protected - RpcConfig sse_decode_box_autoadd_rpc_config(SseDeserializer deserializer); - - @protected - RpcSyncParams sse_decode_box_autoadd_rpc_sync_params( - SseDeserializer deserializer); - - @protected - SignOptions sse_decode_box_autoadd_sign_options(SseDeserializer deserializer); - - @protected - SledDbConfiguration sse_decode_box_autoadd_sled_db_configuration( - SseDeserializer deserializer); - - @protected - SqliteDbConfiguration sse_decode_box_autoadd_sqlite_db_configuration( - SseDeserializer deserializer); - - @protected - int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); - - @protected - BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer); - - @protected - int sse_decode_box_autoadd_u_8(SseDeserializer deserializer); - - @protected - ChangeSpendPolicy sse_decode_change_spend_policy( - SseDeserializer deserializer); - - @protected - Condition sse_decode_condition(SseDeserializer deserializer); - - @protected - ConsensusError sse_decode_consensus_error(SseDeserializer deserializer); - - @protected - DatabaseConfig sse_decode_database_config(SseDeserializer deserializer); - - @protected - DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer); - - @protected - ElectrumConfig sse_decode_electrum_config(SseDeserializer deserializer); - - @protected - EsploraConfig sse_decode_esplora_config(SseDeserializer deserializer); - - @protected - double sse_decode_f_32(SseDeserializer deserializer); - - @protected - FeeRate sse_decode_fee_rate(SseDeserializer deserializer); - - @protected - HexError sse_decode_hex_error(SseDeserializer deserializer); - - @protected - int sse_decode_i_32(SseDeserializer deserializer); - - @protected - Input sse_decode_input(SseDeserializer deserializer); - - @protected - KeychainKind sse_decode_keychain_kind(SseDeserializer deserializer); - - @protected - List sse_decode_list_bdk_policy(SseDeserializer deserializer); - - @protected - List sse_decode_list_condition(SseDeserializer deserializer); - - @protected - List sse_decode_list_list_prim_u_8_strict( - SseDeserializer deserializer); - - @protected - List sse_decode_list_local_utxo(SseDeserializer deserializer); - - @protected - List sse_decode_list_out_point(SseDeserializer deserializer); - - @protected - List sse_decode_list_pk_or_f(SseDeserializer deserializer); - - @protected - Uint32List sse_decode_list_prim_u_32_strict(SseDeserializer deserializer); - - @protected - Uint64List sse_decode_list_prim_u_64_strict(SseDeserializer deserializer); - - @protected - List sse_decode_list_prim_u_8_loose(SseDeserializer deserializer); - - @protected - Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer); - - @protected - List<(Uint32List, List)> - sse_decode_list_record_list_prim_u_32_strict_list_condition( - SseDeserializer deserializer); - - @protected - List<(String, Uint32List)> - sse_decode_list_record_string_list_prim_u_32_strict( - SseDeserializer deserializer); - - @protected - List<(int, List)> sse_decode_list_record_u_32_list_condition( - SseDeserializer deserializer); - - @protected - List sse_decode_list_script_amount( - SseDeserializer deserializer); - - @protected - List sse_decode_list_transaction_details( - SseDeserializer deserializer); - - @protected - List sse_decode_list_tx_in(SseDeserializer deserializer); - - @protected - List sse_decode_list_tx_out(SseDeserializer deserializer); - - @protected - LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer); - - @protected - LockTime sse_decode_lock_time(SseDeserializer deserializer); - - @protected - Network sse_decode_network(SseDeserializer deserializer); - - @protected - Map? sse_decode_opt_Map_String_list_prim_u_32_strict( - SseDeserializer deserializer); - - @protected - String? sse_decode_opt_String(SseDeserializer deserializer); - - @protected - BdkAddress? sse_decode_opt_box_autoadd_bdk_address( - SseDeserializer deserializer); - - @protected - BdkDescriptor? sse_decode_opt_box_autoadd_bdk_descriptor( - SseDeserializer deserializer); - - @protected - BdkPolicy? sse_decode_opt_box_autoadd_bdk_policy( - SseDeserializer deserializer); - - @protected - BdkScriptBuf? sse_decode_opt_box_autoadd_bdk_script_buf( - SseDeserializer deserializer); - - @protected - BdkTransaction? sse_decode_opt_box_autoadd_bdk_transaction( - SseDeserializer deserializer); - - @protected - BlockTime? sse_decode_opt_box_autoadd_block_time( - SseDeserializer deserializer); - - @protected - bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer); - - @protected - double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer); - - @protected - FeeRate? sse_decode_opt_box_autoadd_fee_rate(SseDeserializer deserializer); - - @protected - LockTime? sse_decode_opt_box_autoadd_lock_time(SseDeserializer deserializer); - - @protected - PsbtSigHashType? sse_decode_opt_box_autoadd_psbt_sig_hash_type( - SseDeserializer deserializer); - - @protected - RbfValue? sse_decode_opt_box_autoadd_rbf_value(SseDeserializer deserializer); - - @protected - (OutPoint, Input, BigInt)? - sse_decode_opt_box_autoadd_record_out_point_input_usize( - SseDeserializer deserializer); - - @protected - RpcSyncParams? sse_decode_opt_box_autoadd_rpc_sync_params( - SseDeserializer deserializer); - - @protected - SignOptions? sse_decode_opt_box_autoadd_sign_options( - SseDeserializer deserializer); - - @protected - int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer); - - @protected - BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer); - - @protected - int? sse_decode_opt_box_autoadd_u_8(SseDeserializer deserializer); - - @protected - OutPoint sse_decode_out_point(SseDeserializer deserializer); - - @protected - Payload sse_decode_payload(SseDeserializer deserializer); - - @protected - PkOrF sse_decode_pk_or_f(SseDeserializer deserializer); - - @protected - PsbtSigHashType sse_decode_psbt_sig_hash_type(SseDeserializer deserializer); - - @protected - RbfValue sse_decode_rbf_value(SseDeserializer deserializer); - - @protected - (BdkAddress, int) sse_decode_record_bdk_address_u_32( - SseDeserializer deserializer); - - @protected - (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details( - SseDeserializer deserializer); - - @protected - (Uint32List, List) - sse_decode_record_list_prim_u_32_strict_list_condition( - SseDeserializer deserializer); - - @protected - (OutPoint, Input, BigInt) sse_decode_record_out_point_input_usize( - SseDeserializer deserializer); - - @protected - (String, Uint32List) sse_decode_record_string_list_prim_u_32_strict( - SseDeserializer deserializer); - - @protected - (int, List) sse_decode_record_u_32_list_condition( - SseDeserializer deserializer); - - @protected - RpcConfig sse_decode_rpc_config(SseDeserializer deserializer); - - @protected - RpcSyncParams sse_decode_rpc_sync_params(SseDeserializer deserializer); - - @protected - Satisfaction sse_decode_satisfaction(SseDeserializer deserializer); - - @protected - SatisfiableItem sse_decode_satisfiable_item(SseDeserializer deserializer); - - @protected - ScriptAmount sse_decode_script_amount(SseDeserializer deserializer); - - @protected - SignOptions sse_decode_sign_options(SseDeserializer deserializer); - - @protected - SledDbConfiguration sse_decode_sled_db_configuration( - SseDeserializer deserializer); - - @protected - SqliteDbConfiguration sse_decode_sqlite_db_configuration( - SseDeserializer deserializer); - - @protected - TransactionDetails sse_decode_transaction_details( - SseDeserializer deserializer); - - @protected - TxIn sse_decode_tx_in(SseDeserializer deserializer); - - @protected - TxOut sse_decode_tx_out(SseDeserializer deserializer); - - @protected - int sse_decode_u_32(SseDeserializer deserializer); - - @protected - BigInt sse_decode_u_64(SseDeserializer deserializer); - - @protected - int sse_decode_u_8(SseDeserializer deserializer); - - @protected - U8Array4 sse_decode_u_8_array_4(SseDeserializer deserializer); - - @protected - void sse_decode_unit(SseDeserializer deserializer); - - @protected - BigInt sse_decode_usize(SseDeserializer deserializer); - - @protected - Variant sse_decode_variant(SseDeserializer deserializer); - - @protected - WitnessVersion sse_decode_witness_version(SseDeserializer deserializer); - - @protected - WordCount sse_decode_word_count(SseDeserializer deserializer); - - @protected - ffi.Pointer - cst_encode_Map_String_list_prim_u_32_strict(Map raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_list_record_string_list_prim_u_32_strict( - raw.entries.map((e) => (e.key, e.value)).toList()); - } - - @protected - ffi.Pointer - cst_encode_Map_list_prim_u_32_strict_list_condition( - Map> raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_list_record_list_prim_u_32_strict_list_condition( - raw.entries.map((e) => (e.key, e.value)).toList()); - } - - @protected - ffi.Pointer - cst_encode_Map_u_32_list_condition(Map> raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_list_record_u_32_list_condition( - raw.entries.map((e) => (e.key, e.value)).toList()); - } - - @protected - ffi.Pointer cst_encode_String(String raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_list_prim_u_8_strict(utf8.encoder.convert(raw)); - } - - @protected - ffi.Pointer cst_encode_box_autoadd_address_error( - AddressError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_address_error(); - cst_api_fill_to_wire_address_error(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_address_index( - AddressIndex raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_address_index(); - cst_api_fill_to_wire_address_index(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bdk_address( - BdkAddress raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_address(); - cst_api_fill_to_wire_bdk_address(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bdk_blockchain( - BdkBlockchain raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_blockchain(); - cst_api_fill_to_wire_bdk_blockchain(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_bdk_derivation_path(BdkDerivationPath raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_derivation_path(); - cst_api_fill_to_wire_bdk_derivation_path(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bdk_descriptor( - BdkDescriptor raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_descriptor(); - cst_api_fill_to_wire_bdk_descriptor(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_bdk_descriptor_public_key( - BdkDescriptorPublicKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_descriptor_public_key(); - cst_api_fill_to_wire_bdk_descriptor_public_key(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_bdk_descriptor_secret_key( - BdkDescriptorSecretKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_descriptor_secret_key(); - cst_api_fill_to_wire_bdk_descriptor_secret_key(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bdk_mnemonic( - BdkMnemonic raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_mnemonic(); - cst_api_fill_to_wire_bdk_mnemonic(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bdk_policy( - BdkPolicy raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_policy(); - cst_api_fill_to_wire_bdk_policy(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bdk_psbt(BdkPsbt raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_psbt(); - cst_api_fill_to_wire_bdk_psbt(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bdk_script_buf( - BdkScriptBuf raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_script_buf(); - cst_api_fill_to_wire_bdk_script_buf(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bdk_transaction( - BdkTransaction raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_transaction(); - cst_api_fill_to_wire_bdk_transaction(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bdk_wallet( - BdkWallet raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_bdk_wallet(); - cst_api_fill_to_wire_bdk_wallet(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_block_time( - BlockTime raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_block_time(); - cst_api_fill_to_wire_block_time(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_blockchain_config(BlockchainConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_blockchain_config(); - cst_api_fill_to_wire_blockchain_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_bool(bool raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return wire.cst_new_box_autoadd_bool(cst_encode_bool(raw)); - } - - @protected - ffi.Pointer cst_encode_box_autoadd_condition( - Condition raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_condition(); - cst_api_fill_to_wire_condition(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_consensus_error( - ConsensusError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_consensus_error(); - cst_api_fill_to_wire_consensus_error(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_database_config( - DatabaseConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_database_config(); - cst_api_fill_to_wire_database_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_descriptor_error(DescriptorError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_descriptor_error(); - cst_api_fill_to_wire_descriptor_error(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_electrum_config( - ElectrumConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_electrum_config(); - cst_api_fill_to_wire_electrum_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_esplora_config( - EsploraConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_esplora_config(); - cst_api_fill_to_wire_esplora_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_f_32(double raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return wire.cst_new_box_autoadd_f_32(cst_encode_f_32(raw)); - } - - @protected - ffi.Pointer cst_encode_box_autoadd_fee_rate(FeeRate raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_fee_rate(); - cst_api_fill_to_wire_fee_rate(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_hex_error( - HexError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_hex_error(); - cst_api_fill_to_wire_hex_error(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_local_utxo( - LocalUtxo raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_local_utxo(); - cst_api_fill_to_wire_local_utxo(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_lock_time( - LockTime raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_lock_time(); - cst_api_fill_to_wire_lock_time(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_out_point( - OutPoint raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_out_point(); - cst_api_fill_to_wire_out_point(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_pk_or_f(PkOrF raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_pk_or_f(); - cst_api_fill_to_wire_pk_or_f(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_psbt_sig_hash_type(PsbtSigHashType raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_psbt_sig_hash_type(); - cst_api_fill_to_wire_psbt_sig_hash_type(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_rbf_value( - RbfValue raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_rbf_value(); - cst_api_fill_to_wire_rbf_value(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt) raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_record_out_point_input_usize(); - cst_api_fill_to_wire_record_out_point_input_usize(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_rpc_config( - RpcConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_rpc_config(); - cst_api_fill_to_wire_rpc_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_rpc_sync_params( - RpcSyncParams raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_rpc_sync_params(); - cst_api_fill_to_wire_rpc_sync_params(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_sign_options( - SignOptions raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_sign_options(); - cst_api_fill_to_wire_sign_options(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_sled_db_configuration(SledDbConfiguration raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_sled_db_configuration(); - cst_api_fill_to_wire_sled_db_configuration(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - cst_encode_box_autoadd_sqlite_db_configuration( - SqliteDbConfiguration raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_sqlite_db_configuration(); - cst_api_fill_to_wire_sqlite_db_configuration(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_u_32(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return wire.cst_new_box_autoadd_u_32(cst_encode_u_32(raw)); - } - - @protected - ffi.Pointer cst_encode_box_autoadd_u_64(BigInt raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return wire.cst_new_box_autoadd_u_64(cst_encode_u_64(raw)); - } - - @protected - ffi.Pointer cst_encode_box_autoadd_u_8(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return wire.cst_new_box_autoadd_u_8(cst_encode_u_8(raw)); - } - - @protected - ffi.Pointer cst_encode_list_bdk_policy( - List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_bdk_policy(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_bdk_policy(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer cst_encode_list_condition( - List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_condition(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_condition(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer - cst_encode_list_list_prim_u_8_strict(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_list_prim_u_8_strict(raw.length); - for (var i = 0; i < raw.length; ++i) { - ans.ref.ptr[i] = cst_encode_list_prim_u_8_strict(raw[i]); - } - return ans; - } - - @protected - ffi.Pointer cst_encode_list_local_utxo( - List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_local_utxo(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_local_utxo(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer cst_encode_list_out_point( - List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_out_point(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_out_point(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer cst_encode_list_pk_or_f(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_pk_or_f(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_pk_or_f(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer cst_encode_list_prim_u_32_strict( - Uint32List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_prim_u_32_strict(raw.length); - ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); - return ans; - } - - @protected - ffi.Pointer cst_encode_list_prim_u_64_strict( - Uint64List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_prim_u_64_strict(raw.length); - ans.ref.ptr.asTypedList(raw.length).setAll(0, raw.inner); - return ans; - } - - @protected - ffi.Pointer cst_encode_list_prim_u_8_loose( - List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_prim_u_8_loose(raw.length); - ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); - return ans; - } - - @protected - ffi.Pointer cst_encode_list_prim_u_8_strict( - Uint8List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_prim_u_8_strict(raw.length); - ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); - return ans; - } - - @protected - ffi.Pointer - cst_encode_list_record_list_prim_u_32_strict_list_condition( - List<(Uint32List, List)> raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire - .cst_new_list_record_list_prim_u_32_strict_list_condition(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_record_list_prim_u_32_strict_list_condition( - raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer - cst_encode_list_record_string_list_prim_u_32_strict( - List<(String, Uint32List)> raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = - wire.cst_new_list_record_string_list_prim_u_32_strict(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_record_string_list_prim_u_32_strict( - raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer - cst_encode_list_record_u_32_list_condition( - List<(int, List)> raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_record_u_32_list_condition(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_record_u_32_list_condition(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer cst_encode_list_script_amount( - List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_script_amount(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_script_amount(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer - cst_encode_list_transaction_details(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_transaction_details(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_transaction_details(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer cst_encode_list_tx_in(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_tx_in(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_tx_in(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer cst_encode_list_tx_out(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_tx_out(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_tx_out(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer - cst_encode_opt_Map_String_list_prim_u_32_strict( - Map? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_Map_String_list_prim_u_32_strict(raw); - } - - @protected - ffi.Pointer cst_encode_opt_String( - String? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_String(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_bdk_address( - BdkAddress? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_bdk_address(raw); - } - - @protected - ffi.Pointer - cst_encode_opt_box_autoadd_bdk_descriptor(BdkDescriptor? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_bdk_descriptor(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_bdk_policy( - BdkPolicy? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_bdk_policy(raw); - } - - @protected - ffi.Pointer - cst_encode_opt_box_autoadd_bdk_script_buf(BdkScriptBuf? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_bdk_script_buf(raw); - } - - @protected - ffi.Pointer - cst_encode_opt_box_autoadd_bdk_transaction(BdkTransaction? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_bdk_transaction(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_block_time( - BlockTime? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_block_time(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_bool(bool? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_bool(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_f_32(double? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_f_32(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_fee_rate( - FeeRate? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_fee_rate(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_lock_time( - LockTime? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_lock_time(raw); - } - - @protected - ffi.Pointer - cst_encode_opt_box_autoadd_psbt_sig_hash_type(PsbtSigHashType? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_psbt_sig_hash_type(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_rbf_value( - RbfValue? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_rbf_value(raw); - } - - @protected - ffi.Pointer - cst_encode_opt_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt)? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_record_out_point_input_usize(raw); - } - - @protected - ffi.Pointer - cst_encode_opt_box_autoadd_rpc_sync_params(RpcSyncParams? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_rpc_sync_params(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_sign_options( - SignOptions? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_sign_options(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_u_32(int? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_32(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_u_64(BigInt? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_64(raw); - } - - @protected - ffi.Pointer cst_encode_opt_box_autoadd_u_8(int? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_8(raw); - } - - @protected - int cst_encode_u_64(BigInt raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.toSigned(64).toInt(); - } - - @protected - ffi.Pointer cst_encode_u_8_array_4( - U8Array4 raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_prim_u_8_strict(4); - ans.ref.ptr.asTypedList(4).setAll(0, raw); - return ans; - } - - @protected - int cst_encode_usize(BigInt raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.toSigned(64).toInt(); - } - - @protected - void cst_api_fill_to_wire_address_error( - AddressError apiObj, wire_cst_address_error wireObj) { - if (apiObj is AddressError_Base58) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 0; - wireObj.kind.Base58.field0 = pre_field0; - return; - } - if (apiObj is AddressError_Bech32) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 1; - wireObj.kind.Bech32.field0 = pre_field0; - return; - } - if (apiObj is AddressError_EmptyBech32Payload) { - wireObj.tag = 2; - return; - } - if (apiObj is AddressError_InvalidBech32Variant) { - var pre_expected = cst_encode_variant(apiObj.expected); - var pre_found = cst_encode_variant(apiObj.found); - wireObj.tag = 3; - wireObj.kind.InvalidBech32Variant.expected = pre_expected; - wireObj.kind.InvalidBech32Variant.found = pre_found; - return; - } - if (apiObj is AddressError_InvalidWitnessVersion) { - var pre_field0 = cst_encode_u_8(apiObj.field0); - wireObj.tag = 4; - wireObj.kind.InvalidWitnessVersion.field0 = pre_field0; - return; - } - if (apiObj is AddressError_UnparsableWitnessVersion) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 5; - wireObj.kind.UnparsableWitnessVersion.field0 = pre_field0; - return; - } - if (apiObj is AddressError_MalformedWitnessVersion) { - wireObj.tag = 6; - return; - } - if (apiObj is AddressError_InvalidWitnessProgramLength) { - var pre_field0 = cst_encode_usize(apiObj.field0); - wireObj.tag = 7; - wireObj.kind.InvalidWitnessProgramLength.field0 = pre_field0; - return; - } - if (apiObj is AddressError_InvalidSegwitV0ProgramLength) { - var pre_field0 = cst_encode_usize(apiObj.field0); - wireObj.tag = 8; - wireObj.kind.InvalidSegwitV0ProgramLength.field0 = pre_field0; - return; - } - if (apiObj is AddressError_UncompressedPubkey) { - wireObj.tag = 9; - return; - } - if (apiObj is AddressError_ExcessiveScriptSize) { - wireObj.tag = 10; - return; - } - if (apiObj is AddressError_UnrecognizedScript) { - wireObj.tag = 11; - return; - } - if (apiObj is AddressError_UnknownAddressType) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 12; - wireObj.kind.UnknownAddressType.field0 = pre_field0; - return; - } - if (apiObj is AddressError_NetworkValidation) { - var pre_network_required = cst_encode_network(apiObj.networkRequired); - var pre_network_found = cst_encode_network(apiObj.networkFound); - var pre_address = cst_encode_String(apiObj.address); - wireObj.tag = 13; - wireObj.kind.NetworkValidation.network_required = pre_network_required; - wireObj.kind.NetworkValidation.network_found = pre_network_found; - wireObj.kind.NetworkValidation.address = pre_address; - return; - } - } - - @protected - void cst_api_fill_to_wire_address_index( - AddressIndex apiObj, wire_cst_address_index wireObj) { - if (apiObj is AddressIndex_Increase) { - wireObj.tag = 0; - return; - } - if (apiObj is AddressIndex_LastUnused) { - wireObj.tag = 1; - return; - } - if (apiObj is AddressIndex_Peek) { - var pre_index = cst_encode_u_32(apiObj.index); - wireObj.tag = 2; - wireObj.kind.Peek.index = pre_index; - return; - } - if (apiObj is AddressIndex_Reset) { - var pre_index = cst_encode_u_32(apiObj.index); - wireObj.tag = 3; - wireObj.kind.Reset.index = pre_index; - return; - } - } - - @protected - void cst_api_fill_to_wire_auth(Auth apiObj, wire_cst_auth wireObj) { - if (apiObj is Auth_None) { - wireObj.tag = 0; - return; - } - if (apiObj is Auth_UserPass) { - var pre_username = cst_encode_String(apiObj.username); - var pre_password = cst_encode_String(apiObj.password); - wireObj.tag = 1; - wireObj.kind.UserPass.username = pre_username; - wireObj.kind.UserPass.password = pre_password; - return; - } - if (apiObj is Auth_Cookie) { - var pre_file = cst_encode_String(apiObj.file); - wireObj.tag = 2; - wireObj.kind.Cookie.file = pre_file; - return; - } - } - - @protected - void cst_api_fill_to_wire_balance(Balance apiObj, wire_cst_balance wireObj) { - wireObj.immature = cst_encode_u_64(apiObj.immature); - wireObj.trusted_pending = cst_encode_u_64(apiObj.trustedPending); - wireObj.untrusted_pending = cst_encode_u_64(apiObj.untrustedPending); - wireObj.confirmed = cst_encode_u_64(apiObj.confirmed); - wireObj.spendable = cst_encode_u_64(apiObj.spendable); - wireObj.total = cst_encode_u_64(apiObj.total); - } - - @protected - void cst_api_fill_to_wire_bdk_address( - BdkAddress apiObj, wire_cst_bdk_address wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkbitcoinAddress(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_blockchain( - BdkBlockchain apiObj, wire_cst_bdk_blockchain wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkblockchainAnyBlockchain(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_derivation_path( - BdkDerivationPath apiObj, wire_cst_bdk_derivation_path wireObj) { - wireObj.ptr = - cst_encode_RustOpaque_bdkbitcoinbip32DerivationPath(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_descriptor( - BdkDescriptor apiObj, wire_cst_bdk_descriptor wireObj) { - wireObj.extended_descriptor = - cst_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - apiObj.extendedDescriptor); - wireObj.key_map = cst_encode_RustOpaque_bdkkeysKeyMap(apiObj.keyMap); - } - - @protected - void cst_api_fill_to_wire_bdk_descriptor_public_key( - BdkDescriptorPublicKey apiObj, - wire_cst_bdk_descriptor_public_key wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkkeysDescriptorPublicKey(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_descriptor_secret_key( - BdkDescriptorSecretKey apiObj, - wire_cst_bdk_descriptor_secret_key wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkkeysDescriptorSecretKey(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_error( - BdkError apiObj, wire_cst_bdk_error wireObj) { - if (apiObj is BdkError_Hex) { - var pre_field0 = cst_encode_box_autoadd_hex_error(apiObj.field0); - wireObj.tag = 0; - wireObj.kind.Hex.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Consensus) { - var pre_field0 = cst_encode_box_autoadd_consensus_error(apiObj.field0); - wireObj.tag = 1; - wireObj.kind.Consensus.field0 = pre_field0; - return; - } - if (apiObj is BdkError_VerifyTransaction) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 2; - wireObj.kind.VerifyTransaction.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Address) { - var pre_field0 = cst_encode_box_autoadd_address_error(apiObj.field0); - wireObj.tag = 3; - wireObj.kind.Address.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Descriptor) { - var pre_field0 = cst_encode_box_autoadd_descriptor_error(apiObj.field0); - wireObj.tag = 4; - wireObj.kind.Descriptor.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidU32Bytes) { - var pre_field0 = cst_encode_list_prim_u_8_strict(apiObj.field0); - wireObj.tag = 5; - wireObj.kind.InvalidU32Bytes.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Generic) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 6; - wireObj.kind.Generic.field0 = pre_field0; - return; - } - if (apiObj is BdkError_ScriptDoesntHaveAddressForm) { - wireObj.tag = 7; - return; - } - if (apiObj is BdkError_NoRecipients) { - wireObj.tag = 8; - return; - } - if (apiObj is BdkError_NoUtxosSelected) { - wireObj.tag = 9; - return; - } - if (apiObj is BdkError_OutputBelowDustLimit) { - var pre_field0 = cst_encode_usize(apiObj.field0); - wireObj.tag = 10; - wireObj.kind.OutputBelowDustLimit.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InsufficientFunds) { - var pre_needed = cst_encode_u_64(apiObj.needed); - var pre_available = cst_encode_u_64(apiObj.available); - wireObj.tag = 11; - wireObj.kind.InsufficientFunds.needed = pre_needed; - wireObj.kind.InsufficientFunds.available = pre_available; - return; - } - if (apiObj is BdkError_BnBTotalTriesExceeded) { - wireObj.tag = 12; - return; - } - if (apiObj is BdkError_BnBNoExactMatch) { - wireObj.tag = 13; - return; - } - if (apiObj is BdkError_UnknownUtxo) { - wireObj.tag = 14; - return; - } - if (apiObj is BdkError_TransactionNotFound) { - wireObj.tag = 15; - return; - } - if (apiObj is BdkError_TransactionConfirmed) { - wireObj.tag = 16; - return; - } - if (apiObj is BdkError_IrreplaceableTransaction) { - wireObj.tag = 17; - return; - } - if (apiObj is BdkError_FeeRateTooLow) { - var pre_needed = cst_encode_f_32(apiObj.needed); - wireObj.tag = 18; - wireObj.kind.FeeRateTooLow.needed = pre_needed; - return; - } - if (apiObj is BdkError_FeeTooLow) { - var pre_needed = cst_encode_u_64(apiObj.needed); - wireObj.tag = 19; - wireObj.kind.FeeTooLow.needed = pre_needed; - return; - } - if (apiObj is BdkError_FeeRateUnavailable) { - wireObj.tag = 20; - return; - } - if (apiObj is BdkError_MissingKeyOrigin) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 21; - wireObj.kind.MissingKeyOrigin.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Key) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 22; - wireObj.kind.Key.field0 = pre_field0; - return; - } - if (apiObj is BdkError_ChecksumMismatch) { - wireObj.tag = 23; - return; - } - if (apiObj is BdkError_SpendingPolicyRequired) { - var pre_field0 = cst_encode_keychain_kind(apiObj.field0); - wireObj.tag = 24; - wireObj.kind.SpendingPolicyRequired.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidPolicyPathError) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 25; - wireObj.kind.InvalidPolicyPathError.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Signer) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 26; - wireObj.kind.Signer.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidNetwork) { - var pre_requested = cst_encode_network(apiObj.requested); - var pre_found = cst_encode_network(apiObj.found); - wireObj.tag = 27; - wireObj.kind.InvalidNetwork.requested = pre_requested; - wireObj.kind.InvalidNetwork.found = pre_found; - return; - } - if (apiObj is BdkError_InvalidOutpoint) { - var pre_field0 = cst_encode_box_autoadd_out_point(apiObj.field0); - wireObj.tag = 28; - wireObj.kind.InvalidOutpoint.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Encode) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 29; - wireObj.kind.Encode.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Miniscript) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 30; - wireObj.kind.Miniscript.field0 = pre_field0; - return; - } - if (apiObj is BdkError_MiniscriptPsbt) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 31; - wireObj.kind.MiniscriptPsbt.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Bip32) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 32; - wireObj.kind.Bip32.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Bip39) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 33; - wireObj.kind.Bip39.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Secp256k1) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 34; - wireObj.kind.Secp256k1.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Json) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 35; - wireObj.kind.Json.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Psbt) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 36; - wireObj.kind.Psbt.field0 = pre_field0; - return; - } - if (apiObj is BdkError_PsbtParse) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 37; - wireObj.kind.PsbtParse.field0 = pre_field0; - return; - } - if (apiObj is BdkError_MissingCachedScripts) { - var pre_field0 = cst_encode_usize(apiObj.field0); - var pre_field1 = cst_encode_usize(apiObj.field1); - wireObj.tag = 38; - wireObj.kind.MissingCachedScripts.field0 = pre_field0; - wireObj.kind.MissingCachedScripts.field1 = pre_field1; - return; - } - if (apiObj is BdkError_Electrum) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 39; - wireObj.kind.Electrum.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Esplora) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 40; - wireObj.kind.Esplora.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Sled) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 41; - wireObj.kind.Sled.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Rpc) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 42; - wireObj.kind.Rpc.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Rusqlite) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 43; - wireObj.kind.Rusqlite.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidInput) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 44; - wireObj.kind.InvalidInput.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidLockTime) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 45; - wireObj.kind.InvalidLockTime.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidTransaction) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 46; - wireObj.kind.InvalidTransaction.field0 = pre_field0; - return; - } - } - - @protected - void cst_api_fill_to_wire_bdk_mnemonic( - BdkMnemonic apiObj, wire_cst_bdk_mnemonic wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkkeysbip39Mnemonic(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_policy( - BdkPolicy apiObj, wire_cst_bdk_policy wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkdescriptorPolicy(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_psbt( - BdkPsbt apiObj, wire_cst_bdk_psbt wireObj) { - wireObj.ptr = - cst_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_script_buf( - BdkScriptBuf apiObj, wire_cst_bdk_script_buf wireObj) { - wireObj.bytes = cst_encode_list_prim_u_8_strict(apiObj.bytes); - } - - @protected - void cst_api_fill_to_wire_bdk_transaction( - BdkTransaction apiObj, wire_cst_bdk_transaction wireObj) { - wireObj.s = cst_encode_String(apiObj.s); - } - - @protected - void cst_api_fill_to_wire_bdk_wallet( - BdkWallet apiObj, wire_cst_bdk_wallet wireObj) { - wireObj.ptr = - cst_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_block_time( - BlockTime apiObj, wire_cst_block_time wireObj) { - wireObj.height = cst_encode_u_32(apiObj.height); - wireObj.timestamp = cst_encode_u_64(apiObj.timestamp); - } - - @protected - void cst_api_fill_to_wire_blockchain_config( - BlockchainConfig apiObj, wire_cst_blockchain_config wireObj) { - if (apiObj is BlockchainConfig_Electrum) { - var pre_config = cst_encode_box_autoadd_electrum_config(apiObj.config); - wireObj.tag = 0; - wireObj.kind.Electrum.config = pre_config; - return; - } - if (apiObj is BlockchainConfig_Esplora) { - var pre_config = cst_encode_box_autoadd_esplora_config(apiObj.config); - wireObj.tag = 1; - wireObj.kind.Esplora.config = pre_config; - return; - } - if (apiObj is BlockchainConfig_Rpc) { - var pre_config = cst_encode_box_autoadd_rpc_config(apiObj.config); - wireObj.tag = 2; - wireObj.kind.Rpc.config = pre_config; - return; - } - } - - @protected - void cst_api_fill_to_wire_box_autoadd_address_error( - AddressError apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_address_error(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_address_index( - AddressIndex apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_address_index(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_address( - BdkAddress apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_address(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_blockchain( - BdkBlockchain apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_blockchain(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_derivation_path( - BdkDerivationPath apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_derivation_path(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_descriptor( - BdkDescriptor apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_descriptor(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_descriptor_public_key( - BdkDescriptorPublicKey apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_descriptor_public_key(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_descriptor_secret_key( - BdkDescriptorSecretKey apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_descriptor_secret_key(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_mnemonic( - BdkMnemonic apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_mnemonic(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_policy( - BdkPolicy apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_policy(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_psbt( - BdkPsbt apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_psbt(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_script_buf( - BdkScriptBuf apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_script_buf(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_transaction( - BdkTransaction apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_transaction(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_bdk_wallet( - BdkWallet apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_bdk_wallet(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_block_time( - BlockTime apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_block_time(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_blockchain_config( - BlockchainConfig apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_blockchain_config(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_condition( - Condition apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_condition(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_consensus_error( - ConsensusError apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_consensus_error(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_database_config( - DatabaseConfig apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_database_config(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_descriptor_error( - DescriptorError apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_descriptor_error(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_electrum_config( - ElectrumConfig apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_electrum_config(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_esplora_config( - EsploraConfig apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_esplora_config(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_fee_rate( - FeeRate apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_fee_rate(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_hex_error( - HexError apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_hex_error(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_local_utxo( - LocalUtxo apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_local_utxo(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_lock_time( - LockTime apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_lock_time(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_out_point( - OutPoint apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_out_point(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_pk_or_f( - PkOrF apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_pk_or_f(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_psbt_sig_hash_type( - PsbtSigHashType apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_psbt_sig_hash_type(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_rbf_value( - RbfValue apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_rbf_value(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt) apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_record_out_point_input_usize(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_rpc_config( - RpcConfig apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_rpc_config(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_rpc_sync_params( - RpcSyncParams apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_rpc_sync_params(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_sign_options( - SignOptions apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_sign_options(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_sled_db_configuration( - SledDbConfiguration apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_sled_db_configuration(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_sqlite_db_configuration( - SqliteDbConfiguration apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_sqlite_db_configuration(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_condition( - Condition apiObj, wire_cst_condition wireObj) { - wireObj.csv = cst_encode_opt_box_autoadd_u_32(apiObj.csv); - wireObj.timelock = cst_encode_opt_box_autoadd_lock_time(apiObj.timelock); - } - - @protected - void cst_api_fill_to_wire_consensus_error( - ConsensusError apiObj, wire_cst_consensus_error wireObj) { - if (apiObj is ConsensusError_Io) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 0; - wireObj.kind.Io.field0 = pre_field0; - return; - } - if (apiObj is ConsensusError_OversizedVectorAllocation) { - var pre_requested = cst_encode_usize(apiObj.requested); - var pre_max = cst_encode_usize(apiObj.max); - wireObj.tag = 1; - wireObj.kind.OversizedVectorAllocation.requested = pre_requested; - wireObj.kind.OversizedVectorAllocation.max = pre_max; - return; - } - if (apiObj is ConsensusError_InvalidChecksum) { - var pre_expected = cst_encode_u_8_array_4(apiObj.expected); - var pre_actual = cst_encode_u_8_array_4(apiObj.actual); - wireObj.tag = 2; - wireObj.kind.InvalidChecksum.expected = pre_expected; - wireObj.kind.InvalidChecksum.actual = pre_actual; - return; - } - if (apiObj is ConsensusError_NonMinimalVarInt) { - wireObj.tag = 3; - return; - } - if (apiObj is ConsensusError_ParseFailed) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 4; - wireObj.kind.ParseFailed.field0 = pre_field0; - return; - } - if (apiObj is ConsensusError_UnsupportedSegwitFlag) { - var pre_field0 = cst_encode_u_8(apiObj.field0); - wireObj.tag = 5; - wireObj.kind.UnsupportedSegwitFlag.field0 = pre_field0; - return; - } - } - - @protected - void cst_api_fill_to_wire_database_config( - DatabaseConfig apiObj, wire_cst_database_config wireObj) { - if (apiObj is DatabaseConfig_Memory) { - wireObj.tag = 0; - return; - } - if (apiObj is DatabaseConfig_Sqlite) { - var pre_config = - cst_encode_box_autoadd_sqlite_db_configuration(apiObj.config); - wireObj.tag = 1; - wireObj.kind.Sqlite.config = pre_config; - return; - } - if (apiObj is DatabaseConfig_Sled) { - var pre_config = - cst_encode_box_autoadd_sled_db_configuration(apiObj.config); - wireObj.tag = 2; - wireObj.kind.Sled.config = pre_config; - return; - } - } - - @protected - void cst_api_fill_to_wire_descriptor_error( - DescriptorError apiObj, wire_cst_descriptor_error wireObj) { - if (apiObj is DescriptorError_InvalidHdKeyPath) { - wireObj.tag = 0; - return; - } - if (apiObj is DescriptorError_InvalidDescriptorChecksum) { - wireObj.tag = 1; - return; - } - if (apiObj is DescriptorError_HardenedDerivationXpub) { - wireObj.tag = 2; - return; - } - if (apiObj is DescriptorError_MultiPath) { - wireObj.tag = 3; - return; - } - if (apiObj is DescriptorError_Key) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 4; - wireObj.kind.Key.field0 = pre_field0; - return; - } - if (apiObj is DescriptorError_Policy) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 5; - wireObj.kind.Policy.field0 = pre_field0; - return; - } - if (apiObj is DescriptorError_InvalidDescriptorCharacter) { - var pre_field0 = cst_encode_u_8(apiObj.field0); - wireObj.tag = 6; - wireObj.kind.InvalidDescriptorCharacter.field0 = pre_field0; - return; - } - if (apiObj is DescriptorError_Bip32) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 7; - wireObj.kind.Bip32.field0 = pre_field0; - return; - } - if (apiObj is DescriptorError_Base58) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 8; - wireObj.kind.Base58.field0 = pre_field0; - return; - } - if (apiObj is DescriptorError_Pk) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 9; - wireObj.kind.Pk.field0 = pre_field0; - return; - } - if (apiObj is DescriptorError_Miniscript) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 10; - wireObj.kind.Miniscript.field0 = pre_field0; - return; - } - if (apiObj is DescriptorError_Hex) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 11; - wireObj.kind.Hex.field0 = pre_field0; - return; - } - } - - @protected - void cst_api_fill_to_wire_electrum_config( - ElectrumConfig apiObj, wire_cst_electrum_config wireObj) { - wireObj.url = cst_encode_String(apiObj.url); - wireObj.socks5 = cst_encode_opt_String(apiObj.socks5); - wireObj.retry = cst_encode_u_8(apiObj.retry); - wireObj.timeout = cst_encode_opt_box_autoadd_u_8(apiObj.timeout); - wireObj.stop_gap = cst_encode_u_64(apiObj.stopGap); - wireObj.validate_domain = cst_encode_bool(apiObj.validateDomain); - } - - @protected - void cst_api_fill_to_wire_esplora_config( - EsploraConfig apiObj, wire_cst_esplora_config wireObj) { - wireObj.base_url = cst_encode_String(apiObj.baseUrl); - wireObj.proxy = cst_encode_opt_String(apiObj.proxy); - wireObj.concurrency = cst_encode_opt_box_autoadd_u_8(apiObj.concurrency); - wireObj.stop_gap = cst_encode_u_64(apiObj.stopGap); - wireObj.timeout = cst_encode_opt_box_autoadd_u_64(apiObj.timeout); - } - - @protected - void cst_api_fill_to_wire_fee_rate( - FeeRate apiObj, wire_cst_fee_rate wireObj) { - wireObj.sat_per_vb = cst_encode_f_32(apiObj.satPerVb); - } - - @protected - void cst_api_fill_to_wire_hex_error( - HexError apiObj, wire_cst_hex_error wireObj) { - if (apiObj is HexError_InvalidChar) { - var pre_field0 = cst_encode_u_8(apiObj.field0); - wireObj.tag = 0; - wireObj.kind.InvalidChar.field0 = pre_field0; - return; - } - if (apiObj is HexError_OddLengthString) { - var pre_field0 = cst_encode_usize(apiObj.field0); - wireObj.tag = 1; - wireObj.kind.OddLengthString.field0 = pre_field0; - return; - } - if (apiObj is HexError_InvalidLength) { - var pre_field0 = cst_encode_usize(apiObj.field0); - var pre_field1 = cst_encode_usize(apiObj.field1); - wireObj.tag = 2; - wireObj.kind.InvalidLength.field0 = pre_field0; - wireObj.kind.InvalidLength.field1 = pre_field1; - return; - } - } - - @protected - void cst_api_fill_to_wire_input(Input apiObj, wire_cst_input wireObj) { - wireObj.s = cst_encode_String(apiObj.s); - } - - @protected - void cst_api_fill_to_wire_local_utxo( - LocalUtxo apiObj, wire_cst_local_utxo wireObj) { - cst_api_fill_to_wire_out_point(apiObj.outpoint, wireObj.outpoint); - cst_api_fill_to_wire_tx_out(apiObj.txout, wireObj.txout); - wireObj.keychain = cst_encode_keychain_kind(apiObj.keychain); - wireObj.is_spent = cst_encode_bool(apiObj.isSpent); - } - - @protected - void cst_api_fill_to_wire_lock_time( - LockTime apiObj, wire_cst_lock_time wireObj) { - if (apiObj is LockTime_Blocks) { - var pre_field0 = cst_encode_u_32(apiObj.field0); - wireObj.tag = 0; - wireObj.kind.Blocks.field0 = pre_field0; - return; - } - if (apiObj is LockTime_Seconds) { - var pre_field0 = cst_encode_u_32(apiObj.field0); - wireObj.tag = 1; - wireObj.kind.Seconds.field0 = pre_field0; - return; - } - } - - @protected - void cst_api_fill_to_wire_out_point( - OutPoint apiObj, wire_cst_out_point wireObj) { - wireObj.txid = cst_encode_String(apiObj.txid); - wireObj.vout = cst_encode_u_32(apiObj.vout); - } - - @protected - void cst_api_fill_to_wire_payload(Payload apiObj, wire_cst_payload wireObj) { - if (apiObj is Payload_PubkeyHash) { - var pre_pubkey_hash = cst_encode_String(apiObj.pubkeyHash); - wireObj.tag = 0; - wireObj.kind.PubkeyHash.pubkey_hash = pre_pubkey_hash; - return; - } - if (apiObj is Payload_ScriptHash) { - var pre_script_hash = cst_encode_String(apiObj.scriptHash); - wireObj.tag = 1; - wireObj.kind.ScriptHash.script_hash = pre_script_hash; - return; - } - if (apiObj is Payload_WitnessProgram) { - var pre_version = cst_encode_witness_version(apiObj.version); - var pre_program = cst_encode_list_prim_u_8_strict(apiObj.program); - wireObj.tag = 2; - wireObj.kind.WitnessProgram.version = pre_version; - wireObj.kind.WitnessProgram.program = pre_program; - return; - } - } - - @protected - void cst_api_fill_to_wire_pk_or_f(PkOrF apiObj, wire_cst_pk_or_f wireObj) { - if (apiObj is PkOrF_Pubkey) { - var pre_value = cst_encode_String(apiObj.value); - wireObj.tag = 0; - wireObj.kind.Pubkey.value = pre_value; - return; - } - if (apiObj is PkOrF_XOnlyPubkey) { - var pre_value = cst_encode_String(apiObj.value); - wireObj.tag = 1; - wireObj.kind.XOnlyPubkey.value = pre_value; - return; - } - if (apiObj is PkOrF_Fingerprint) { - var pre_value = cst_encode_String(apiObj.value); - wireObj.tag = 2; - wireObj.kind.Fingerprint.value = pre_value; - return; - } - } - - @protected - void cst_api_fill_to_wire_psbt_sig_hash_type( - PsbtSigHashType apiObj, wire_cst_psbt_sig_hash_type wireObj) { - wireObj.inner = cst_encode_u_32(apiObj.inner); - } - - @protected - void cst_api_fill_to_wire_rbf_value( - RbfValue apiObj, wire_cst_rbf_value wireObj) { - if (apiObj is RbfValue_RbfDefault) { - wireObj.tag = 0; - return; - } - if (apiObj is RbfValue_Value) { - var pre_field0 = cst_encode_u_32(apiObj.field0); - wireObj.tag = 1; - wireObj.kind.Value.field0 = pre_field0; - return; - } - } - - @protected - void cst_api_fill_to_wire_record_bdk_address_u_32( - (BdkAddress, int) apiObj, wire_cst_record_bdk_address_u_32 wireObj) { - cst_api_fill_to_wire_bdk_address(apiObj.$1, wireObj.field0); - wireObj.field1 = cst_encode_u_32(apiObj.$2); - } - - @protected - void cst_api_fill_to_wire_record_bdk_psbt_transaction_details( - (BdkPsbt, TransactionDetails) apiObj, - wire_cst_record_bdk_psbt_transaction_details wireObj) { - cst_api_fill_to_wire_bdk_psbt(apiObj.$1, wireObj.field0); - cst_api_fill_to_wire_transaction_details(apiObj.$2, wireObj.field1); - } - - @protected - void cst_api_fill_to_wire_record_list_prim_u_32_strict_list_condition( - (Uint32List, List) apiObj, - wire_cst_record_list_prim_u_32_strict_list_condition wireObj) { - wireObj.field0 = cst_encode_list_prim_u_32_strict(apiObj.$1); - wireObj.field1 = cst_encode_list_condition(apiObj.$2); - } - - @protected - void cst_api_fill_to_wire_record_out_point_input_usize( - (OutPoint, Input, BigInt) apiObj, - wire_cst_record_out_point_input_usize wireObj) { - cst_api_fill_to_wire_out_point(apiObj.$1, wireObj.field0); - cst_api_fill_to_wire_input(apiObj.$2, wireObj.field1); - wireObj.field2 = cst_encode_usize(apiObj.$3); - } - - @protected - void cst_api_fill_to_wire_record_string_list_prim_u_32_strict( - (String, Uint32List) apiObj, - wire_cst_record_string_list_prim_u_32_strict wireObj) { - wireObj.field0 = cst_encode_String(apiObj.$1); - wireObj.field1 = cst_encode_list_prim_u_32_strict(apiObj.$2); - } - - @protected - void cst_api_fill_to_wire_record_u_32_list_condition( - (int, List) apiObj, - wire_cst_record_u_32_list_condition wireObj) { - wireObj.field0 = cst_encode_u_32(apiObj.$1); - wireObj.field1 = cst_encode_list_condition(apiObj.$2); - } - - @protected - void cst_api_fill_to_wire_rpc_config( - RpcConfig apiObj, wire_cst_rpc_config wireObj) { - wireObj.url = cst_encode_String(apiObj.url); - cst_api_fill_to_wire_auth(apiObj.auth, wireObj.auth); - wireObj.network = cst_encode_network(apiObj.network); - wireObj.wallet_name = cst_encode_String(apiObj.walletName); - wireObj.sync_params = - cst_encode_opt_box_autoadd_rpc_sync_params(apiObj.syncParams); - } - - @protected - void cst_api_fill_to_wire_rpc_sync_params( - RpcSyncParams apiObj, wire_cst_rpc_sync_params wireObj) { - wireObj.start_script_count = cst_encode_u_64(apiObj.startScriptCount); - wireObj.start_time = cst_encode_u_64(apiObj.startTime); - wireObj.force_start_time = cst_encode_bool(apiObj.forceStartTime); - wireObj.poll_rate_sec = cst_encode_u_64(apiObj.pollRateSec); - } - - @protected - void cst_api_fill_to_wire_satisfaction( - Satisfaction apiObj, wire_cst_satisfaction wireObj) { - if (apiObj is Satisfaction_Partial) { - var pre_n = cst_encode_u_64(apiObj.n); - var pre_m = cst_encode_u_64(apiObj.m); - var pre_items = cst_encode_list_prim_u_64_strict(apiObj.items); - var pre_sorted = cst_encode_opt_box_autoadd_bool(apiObj.sorted); - var pre_conditions = - cst_encode_Map_u_32_list_condition(apiObj.conditions); - wireObj.tag = 0; - wireObj.kind.Partial.n = pre_n; - wireObj.kind.Partial.m = pre_m; - wireObj.kind.Partial.items = pre_items; - wireObj.kind.Partial.sorted = pre_sorted; - wireObj.kind.Partial.conditions = pre_conditions; - return; - } - if (apiObj is Satisfaction_PartialComplete) { - var pre_n = cst_encode_u_64(apiObj.n); - var pre_m = cst_encode_u_64(apiObj.m); - var pre_items = cst_encode_list_prim_u_64_strict(apiObj.items); - var pre_sorted = cst_encode_opt_box_autoadd_bool(apiObj.sorted); - var pre_conditions = cst_encode_Map_list_prim_u_32_strict_list_condition( - apiObj.conditions); - wireObj.tag = 1; - wireObj.kind.PartialComplete.n = pre_n; - wireObj.kind.PartialComplete.m = pre_m; - wireObj.kind.PartialComplete.items = pre_items; - wireObj.kind.PartialComplete.sorted = pre_sorted; - wireObj.kind.PartialComplete.conditions = pre_conditions; - return; - } - if (apiObj is Satisfaction_Complete) { - var pre_condition = cst_encode_box_autoadd_condition(apiObj.condition); - wireObj.tag = 2; - wireObj.kind.Complete.condition = pre_condition; - return; - } - if (apiObj is Satisfaction_None) { - var pre_msg = cst_encode_String(apiObj.msg); - wireObj.tag = 3; - wireObj.kind.None.msg = pre_msg; - return; - } - } - - @protected - void cst_api_fill_to_wire_satisfiable_item( - SatisfiableItem apiObj, wire_cst_satisfiable_item wireObj) { - if (apiObj is SatisfiableItem_EcdsaSignature) { - var pre_key = cst_encode_box_autoadd_pk_or_f(apiObj.key); - wireObj.tag = 0; - wireObj.kind.EcdsaSignature.key = pre_key; - return; - } - if (apiObj is SatisfiableItem_SchnorrSignature) { - var pre_key = cst_encode_box_autoadd_pk_or_f(apiObj.key); - wireObj.tag = 1; - wireObj.kind.SchnorrSignature.key = pre_key; - return; - } - if (apiObj is SatisfiableItem_Sha256Preimage) { - var pre_hash = cst_encode_String(apiObj.hash); - wireObj.tag = 2; - wireObj.kind.Sha256Preimage.hash = pre_hash; - return; - } - if (apiObj is SatisfiableItem_Hash256Preimage) { - var pre_hash = cst_encode_String(apiObj.hash); - wireObj.tag = 3; - wireObj.kind.Hash256Preimage.hash = pre_hash; - return; - } - if (apiObj is SatisfiableItem_Ripemd160Preimage) { - var pre_hash = cst_encode_String(apiObj.hash); - wireObj.tag = 4; - wireObj.kind.Ripemd160Preimage.hash = pre_hash; - return; - } - if (apiObj is SatisfiableItem_Hash160Preimage) { - var pre_hash = cst_encode_String(apiObj.hash); - wireObj.tag = 5; - wireObj.kind.Hash160Preimage.hash = pre_hash; - return; - } - if (apiObj is SatisfiableItem_AbsoluteTimelock) { - var pre_value = cst_encode_box_autoadd_lock_time(apiObj.value); - wireObj.tag = 6; - wireObj.kind.AbsoluteTimelock.value = pre_value; - return; - } - if (apiObj is SatisfiableItem_RelativeTimelock) { - var pre_value = cst_encode_u_32(apiObj.value); - wireObj.tag = 7; - wireObj.kind.RelativeTimelock.value = pre_value; - return; - } - if (apiObj is SatisfiableItem_Multisig) { - var pre_keys = cst_encode_list_pk_or_f(apiObj.keys); - var pre_threshold = cst_encode_u_64(apiObj.threshold); - wireObj.tag = 8; - wireObj.kind.Multisig.keys = pre_keys; - wireObj.kind.Multisig.threshold = pre_threshold; - return; - } - if (apiObj is SatisfiableItem_Thresh) { - var pre_items = cst_encode_list_bdk_policy(apiObj.items); - var pre_threshold = cst_encode_u_64(apiObj.threshold); - wireObj.tag = 9; - wireObj.kind.Thresh.items = pre_items; - wireObj.kind.Thresh.threshold = pre_threshold; - return; - } - } - - @protected - void cst_api_fill_to_wire_script_amount( - ScriptAmount apiObj, wire_cst_script_amount wireObj) { - cst_api_fill_to_wire_bdk_script_buf(apiObj.script, wireObj.script); - wireObj.amount = cst_encode_u_64(apiObj.amount); - } - - @protected - void cst_api_fill_to_wire_sign_options( - SignOptions apiObj, wire_cst_sign_options wireObj) { - wireObj.trust_witness_utxo = cst_encode_bool(apiObj.trustWitnessUtxo); - wireObj.assume_height = - cst_encode_opt_box_autoadd_u_32(apiObj.assumeHeight); - wireObj.allow_all_sighashes = cst_encode_bool(apiObj.allowAllSighashes); - wireObj.remove_partial_sigs = cst_encode_bool(apiObj.removePartialSigs); - wireObj.try_finalize = cst_encode_bool(apiObj.tryFinalize); - wireObj.sign_with_tap_internal_key = - cst_encode_bool(apiObj.signWithTapInternalKey); - wireObj.allow_grinding = cst_encode_bool(apiObj.allowGrinding); - } - - @protected - void cst_api_fill_to_wire_sled_db_configuration( - SledDbConfiguration apiObj, wire_cst_sled_db_configuration wireObj) { - wireObj.path = cst_encode_String(apiObj.path); - wireObj.tree_name = cst_encode_String(apiObj.treeName); - } - - @protected - void cst_api_fill_to_wire_sqlite_db_configuration( - SqliteDbConfiguration apiObj, wire_cst_sqlite_db_configuration wireObj) { - wireObj.path = cst_encode_String(apiObj.path); - } - - @protected - void cst_api_fill_to_wire_transaction_details( - TransactionDetails apiObj, wire_cst_transaction_details wireObj) { - wireObj.transaction = - cst_encode_opt_box_autoadd_bdk_transaction(apiObj.transaction); - wireObj.txid = cst_encode_String(apiObj.txid); - wireObj.received = cst_encode_u_64(apiObj.received); - wireObj.sent = cst_encode_u_64(apiObj.sent); - wireObj.fee = cst_encode_opt_box_autoadd_u_64(apiObj.fee); - wireObj.confirmation_time = - cst_encode_opt_box_autoadd_block_time(apiObj.confirmationTime); - } - - @protected - void cst_api_fill_to_wire_tx_in(TxIn apiObj, wire_cst_tx_in wireObj) { - cst_api_fill_to_wire_out_point( - apiObj.previousOutput, wireObj.previous_output); - cst_api_fill_to_wire_bdk_script_buf(apiObj.scriptSig, wireObj.script_sig); - wireObj.sequence = cst_encode_u_32(apiObj.sequence); - wireObj.witness = cst_encode_list_list_prim_u_8_strict(apiObj.witness); - } - - @protected - void cst_api_fill_to_wire_tx_out(TxOut apiObj, wire_cst_tx_out wireObj) { - wireObj.value = cst_encode_u_64(apiObj.value); - cst_api_fill_to_wire_bdk_script_buf( - apiObj.scriptPubkey, wireObj.script_pubkey); - } - - @protected - int cst_encode_RustOpaque_bdkbitcoinAddress(Address raw); - - @protected - int cst_encode_RustOpaque_bdkbitcoinbip32DerivationPath(DerivationPath raw); - - @protected - int cst_encode_RustOpaque_bdkblockchainAnyBlockchain(AnyBlockchain raw); - - @protected - int cst_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - ExtendedDescriptor raw); - - @protected - int cst_encode_RustOpaque_bdkdescriptorPolicy(Policy raw); - - @protected - int cst_encode_RustOpaque_bdkkeysDescriptorPublicKey(DescriptorPublicKey raw); - - @protected - int cst_encode_RustOpaque_bdkkeysDescriptorSecretKey(DescriptorSecretKey raw); - - @protected - int cst_encode_RustOpaque_bdkkeysKeyMap(KeyMap raw); - - @protected - int cst_encode_RustOpaque_bdkkeysbip39Mnemonic(Mnemonic raw); - - @protected - int cst_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - MutexWalletAnyDatabase raw); - - @protected - int cst_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - MutexPartiallySignedTransaction raw); - - @protected - bool cst_encode_bool(bool raw); - - @protected - int cst_encode_change_spend_policy(ChangeSpendPolicy raw); - - @protected - double cst_encode_f_32(double raw); - - @protected - int cst_encode_i_32(int raw); - - @protected - int cst_encode_keychain_kind(KeychainKind raw); - - @protected - int cst_encode_network(Network raw); - - @protected - int cst_encode_u_32(int raw); - - @protected - int cst_encode_u_8(int raw); - - @protected - void cst_encode_unit(void raw); - - @protected - int cst_encode_variant(Variant raw); - - @protected - int cst_encode_witness_version(WitnessVersion raw); - - @protected - int cst_encode_word_count(WordCount raw); - - @protected - void sse_encode_Map_String_list_prim_u_32_strict( - Map self, SseSerializer serializer); - - @protected - void sse_encode_Map_list_prim_u_32_strict_list_condition( - Map> self, SseSerializer serializer); - - @protected - void sse_encode_Map_u_32_list_condition( - Map> self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkbitcoinAddress( - Address self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkbitcoinbip32DerivationPath( - DerivationPath self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkblockchainAnyBlockchain( - AnyBlockchain self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - ExtendedDescriptor self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkdescriptorPolicy( - Policy self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkkeysDescriptorPublicKey( - DescriptorPublicKey self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkkeysDescriptorSecretKey( - DescriptorSecretKey self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkkeysKeyMap( - KeyMap self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkkeysbip39Mnemonic( - Mnemonic self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - MutexWalletAnyDatabase self, SseSerializer serializer); - - @protected - void - sse_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - MutexPartiallySignedTransaction self, SseSerializer serializer); - - @protected - void sse_encode_String(String self, SseSerializer serializer); - - @protected - void sse_encode_address_error(AddressError self, SseSerializer serializer); - - @protected - void sse_encode_address_index(AddressIndex self, SseSerializer serializer); - - @protected - void sse_encode_auth(Auth self, SseSerializer serializer); - - @protected - void sse_encode_balance(Balance self, SseSerializer serializer); - - @protected - void sse_encode_bdk_address(BdkAddress self, SseSerializer serializer); - - @protected - void sse_encode_bdk_blockchain(BdkBlockchain self, SseSerializer serializer); - - @protected - void sse_encode_bdk_derivation_path( - BdkDerivationPath self, SseSerializer serializer); - - @protected - void sse_encode_bdk_descriptor(BdkDescriptor self, SseSerializer serializer); - - @protected - void sse_encode_bdk_descriptor_public_key( - BdkDescriptorPublicKey self, SseSerializer serializer); - - @protected - void sse_encode_bdk_descriptor_secret_key( - BdkDescriptorSecretKey self, SseSerializer serializer); - - @protected - void sse_encode_bdk_error(BdkError self, SseSerializer serializer); - - @protected - void sse_encode_bdk_mnemonic(BdkMnemonic self, SseSerializer serializer); - - @protected - void sse_encode_bdk_policy(BdkPolicy self, SseSerializer serializer); - - @protected - void sse_encode_bdk_psbt(BdkPsbt self, SseSerializer serializer); - - @protected - void sse_encode_bdk_script_buf(BdkScriptBuf self, SseSerializer serializer); - - @protected - void sse_encode_bdk_transaction( - BdkTransaction self, SseSerializer serializer); - - @protected - void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer); - - @protected - void sse_encode_block_time(BlockTime self, SseSerializer serializer); - - @protected - void sse_encode_blockchain_config( - BlockchainConfig self, SseSerializer serializer); - - @protected - void sse_encode_bool(bool self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_address_error( - AddressError self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_address_index( - AddressIndex self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_address( - BdkAddress self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_blockchain( - BdkBlockchain self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_derivation_path( - BdkDerivationPath self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_descriptor( - BdkDescriptor self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_descriptor_public_key( - BdkDescriptorPublicKey self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_descriptor_secret_key( - BdkDescriptorSecretKey self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_mnemonic( - BdkMnemonic self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_policy( - BdkPolicy self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_psbt(BdkPsbt self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_script_buf( - BdkScriptBuf self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_transaction( - BdkTransaction self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bdk_wallet( - BdkWallet self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_block_time( - BlockTime self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_blockchain_config( - BlockchainConfig self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_condition( - Condition self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_consensus_error( - ConsensusError self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_database_config( - DatabaseConfig self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_descriptor_error( - DescriptorError self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_electrum_config( - ElectrumConfig self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_esplora_config( - EsploraConfig self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_f_32(double self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_fee_rate(FeeRate self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_hex_error( - HexError self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_local_utxo( - LocalUtxo self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_lock_time( - LockTime self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_out_point( - OutPoint self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_pk_or_f(PkOrF self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_psbt_sig_hash_type( - PsbtSigHashType self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_rbf_value( - RbfValue self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt) self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_rpc_config( - RpcConfig self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_rpc_sync_params( - RpcSyncParams self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_sign_options( - SignOptions self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_sled_db_configuration( - SledDbConfiguration self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_sqlite_db_configuration( - SqliteDbConfiguration self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_u_8(int self, SseSerializer serializer); - - @protected - void sse_encode_change_spend_policy( - ChangeSpendPolicy self, SseSerializer serializer); - - @protected - void sse_encode_condition(Condition self, SseSerializer serializer); - - @protected - void sse_encode_consensus_error( - ConsensusError self, SseSerializer serializer); - - @protected - void sse_encode_database_config( - DatabaseConfig self, SseSerializer serializer); - - @protected - void sse_encode_descriptor_error( - DescriptorError self, SseSerializer serializer); - - @protected - void sse_encode_electrum_config( - ElectrumConfig self, SseSerializer serializer); - - @protected - void sse_encode_esplora_config(EsploraConfig self, SseSerializer serializer); - - @protected - void sse_encode_f_32(double self, SseSerializer serializer); - - @protected - void sse_encode_fee_rate(FeeRate self, SseSerializer serializer); - - @protected - void sse_encode_hex_error(HexError self, SseSerializer serializer); - - @protected - void sse_encode_i_32(int self, SseSerializer serializer); - - @protected - void sse_encode_input(Input self, SseSerializer serializer); - - @protected - void sse_encode_keychain_kind(KeychainKind self, SseSerializer serializer); - - @protected - void sse_encode_list_bdk_policy( - List self, SseSerializer serializer); - - @protected - void sse_encode_list_condition( - List self, SseSerializer serializer); - - @protected - void sse_encode_list_list_prim_u_8_strict( - List self, SseSerializer serializer); - - @protected - void sse_encode_list_local_utxo( - List self, SseSerializer serializer); - - @protected - void sse_encode_list_out_point(List self, SseSerializer serializer); - - @protected - void sse_encode_list_pk_or_f(List self, SseSerializer serializer); - - @protected - void sse_encode_list_prim_u_32_strict( - Uint32List self, SseSerializer serializer); - - @protected - void sse_encode_list_prim_u_64_strict( - Uint64List self, SseSerializer serializer); - - @protected - void sse_encode_list_prim_u_8_loose(List self, SseSerializer serializer); - - @protected - void sse_encode_list_prim_u_8_strict( - Uint8List self, SseSerializer serializer); - - @protected - void sse_encode_list_record_list_prim_u_32_strict_list_condition( - List<(Uint32List, List)> self, SseSerializer serializer); - - @protected - void sse_encode_list_record_string_list_prim_u_32_strict( - List<(String, Uint32List)> self, SseSerializer serializer); - - @protected - void sse_encode_list_record_u_32_list_condition( - List<(int, List)> self, SseSerializer serializer); - - @protected - void sse_encode_list_script_amount( - List self, SseSerializer serializer); - - @protected - void sse_encode_list_transaction_details( - List self, SseSerializer serializer); - - @protected - void sse_encode_list_tx_in(List self, SseSerializer serializer); - - @protected - void sse_encode_list_tx_out(List self, SseSerializer serializer); - - @protected - void sse_encode_local_utxo(LocalUtxo self, SseSerializer serializer); - - @protected - void sse_encode_lock_time(LockTime self, SseSerializer serializer); - - @protected - void sse_encode_network(Network self, SseSerializer serializer); - - @protected - void sse_encode_opt_Map_String_list_prim_u_32_strict( - Map? self, SseSerializer serializer); - - @protected - void sse_encode_opt_String(String? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_bdk_address( - BdkAddress? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_bdk_descriptor( - BdkDescriptor? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_bdk_policy( - BdkPolicy? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_bdk_script_buf( - BdkScriptBuf? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_bdk_transaction( - BdkTransaction? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_block_time( - BlockTime? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_bool(bool? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_f_32(double? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_fee_rate( - FeeRate? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_lock_time( - LockTime? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_psbt_sig_hash_type( - PsbtSigHashType? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_rbf_value( - RbfValue? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt)? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_rpc_sync_params( - RpcSyncParams? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_sign_options( - SignOptions? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_u_64(BigInt? self, SseSerializer serializer); - - @protected - void sse_encode_opt_box_autoadd_u_8(int? self, SseSerializer serializer); - - @protected - void sse_encode_out_point(OutPoint self, SseSerializer serializer); - - @protected - void sse_encode_payload(Payload self, SseSerializer serializer); - - @protected - void sse_encode_pk_or_f(PkOrF self, SseSerializer serializer); - - @protected - void sse_encode_psbt_sig_hash_type( - PsbtSigHashType self, SseSerializer serializer); - - @protected - void sse_encode_rbf_value(RbfValue self, SseSerializer serializer); - - @protected - void sse_encode_record_bdk_address_u_32( - (BdkAddress, int) self, SseSerializer serializer); - - @protected - void sse_encode_record_bdk_psbt_transaction_details( - (BdkPsbt, TransactionDetails) self, SseSerializer serializer); - - @protected - void sse_encode_record_list_prim_u_32_strict_list_condition( - (Uint32List, List) self, SseSerializer serializer); - - @protected - void sse_encode_record_out_point_input_usize( - (OutPoint, Input, BigInt) self, SseSerializer serializer); - - @protected - void sse_encode_record_string_list_prim_u_32_strict( - (String, Uint32List) self, SseSerializer serializer); - - @protected - void sse_encode_record_u_32_list_condition( - (int, List) self, SseSerializer serializer); - - @protected - void sse_encode_rpc_config(RpcConfig self, SseSerializer serializer); - - @protected - void sse_encode_rpc_sync_params(RpcSyncParams self, SseSerializer serializer); - - @protected - void sse_encode_satisfaction(Satisfaction self, SseSerializer serializer); - - @protected - void sse_encode_satisfiable_item( - SatisfiableItem self, SseSerializer serializer); - - @protected - void sse_encode_script_amount(ScriptAmount self, SseSerializer serializer); - - @protected - void sse_encode_sign_options(SignOptions self, SseSerializer serializer); - - @protected - void sse_encode_sled_db_configuration( - SledDbConfiguration self, SseSerializer serializer); - - @protected - void sse_encode_sqlite_db_configuration( - SqliteDbConfiguration self, SseSerializer serializer); - - @protected - void sse_encode_transaction_details( - TransactionDetails self, SseSerializer serializer); - - @protected - void sse_encode_tx_in(TxIn self, SseSerializer serializer); - - @protected - void sse_encode_tx_out(TxOut self, SseSerializer serializer); - - @protected - void sse_encode_u_32(int self, SseSerializer serializer); - - @protected - void sse_encode_u_64(BigInt self, SseSerializer serializer); - - @protected - void sse_encode_u_8(int self, SseSerializer serializer); - - @protected - void sse_encode_u_8_array_4(U8Array4 self, SseSerializer serializer); - - @protected - void sse_encode_unit(void self, SseSerializer serializer); - - @protected - void sse_encode_usize(BigInt self, SseSerializer serializer); - - @protected - void sse_encode_variant(Variant self, SseSerializer serializer); - - @protected - void sse_encode_witness_version( - WitnessVersion self, SseSerializer serializer); - - @protected - void sse_encode_word_count(WordCount self, SseSerializer serializer); -} - -// Section: wire_class - -// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:ffigen`. -// ignore_for_file: type=lint - -/// generated by flutter_rust_bridge -class coreWire implements BaseWire { - factory coreWire.fromExternalLibrary(ExternalLibrary lib) => - coreWire(lib.ffiDynamicLibrary); - - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - coreWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - coreWire.fromLookup( - ffi.Pointer Function(String symbolName) - lookup) - : _lookup = lookup; - - void store_dart_post_cobject( - DartPostCObjectFnType ptr, - ) { - return _store_dart_post_cobject( - ptr, - ); - } - - late final _store_dart_post_cobjectPtr = - _lookup>( - 'store_dart_post_cobject'); - late final _store_dart_post_cobject = _store_dart_post_cobjectPtr - .asFunction(); - - void wire__crate__api__blockchain__bdk_blockchain_broadcast( - int port_, - ffi.Pointer ptr, - ffi.Pointer transaction, - ) { - return _wire__crate__api__blockchain__bdk_blockchain_broadcast( - port_, - ptr, - transaction, - ); - } - - late final _wire__crate__api__blockchain__bdk_blockchain_broadcastPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast'); - late final _wire__crate__api__blockchain__bdk_blockchain_broadcast = - _wire__crate__api__blockchain__bdk_blockchain_broadcastPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__blockchain__bdk_blockchain_create( - int port_, - ffi.Pointer blockchain_config, - ) { - return _wire__crate__api__blockchain__bdk_blockchain_create( - port_, - blockchain_config, - ); - } - - late final _wire__crate__api__blockchain__bdk_blockchain_createPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create'); - late final _wire__crate__api__blockchain__bdk_blockchain_create = - _wire__crate__api__blockchain__bdk_blockchain_createPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__blockchain__bdk_blockchain_estimate_fee( - int port_, - ffi.Pointer that, - int target, - ) { - return _wire__crate__api__blockchain__bdk_blockchain_estimate_fee( - port_, - that, - target, - ); - } - - late final _wire__crate__api__blockchain__bdk_blockchain_estimate_feePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Uint64)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee'); - late final _wire__crate__api__blockchain__bdk_blockchain_estimate_fee = - _wire__crate__api__blockchain__bdk_blockchain_estimate_feePtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire__crate__api__blockchain__bdk_blockchain_get_block_hash( - int port_, - ffi.Pointer that, - int height, - ) { - return _wire__crate__api__blockchain__bdk_blockchain_get_block_hash( - port_, - that, - height, - ); - } - - late final _wire__crate__api__blockchain__bdk_blockchain_get_block_hashPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Uint32)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash'); - late final _wire__crate__api__blockchain__bdk_blockchain_get_block_hash = - _wire__crate__api__blockchain__bdk_blockchain_get_block_hashPtr - .asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire__crate__api__blockchain__bdk_blockchain_get_height( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__blockchain__bdk_blockchain_get_height( - port_, - that, - ); - } - - late final _wire__crate__api__blockchain__bdk_blockchain_get_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height'); - late final _wire__crate__api__blockchain__bdk_blockchain_get_height = - _wire__crate__api__blockchain__bdk_blockchain_get_heightPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__descriptor__bdk_descriptor_as_string( - ffi.Pointer that, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_as_string( - that, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_as_stringPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string'); - late final _wire__crate__api__descriptor__bdk_descriptor_as_string = - _wire__crate__api__descriptor__bdk_descriptor_as_stringPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - WireSyncRust2DartDco - wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( - ffi.Pointer that, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( - that, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weightPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight'); - late final _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight = - _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weightPtr - .asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - void wire__crate__api__descriptor__bdk_descriptor_new( - int port_, - ffi.Pointer descriptor, - int network, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_new( - port_, - descriptor, - network, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new'); - late final _wire__crate__api__descriptor__bdk_descriptor_new = - _wire__crate__api__descriptor__bdk_descriptor_newPtr.asFunction< - void Function( - int, ffi.Pointer, int)>(); - - void wire__crate__api__descriptor__bdk_descriptor_new_bip44( - int port_, - ffi.Pointer secret_key, - int keychain_kind, - int network, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip44( - port_, - secret_key, - keychain_kind, - network, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44 = - _wire__crate__api__descriptor__bdk_descriptor_new_bip44Ptr.asFunction< - void Function(int, ffi.Pointer, - int, int)>(); - - void wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( - int port_, - ffi.Pointer public_key, - ffi.Pointer fingerprint, - int keychain_kind, - int network, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44_publicPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44_public = - _wire__crate__api__descriptor__bdk_descriptor_new_bip44_publicPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - int)>(); - - void wire__crate__api__descriptor__bdk_descriptor_new_bip49( - int port_, - ffi.Pointer secret_key, - int keychain_kind, - int network, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip49( - port_, - secret_key, - keychain_kind, - network, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49 = - _wire__crate__api__descriptor__bdk_descriptor_new_bip49Ptr.asFunction< - void Function(int, ffi.Pointer, - int, int)>(); - - void wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( - int port_, - ffi.Pointer public_key, - ffi.Pointer fingerprint, - int keychain_kind, - int network, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49_publicPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49_public = - _wire__crate__api__descriptor__bdk_descriptor_new_bip49_publicPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - int)>(); - - void wire__crate__api__descriptor__bdk_descriptor_new_bip84( - int port_, - ffi.Pointer secret_key, - int keychain_kind, - int network, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip84( - port_, - secret_key, - keychain_kind, - network, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84 = - _wire__crate__api__descriptor__bdk_descriptor_new_bip84Ptr.asFunction< - void Function(int, ffi.Pointer, - int, int)>(); - - void wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( - int port_, - ffi.Pointer public_key, - ffi.Pointer fingerprint, - int keychain_kind, - int network, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84_publicPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84_public = - _wire__crate__api__descriptor__bdk_descriptor_new_bip84_publicPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - int)>(); - - void wire__crate__api__descriptor__bdk_descriptor_new_bip86( - int port_, - ffi.Pointer secret_key, - int keychain_kind, - int network, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip86( - port_, - secret_key, - keychain_kind, - network, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86 = - _wire__crate__api__descriptor__bdk_descriptor_new_bip86Ptr.asFunction< - void Function(int, ffi.Pointer, - int, int)>(); - - void wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( - int port_, - ffi.Pointer public_key, - ffi.Pointer fingerprint, - int keychain_kind, - int network, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86_publicPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86_public = - _wire__crate__api__descriptor__bdk_descriptor_new_bip86_publicPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - int)>(); - - WireSyncRust2DartDco - wire__crate__api__descriptor__bdk_descriptor_to_string_private( - ffi.Pointer that, - ) { - return _wire__crate__api__descriptor__bdk_descriptor_to_string_private( - that, - ); - } - - late final _wire__crate__api__descriptor__bdk_descriptor_to_string_privatePtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private'); - late final _wire__crate__api__descriptor__bdk_descriptor_to_string_private = - _wire__crate__api__descriptor__bdk_descriptor_to_string_privatePtr - .asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__key__bdk_derivation_path_as_string( - ffi.Pointer that, - ) { - return _wire__crate__api__key__bdk_derivation_path_as_string( - that, - ); - } - - late final _wire__crate__api__key__bdk_derivation_path_as_stringPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string'); - late final _wire__crate__api__key__bdk_derivation_path_as_string = - _wire__crate__api__key__bdk_derivation_path_as_stringPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_derivation_path_from_string( - int port_, - ffi.Pointer path, - ) { - return _wire__crate__api__key__bdk_derivation_path_from_string( - port_, - path, - ); - } - - late final _wire__crate__api__key__bdk_derivation_path_from_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string'); - late final _wire__crate__api__key__bdk_derivation_path_from_string = - _wire__crate__api__key__bdk_derivation_path_from_stringPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - WireSyncRust2DartDco - wire__crate__api__key__bdk_descriptor_public_key_as_string( - ffi.Pointer that, - ) { - return _wire__crate__api__key__bdk_descriptor_public_key_as_string( - that, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_public_key_as_stringPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string'); - late final _wire__crate__api__key__bdk_descriptor_public_key_as_string = - _wire__crate__api__key__bdk_descriptor_public_key_as_stringPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_public_key_derive( - int port_, - ffi.Pointer ptr, - ffi.Pointer path, - ) { - return _wire__crate__api__key__bdk_descriptor_public_key_derive( - port_, - ptr, - path, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_public_key_derivePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive'); - late final _wire__crate__api__key__bdk_descriptor_public_key_derive = - _wire__crate__api__key__bdk_descriptor_public_key_derivePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_public_key_extend( - int port_, - ffi.Pointer ptr, - ffi.Pointer path, - ) { - return _wire__crate__api__key__bdk_descriptor_public_key_extend( - port_, - ptr, - path, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_public_key_extendPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend'); - late final _wire__crate__api__key__bdk_descriptor_public_key_extend = - _wire__crate__api__key__bdk_descriptor_public_key_extendPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_public_key_from_string( - int port_, - ffi.Pointer public_key, - ) { - return _wire__crate__api__key__bdk_descriptor_public_key_from_string( - port_, - public_key, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_public_key_from_stringPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string'); - late final _wire__crate__api__key__bdk_descriptor_public_key_from_string = - _wire__crate__api__key__bdk_descriptor_public_key_from_stringPtr - .asFunction< - void Function(int, ffi.Pointer)>(); - - WireSyncRust2DartDco - wire__crate__api__key__bdk_descriptor_secret_key_as_public( - ffi.Pointer ptr, - ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_as_public( - ptr, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_secret_key_as_publicPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_as_public = - _wire__crate__api__key__bdk_descriptor_secret_key_as_publicPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - WireSyncRust2DartDco - wire__crate__api__key__bdk_descriptor_secret_key_as_string( - ffi.Pointer that, - ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_as_string( - that, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_secret_key_as_stringPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_as_string = - _wire__crate__api__key__bdk_descriptor_secret_key_as_stringPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_secret_key_create( - int port_, - int network, - ffi.Pointer mnemonic, - ffi.Pointer password, - ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_create( - port_, - network, - mnemonic, - password, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_secret_key_createPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_create = - _wire__crate__api__key__bdk_descriptor_secret_key_createPtr.asFunction< - void Function(int, int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_secret_key_derive( - int port_, - ffi.Pointer ptr, - ffi.Pointer path, - ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_derive( - port_, - ptr, - path, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_secret_key_derivePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_derive = - _wire__crate__api__key__bdk_descriptor_secret_key_derivePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_secret_key_extend( - int port_, - ffi.Pointer ptr, - ffi.Pointer path, - ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_extend( - port_, - ptr, - path, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_secret_key_extendPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_extend = - _wire__crate__api__key__bdk_descriptor_secret_key_extendPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_secret_key_from_string( - int port_, - ffi.Pointer secret_key, - ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_from_string( - port_, - secret_key, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_secret_key_from_stringPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_from_string = - _wire__crate__api__key__bdk_descriptor_secret_key_from_stringPtr - .asFunction< - void Function(int, ffi.Pointer)>(); - - WireSyncRust2DartDco - wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( - ffi.Pointer that, - ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( - that, - ); - } - - late final _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytesPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes = - _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytesPtr - .asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__key__bdk_mnemonic_as_string( - ffi.Pointer that, - ) { - return _wire__crate__api__key__bdk_mnemonic_as_string( - that, - ); - } - - late final _wire__crate__api__key__bdk_mnemonic_as_stringPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string'); - late final _wire__crate__api__key__bdk_mnemonic_as_string = - _wire__crate__api__key__bdk_mnemonic_as_stringPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - void wire__crate__api__key__bdk_mnemonic_from_entropy( - int port_, - ffi.Pointer entropy, - ) { - return _wire__crate__api__key__bdk_mnemonic_from_entropy( - port_, - entropy, - ); - } - - late final _wire__crate__api__key__bdk_mnemonic_from_entropyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy'); - late final _wire__crate__api__key__bdk_mnemonic_from_entropy = - _wire__crate__api__key__bdk_mnemonic_from_entropyPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__key__bdk_mnemonic_from_string( - int port_, - ffi.Pointer mnemonic, - ) { - return _wire__crate__api__key__bdk_mnemonic_from_string( - port_, - mnemonic, - ); - } - - late final _wire__crate__api__key__bdk_mnemonic_from_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string'); - late final _wire__crate__api__key__bdk_mnemonic_from_string = - _wire__crate__api__key__bdk_mnemonic_from_stringPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__key__bdk_mnemonic_new( - int port_, - int word_count, - ) { - return _wire__crate__api__key__bdk_mnemonic_new( - port_, - word_count, - ); - } - - late final _wire__crate__api__key__bdk_mnemonic_newPtr = - _lookup>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new'); - late final _wire__crate__api__key__bdk_mnemonic_new = - _wire__crate__api__key__bdk_mnemonic_newPtr - .asFunction(); - - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_as_string( - ffi.Pointer that, - ) { - return _wire__crate__api__psbt__bdk_psbt_as_string( - that, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_as_stringPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string'); - late final _wire__crate__api__psbt__bdk_psbt_as_string = - _wire__crate__api__psbt__bdk_psbt_as_stringPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - void wire__crate__api__psbt__bdk_psbt_combine( - int port_, - ffi.Pointer ptr, - ffi.Pointer other, - ) { - return _wire__crate__api__psbt__bdk_psbt_combine( - port_, - ptr, - other, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_combinePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine'); - late final _wire__crate__api__psbt__bdk_psbt_combine = - _wire__crate__api__psbt__bdk_psbt_combinePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_extract_tx( - ffi.Pointer ptr, - ) { - return _wire__crate__api__psbt__bdk_psbt_extract_tx( - ptr, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_extract_txPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx'); - late final _wire__crate__api__psbt__bdk_psbt_extract_tx = - _wire__crate__api__psbt__bdk_psbt_extract_txPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_fee_amount( - ffi.Pointer that, - ) { - return _wire__crate__api__psbt__bdk_psbt_fee_amount( - that, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_fee_amountPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount'); - late final _wire__crate__api__psbt__bdk_psbt_fee_amount = - _wire__crate__api__psbt__bdk_psbt_fee_amountPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_fee_rate( - ffi.Pointer that, - ) { - return _wire__crate__api__psbt__bdk_psbt_fee_rate( - that, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_fee_ratePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate'); - late final _wire__crate__api__psbt__bdk_psbt_fee_rate = - _wire__crate__api__psbt__bdk_psbt_fee_ratePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - void wire__crate__api__psbt__bdk_psbt_from_str( - int port_, - ffi.Pointer psbt_base64, - ) { - return _wire__crate__api__psbt__bdk_psbt_from_str( - port_, - psbt_base64, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_from_strPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str'); - late final _wire__crate__api__psbt__bdk_psbt_from_str = - _wire__crate__api__psbt__bdk_psbt_from_strPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_json_serialize( - ffi.Pointer that, - ) { - return _wire__crate__api__psbt__bdk_psbt_json_serialize( - that, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_json_serializePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize'); - late final _wire__crate__api__psbt__bdk_psbt_json_serialize = - _wire__crate__api__psbt__bdk_psbt_json_serializePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_serialize( - ffi.Pointer that, - ) { - return _wire__crate__api__psbt__bdk_psbt_serialize( - that, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_serializePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize'); - late final _wire__crate__api__psbt__bdk_psbt_serialize = - _wire__crate__api__psbt__bdk_psbt_serializePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_txid( - ffi.Pointer that, - ) { - return _wire__crate__api__psbt__bdk_psbt_txid( - that, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_txidPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid'); - late final _wire__crate__api__psbt__bdk_psbt_txid = - _wire__crate__api__psbt__bdk_psbt_txidPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_address_as_string( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_address_as_string( - that, - ); - } - - late final _wire__crate__api__types__bdk_address_as_stringPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string'); - late final _wire__crate__api__types__bdk_address_as_string = - _wire__crate__api__types__bdk_address_as_stringPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - void wire__crate__api__types__bdk_address_from_script( - int port_, - ffi.Pointer script, - int network, - ) { - return _wire__crate__api__types__bdk_address_from_script( - port_, - script, - network, - ); - } - - late final _wire__crate__api__types__bdk_address_from_scriptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script'); - late final _wire__crate__api__types__bdk_address_from_script = - _wire__crate__api__types__bdk_address_from_scriptPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire__crate__api__types__bdk_address_from_string( - int port_, - ffi.Pointer address, - int network, - ) { - return _wire__crate__api__types__bdk_address_from_string( - port_, - address, - network, - ); - } - - late final _wire__crate__api__types__bdk_address_from_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string'); - late final _wire__crate__api__types__bdk_address_from_string = - _wire__crate__api__types__bdk_address_from_stringPtr.asFunction< - void Function( - int, ffi.Pointer, int)>(); - - WireSyncRust2DartDco - wire__crate__api__types__bdk_address_is_valid_for_network( - ffi.Pointer that, - int network, - ) { - return _wire__crate__api__types__bdk_address_is_valid_for_network( - that, - network, - ); - } - - late final _wire__crate__api__types__bdk_address_is_valid_for_networkPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network'); - late final _wire__crate__api__types__bdk_address_is_valid_for_network = - _wire__crate__api__types__bdk_address_is_valid_for_networkPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, int)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_address_network( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_address_network( - that, - ); - } - - late final _wire__crate__api__types__bdk_address_networkPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network'); - late final _wire__crate__api__types__bdk_address_network = - _wire__crate__api__types__bdk_address_networkPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_address_payload( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_address_payload( - that, - ); - } - - late final _wire__crate__api__types__bdk_address_payloadPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload'); - late final _wire__crate__api__types__bdk_address_payload = - _wire__crate__api__types__bdk_address_payloadPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_address_script( - ffi.Pointer ptr, - ) { - return _wire__crate__api__types__bdk_address_script( - ptr, - ); - } - - late final _wire__crate__api__types__bdk_address_scriptPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script'); - late final _wire__crate__api__types__bdk_address_script = - _wire__crate__api__types__bdk_address_scriptPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_address_to_qr_uri( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_address_to_qr_uri( - that, - ); - } - - late final _wire__crate__api__types__bdk_address_to_qr_uriPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri'); - late final _wire__crate__api__types__bdk_address_to_qr_uri = - _wire__crate__api__types__bdk_address_to_qr_uriPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_policy_as_string( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_policy_as_string( - that, - ); - } - - late final _wire__crate__api__types__bdk_policy_as_stringPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string'); - late final _wire__crate__api__types__bdk_policy_as_string = - _wire__crate__api__types__bdk_policy_as_stringPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_policy_contribution( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_policy_contribution( - that, - ); - } - - late final _wire__crate__api__types__bdk_policy_contributionPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution'); - late final _wire__crate__api__types__bdk_policy_contribution = - _wire__crate__api__types__bdk_policy_contributionPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_policy_id( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_policy_id( - that, - ); - } - - late final _wire__crate__api__types__bdk_policy_idPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id'); - late final _wire__crate__api__types__bdk_policy_id = - _wire__crate__api__types__bdk_policy_idPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_policy_item( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_policy_item( - that, - ); - } - - late final _wire__crate__api__types__bdk_policy_itemPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item'); - late final _wire__crate__api__types__bdk_policy_item = - _wire__crate__api__types__bdk_policy_itemPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_policy_requires_path( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_policy_requires_path( - that, - ); - } - - late final _wire__crate__api__types__bdk_policy_requires_pathPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path'); - late final _wire__crate__api__types__bdk_policy_requires_path = - _wire__crate__api__types__bdk_policy_requires_pathPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_policy_satisfaction( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_policy_satisfaction( - that, - ); - } - - late final _wire__crate__api__types__bdk_policy_satisfactionPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction'); - late final _wire__crate__api__types__bdk_policy_satisfaction = - _wire__crate__api__types__bdk_policy_satisfactionPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_script_buf_as_string( - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_script_buf_as_string( - that, - ); - } - - late final _wire__crate__api__types__bdk_script_buf_as_stringPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string'); - late final _wire__crate__api__types__bdk_script_buf_as_string = - _wire__crate__api__types__bdk_script_buf_as_stringPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_script_buf_empty() { - return _wire__crate__api__types__bdk_script_buf_empty(); - } - - late final _wire__crate__api__types__bdk_script_buf_emptyPtr = - _lookup>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty'); - late final _wire__crate__api__types__bdk_script_buf_empty = - _wire__crate__api__types__bdk_script_buf_emptyPtr - .asFunction(); - - void wire__crate__api__types__bdk_script_buf_from_hex( - int port_, - ffi.Pointer s, - ) { - return _wire__crate__api__types__bdk_script_buf_from_hex( - port_, - s, - ); - } - - late final _wire__crate__api__types__bdk_script_buf_from_hexPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex'); - late final _wire__crate__api__types__bdk_script_buf_from_hex = - _wire__crate__api__types__bdk_script_buf_from_hexPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_script_buf_with_capacity( - int port_, - int capacity, - ) { - return _wire__crate__api__types__bdk_script_buf_with_capacity( - port_, - capacity, - ); - } - - late final _wire__crate__api__types__bdk_script_buf_with_capacityPtr = _lookup< - ffi.NativeFunction>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity'); - late final _wire__crate__api__types__bdk_script_buf_with_capacity = - _wire__crate__api__types__bdk_script_buf_with_capacityPtr - .asFunction(); - - void wire__crate__api__types__bdk_transaction_from_bytes( - int port_, - ffi.Pointer transaction_bytes, - ) { - return _wire__crate__api__types__bdk_transaction_from_bytes( - port_, - transaction_bytes, - ); - } - - late final _wire__crate__api__types__bdk_transaction_from_bytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes'); - late final _wire__crate__api__types__bdk_transaction_from_bytes = - _wire__crate__api__types__bdk_transaction_from_bytesPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_input( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_input( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_inputPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input'); - late final _wire__crate__api__types__bdk_transaction_input = - _wire__crate__api__types__bdk_transaction_inputPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_is_coin_base( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_is_coin_base( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_is_coin_basePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base'); - late final _wire__crate__api__types__bdk_transaction_is_coin_base = - _wire__crate__api__types__bdk_transaction_is_coin_basePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_is_explicitly_rbf( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_is_explicitly_rbf( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_is_explicitly_rbfPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf'); - late final _wire__crate__api__types__bdk_transaction_is_explicitly_rbf = - _wire__crate__api__types__bdk_transaction_is_explicitly_rbfPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_is_lock_time_enabled( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_is_lock_time_enabled( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_is_lock_time_enabledPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled'); - late final _wire__crate__api__types__bdk_transaction_is_lock_time_enabled = - _wire__crate__api__types__bdk_transaction_is_lock_time_enabledPtr - .asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_lock_time( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_lock_time( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_lock_timePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time'); - late final _wire__crate__api__types__bdk_transaction_lock_time = - _wire__crate__api__types__bdk_transaction_lock_timePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_new( - int port_, - int version, - ffi.Pointer lock_time, - ffi.Pointer input, - ffi.Pointer output, - ) { - return _wire__crate__api__types__bdk_transaction_new( - port_, - version, - lock_time, - input, - output, - ); - } - - late final _wire__crate__api__types__bdk_transaction_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new'); - late final _wire__crate__api__types__bdk_transaction_new = - _wire__crate__api__types__bdk_transaction_newPtr.asFunction< - void Function( - int, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_output( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_output( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_outputPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output'); - late final _wire__crate__api__types__bdk_transaction_output = - _wire__crate__api__types__bdk_transaction_outputPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_serialize( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_serialize( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_serializePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize'); - late final _wire__crate__api__types__bdk_transaction_serialize = - _wire__crate__api__types__bdk_transaction_serializePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_size( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_size( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size'); - late final _wire__crate__api__types__bdk_transaction_size = - _wire__crate__api__types__bdk_transaction_sizePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_txid( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_txid( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_txidPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid'); - late final _wire__crate__api__types__bdk_transaction_txid = - _wire__crate__api__types__bdk_transaction_txidPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_version( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_version( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version'); - late final _wire__crate__api__types__bdk_transaction_version = - _wire__crate__api__types__bdk_transaction_versionPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_vsize( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_vsize( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_vsizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize'); - late final _wire__crate__api__types__bdk_transaction_vsize = - _wire__crate__api__types__bdk_transaction_vsizePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_weight( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__types__bdk_transaction_weight( - port_, - that, - ); - } - - late final _wire__crate__api__types__bdk_transaction_weightPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight'); - late final _wire__crate__api__types__bdk_transaction_weight = - _wire__crate__api__types__bdk_transaction_weightPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_get_address( - ffi.Pointer ptr, - ffi.Pointer address_index, - ) { - return _wire__crate__api__wallet__bdk_wallet_get_address( - ptr, - address_index, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_get_addressPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address'); - late final _wire__crate__api__wallet__bdk_wallet_get_address = - _wire__crate__api__wallet__bdk_wallet_get_addressPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_get_balance( - ffi.Pointer that, - ) { - return _wire__crate__api__wallet__bdk_wallet_get_balance( - that, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_get_balancePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance'); - late final _wire__crate__api__wallet__bdk_wallet_get_balance = - _wire__crate__api__wallet__bdk_wallet_get_balancePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco - wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( - ffi.Pointer ptr, - int keychain, - ) { - return _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( - ptr, - keychain, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychainPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain'); - late final _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain = - _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychainPtr - .asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, int)>(); - - WireSyncRust2DartDco - wire__crate__api__wallet__bdk_wallet_get_internal_address( - ffi.Pointer ptr, - ffi.Pointer address_index, - ) { - return _wire__crate__api__wallet__bdk_wallet_get_internal_address( - ptr, - address_index, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_get_internal_addressPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address'); - late final _wire__crate__api__wallet__bdk_wallet_get_internal_address = - _wire__crate__api__wallet__bdk_wallet_get_internal_addressPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__wallet__bdk_wallet_get_psbt_input( - int port_, - ffi.Pointer that, - ffi.Pointer utxo, - bool only_witness_utxo, - ffi.Pointer sighash_type, - ) { - return _wire__crate__api__wallet__bdk_wallet_get_psbt_input( - port_, - that, - utxo, - only_witness_utxo, - sighash_type, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_get_psbt_inputPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input'); - late final _wire__crate__api__wallet__bdk_wallet_get_psbt_input = - _wire__crate__api__wallet__bdk_wallet_get_psbt_inputPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_is_mine( - ffi.Pointer ptr, - ffi.Pointer script, - ) { - return _wire__crate__api__wallet__bdk_wallet_is_mine( - ptr, - script, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_is_minePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine'); - late final _wire__crate__api__wallet__bdk_wallet_is_mine = - _wire__crate__api__wallet__bdk_wallet_is_minePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_list_transactions( - ffi.Pointer that, - bool include_raw, - ) { - return _wire__crate__api__wallet__bdk_wallet_list_transactions( - that, - include_raw, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_list_transactionsPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Bool)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions'); - late final _wire__crate__api__wallet__bdk_wallet_list_transactions = - _wire__crate__api__wallet__bdk_wallet_list_transactionsPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, bool)>(); - - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_list_unspent( - ffi.Pointer that, - ) { - return _wire__crate__api__wallet__bdk_wallet_list_unspent( - that, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_list_unspentPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent'); - late final _wire__crate__api__wallet__bdk_wallet_list_unspent = - _wire__crate__api__wallet__bdk_wallet_list_unspentPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_network( - ffi.Pointer that, - ) { - return _wire__crate__api__wallet__bdk_wallet_network( - that, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_networkPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network'); - late final _wire__crate__api__wallet__bdk_wallet_network = - _wire__crate__api__wallet__bdk_wallet_networkPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - void wire__crate__api__wallet__bdk_wallet_new( - int port_, - ffi.Pointer descriptor, - ffi.Pointer change_descriptor, - int network, - ffi.Pointer database_config, - ) { - return _wire__crate__api__wallet__bdk_wallet_new( - port_, - descriptor, - change_descriptor, - network, - database_config, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new'); - late final _wire__crate__api__wallet__bdk_wallet_new = - _wire__crate__api__wallet__bdk_wallet_newPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_policies( - ffi.Pointer ptr, - int keychain, - ) { - return _wire__crate__api__wallet__bdk_wallet_policies( - ptr, - keychain, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_policiesPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies'); - late final _wire__crate__api__wallet__bdk_wallet_policies = - _wire__crate__api__wallet__bdk_wallet_policiesPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, int)>(); - - void wire__crate__api__wallet__bdk_wallet_sign( - int port_, - ffi.Pointer ptr, - ffi.Pointer psbt, - ffi.Pointer sign_options, - ) { - return _wire__crate__api__wallet__bdk_wallet_sign( - port_, - ptr, - psbt, - sign_options, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_signPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign'); - late final _wire__crate__api__wallet__bdk_wallet_sign = - _wire__crate__api__wallet__bdk_wallet_signPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__wallet__bdk_wallet_sync( - int port_, - ffi.Pointer ptr, - ffi.Pointer blockchain, - ) { - return _wire__crate__api__wallet__bdk_wallet_sync( - port_, - ptr, - blockchain, - ); - } - - late final _wire__crate__api__wallet__bdk_wallet_syncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync'); - late final _wire__crate__api__wallet__bdk_wallet_sync = - _wire__crate__api__wallet__bdk_wallet_syncPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__wallet__finish_bump_fee_tx_builder( - int port_, - ffi.Pointer txid, - double fee_rate, - ffi.Pointer allow_shrinking, - ffi.Pointer wallet, - bool enable_rbf, - ffi.Pointer n_sequence, - ) { - return _wire__crate__api__wallet__finish_bump_fee_tx_builder( - port_, - txid, - fee_rate, - allow_shrinking, - wallet, - enable_rbf, - n_sequence, - ); - } - - late final _wire__crate__api__wallet__finish_bump_fee_tx_builderPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Float, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder'); - late final _wire__crate__api__wallet__finish_bump_fee_tx_builder = - _wire__crate__api__wallet__finish_bump_fee_tx_builderPtr.asFunction< - void Function( - int, - ffi.Pointer, - double, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - void wire__crate__api__wallet__tx_builder_finish( - int port_, - ffi.Pointer wallet, - ffi.Pointer recipients, - ffi.Pointer utxos, - ffi.Pointer foreign_utxo, - ffi.Pointer un_spendable, - int change_policy, - bool manually_selected_only, - ffi.Pointer fee_rate, - ffi.Pointer fee_absolute, - bool drain_wallet, - ffi.Pointer drain_to, - ffi.Pointer rbf, - ffi.Pointer - internal_policy_path, - ffi.Pointer - external_policy_path, - ffi.Pointer data, - ) { - return _wire__crate__api__wallet__tx_builder_finish( - port_, - wallet, - recipients, - utxos, - foreign_utxo, - un_spendable, - change_policy, - manually_selected_only, - fee_rate, - fee_absolute, - drain_wallet, - drain_to, - rbf, - internal_policy_path, - external_policy_path, - data, - ); - } - - late final _wire__crate__api__wallet__tx_builder_finishPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Bool, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - wire_cst_list_record_string_list_prim_u_32_strict>, - ffi.Pointer< - wire_cst_list_record_string_list_prim_u_32_strict>, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish'); - late final _wire__crate__api__wallet__tx_builder_finish = - _wire__crate__api__wallet__tx_builder_finishPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - bool, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddressPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress = - _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddressPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress = - _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath = - _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath = - _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain = - _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain = - _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr - .asFunction)>(); - - void - rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor = - _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr - .asFunction)>(); - - void - rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor = - _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy = - _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicyPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy = - _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicyPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey = - _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey = - _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey = - _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey = - _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMapPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap = - _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMapPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMapPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap = - _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMapPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic = - _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic = - _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr - .asFunction)>(); - - void - rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase'); - late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase = - _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr - .asFunction)>(); - - void - rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase'); - late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase = - _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr - .asFunction)>(); - - void - rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction'); - late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction = - _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr - .asFunction)>(); - - void - rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction'); - late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction = - _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr - .asFunction)>(); - - ffi.Pointer cst_new_box_autoadd_address_error() { - return _cst_new_box_autoadd_address_error(); - } - - late final _cst_new_box_autoadd_address_errorPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_address_error'); - late final _cst_new_box_autoadd_address_error = - _cst_new_box_autoadd_address_errorPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_address_index() { - return _cst_new_box_autoadd_address_index(); - } - - late final _cst_new_box_autoadd_address_indexPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_address_index'); - late final _cst_new_box_autoadd_address_index = - _cst_new_box_autoadd_address_indexPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_bdk_address() { - return _cst_new_box_autoadd_bdk_address(); - } - - late final _cst_new_box_autoadd_bdk_addressPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address'); - late final _cst_new_box_autoadd_bdk_address = - _cst_new_box_autoadd_bdk_addressPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_bdk_blockchain() { - return _cst_new_box_autoadd_bdk_blockchain(); - } - - late final _cst_new_box_autoadd_bdk_blockchainPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain'); - late final _cst_new_box_autoadd_bdk_blockchain = - _cst_new_box_autoadd_bdk_blockchainPtr - .asFunction Function()>(); - - ffi.Pointer - cst_new_box_autoadd_bdk_derivation_path() { - return _cst_new_box_autoadd_bdk_derivation_path(); - } - - late final _cst_new_box_autoadd_bdk_derivation_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path'); - late final _cst_new_box_autoadd_bdk_derivation_path = - _cst_new_box_autoadd_bdk_derivation_pathPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_bdk_descriptor() { - return _cst_new_box_autoadd_bdk_descriptor(); - } - - late final _cst_new_box_autoadd_bdk_descriptorPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor'); - late final _cst_new_box_autoadd_bdk_descriptor = - _cst_new_box_autoadd_bdk_descriptorPtr - .asFunction Function()>(); - - ffi.Pointer - cst_new_box_autoadd_bdk_descriptor_public_key() { - return _cst_new_box_autoadd_bdk_descriptor_public_key(); - } - - late final _cst_new_box_autoadd_bdk_descriptor_public_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key'); - late final _cst_new_box_autoadd_bdk_descriptor_public_key = - _cst_new_box_autoadd_bdk_descriptor_public_keyPtr.asFunction< - ffi.Pointer Function()>(); - - ffi.Pointer - cst_new_box_autoadd_bdk_descriptor_secret_key() { - return _cst_new_box_autoadd_bdk_descriptor_secret_key(); - } - - late final _cst_new_box_autoadd_bdk_descriptor_secret_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key'); - late final _cst_new_box_autoadd_bdk_descriptor_secret_key = - _cst_new_box_autoadd_bdk_descriptor_secret_keyPtr.asFunction< - ffi.Pointer Function()>(); - - ffi.Pointer cst_new_box_autoadd_bdk_mnemonic() { - return _cst_new_box_autoadd_bdk_mnemonic(); - } - - late final _cst_new_box_autoadd_bdk_mnemonicPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic'); - late final _cst_new_box_autoadd_bdk_mnemonic = - _cst_new_box_autoadd_bdk_mnemonicPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_bdk_policy() { - return _cst_new_box_autoadd_bdk_policy(); - } - - late final _cst_new_box_autoadd_bdk_policyPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy'); - late final _cst_new_box_autoadd_bdk_policy = - _cst_new_box_autoadd_bdk_policyPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_bdk_psbt() { - return _cst_new_box_autoadd_bdk_psbt(); - } - - late final _cst_new_box_autoadd_bdk_psbtPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt'); - late final _cst_new_box_autoadd_bdk_psbt = _cst_new_box_autoadd_bdk_psbtPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_bdk_script_buf() { - return _cst_new_box_autoadd_bdk_script_buf(); - } - - late final _cst_new_box_autoadd_bdk_script_bufPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf'); - late final _cst_new_box_autoadd_bdk_script_buf = - _cst_new_box_autoadd_bdk_script_bufPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_bdk_transaction() { - return _cst_new_box_autoadd_bdk_transaction(); - } - - late final _cst_new_box_autoadd_bdk_transactionPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction'); - late final _cst_new_box_autoadd_bdk_transaction = - _cst_new_box_autoadd_bdk_transactionPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_bdk_wallet() { - return _cst_new_box_autoadd_bdk_wallet(); - } - - late final _cst_new_box_autoadd_bdk_walletPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet'); - late final _cst_new_box_autoadd_bdk_wallet = - _cst_new_box_autoadd_bdk_walletPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_block_time() { - return _cst_new_box_autoadd_block_time(); - } - - late final _cst_new_box_autoadd_block_timePtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_block_time'); - late final _cst_new_box_autoadd_block_time = - _cst_new_box_autoadd_block_timePtr - .asFunction Function()>(); - - ffi.Pointer - cst_new_box_autoadd_blockchain_config() { - return _cst_new_box_autoadd_blockchain_config(); - } - - late final _cst_new_box_autoadd_blockchain_configPtr = _lookup< - ffi - .NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config'); - late final _cst_new_box_autoadd_blockchain_config = - _cst_new_box_autoadd_blockchain_configPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_bool( - bool value, - ) { - return _cst_new_box_autoadd_bool( - value, - ); - } - - late final _cst_new_box_autoadd_boolPtr = - _lookup Function(ffi.Bool)>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_bool'); - late final _cst_new_box_autoadd_bool = _cst_new_box_autoadd_boolPtr - .asFunction Function(bool)>(); - - ffi.Pointer cst_new_box_autoadd_condition() { - return _cst_new_box_autoadd_condition(); - } - - late final _cst_new_box_autoadd_conditionPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_condition'); - late final _cst_new_box_autoadd_condition = _cst_new_box_autoadd_conditionPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_consensus_error() { - return _cst_new_box_autoadd_consensus_error(); - } - - late final _cst_new_box_autoadd_consensus_errorPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error'); - late final _cst_new_box_autoadd_consensus_error = - _cst_new_box_autoadd_consensus_errorPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_database_config() { - return _cst_new_box_autoadd_database_config(); - } - - late final _cst_new_box_autoadd_database_configPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_database_config'); - late final _cst_new_box_autoadd_database_config = - _cst_new_box_autoadd_database_configPtr - .asFunction Function()>(); - - ffi.Pointer - cst_new_box_autoadd_descriptor_error() { - return _cst_new_box_autoadd_descriptor_error(); - } - - late final _cst_new_box_autoadd_descriptor_errorPtr = _lookup< - ffi - .NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error'); - late final _cst_new_box_autoadd_descriptor_error = - _cst_new_box_autoadd_descriptor_errorPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_electrum_config() { - return _cst_new_box_autoadd_electrum_config(); - } - - late final _cst_new_box_autoadd_electrum_configPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config'); - late final _cst_new_box_autoadd_electrum_config = - _cst_new_box_autoadd_electrum_configPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_esplora_config() { - return _cst_new_box_autoadd_esplora_config(); - } - - late final _cst_new_box_autoadd_esplora_configPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config'); - late final _cst_new_box_autoadd_esplora_config = - _cst_new_box_autoadd_esplora_configPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_f_32( - double value, - ) { - return _cst_new_box_autoadd_f_32( - value, - ); - } - - late final _cst_new_box_autoadd_f_32Ptr = - _lookup Function(ffi.Float)>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_f_32'); - late final _cst_new_box_autoadd_f_32 = _cst_new_box_autoadd_f_32Ptr - .asFunction Function(double)>(); - - ffi.Pointer cst_new_box_autoadd_fee_rate() { - return _cst_new_box_autoadd_fee_rate(); - } - - late final _cst_new_box_autoadd_fee_ratePtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate'); - late final _cst_new_box_autoadd_fee_rate = _cst_new_box_autoadd_fee_ratePtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_hex_error() { - return _cst_new_box_autoadd_hex_error(); - } - - late final _cst_new_box_autoadd_hex_errorPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_hex_error'); - late final _cst_new_box_autoadd_hex_error = _cst_new_box_autoadd_hex_errorPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_local_utxo() { - return _cst_new_box_autoadd_local_utxo(); - } - - late final _cst_new_box_autoadd_local_utxoPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo'); - late final _cst_new_box_autoadd_local_utxo = - _cst_new_box_autoadd_local_utxoPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_lock_time() { - return _cst_new_box_autoadd_lock_time(); - } - - late final _cst_new_box_autoadd_lock_timePtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_lock_time'); - late final _cst_new_box_autoadd_lock_time = _cst_new_box_autoadd_lock_timePtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_out_point() { - return _cst_new_box_autoadd_out_point(); - } - - late final _cst_new_box_autoadd_out_pointPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_out_point'); - late final _cst_new_box_autoadd_out_point = _cst_new_box_autoadd_out_pointPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_pk_or_f() { - return _cst_new_box_autoadd_pk_or_f(); - } - - late final _cst_new_box_autoadd_pk_or_fPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f'); - late final _cst_new_box_autoadd_pk_or_f = _cst_new_box_autoadd_pk_or_fPtr - .asFunction Function()>(); - - ffi.Pointer - cst_new_box_autoadd_psbt_sig_hash_type() { - return _cst_new_box_autoadd_psbt_sig_hash_type(); - } - - late final _cst_new_box_autoadd_psbt_sig_hash_typePtr = _lookup< - ffi - .NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type'); - late final _cst_new_box_autoadd_psbt_sig_hash_type = - _cst_new_box_autoadd_psbt_sig_hash_typePtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_rbf_value() { - return _cst_new_box_autoadd_rbf_value(); - } - - late final _cst_new_box_autoadd_rbf_valuePtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value'); - late final _cst_new_box_autoadd_rbf_value = _cst_new_box_autoadd_rbf_valuePtr - .asFunction Function()>(); - - ffi.Pointer - cst_new_box_autoadd_record_out_point_input_usize() { - return _cst_new_box_autoadd_record_out_point_input_usize(); - } - - late final _cst_new_box_autoadd_record_out_point_input_usizePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize'); - late final _cst_new_box_autoadd_record_out_point_input_usize = - _cst_new_box_autoadd_record_out_point_input_usizePtr.asFunction< - ffi.Pointer Function()>(); - - ffi.Pointer cst_new_box_autoadd_rpc_config() { - return _cst_new_box_autoadd_rpc_config(); - } - - late final _cst_new_box_autoadd_rpc_configPtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config'); - late final _cst_new_box_autoadd_rpc_config = - _cst_new_box_autoadd_rpc_configPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_rpc_sync_params() { - return _cst_new_box_autoadd_rpc_sync_params(); - } - - late final _cst_new_box_autoadd_rpc_sync_paramsPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params'); - late final _cst_new_box_autoadd_rpc_sync_params = - _cst_new_box_autoadd_rpc_sync_paramsPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_sign_options() { - return _cst_new_box_autoadd_sign_options(); - } - - late final _cst_new_box_autoadd_sign_optionsPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_sign_options'); - late final _cst_new_box_autoadd_sign_options = - _cst_new_box_autoadd_sign_optionsPtr - .asFunction Function()>(); - - ffi.Pointer - cst_new_box_autoadd_sled_db_configuration() { - return _cst_new_box_autoadd_sled_db_configuration(); - } - - late final _cst_new_box_autoadd_sled_db_configurationPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration'); - late final _cst_new_box_autoadd_sled_db_configuration = - _cst_new_box_autoadd_sled_db_configurationPtr - .asFunction Function()>(); - - ffi.Pointer - cst_new_box_autoadd_sqlite_db_configuration() { - return _cst_new_box_autoadd_sqlite_db_configuration(); - } - - late final _cst_new_box_autoadd_sqlite_db_configurationPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration'); - late final _cst_new_box_autoadd_sqlite_db_configuration = - _cst_new_box_autoadd_sqlite_db_configurationPtr.asFunction< - ffi.Pointer Function()>(); - - ffi.Pointer cst_new_box_autoadd_u_32( - int value, - ) { - return _cst_new_box_autoadd_u_32( - value, - ); - } - - late final _cst_new_box_autoadd_u_32Ptr = - _lookup Function(ffi.Uint32)>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_u_32'); - late final _cst_new_box_autoadd_u_32 = _cst_new_box_autoadd_u_32Ptr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_box_autoadd_u_64( - int value, - ) { - return _cst_new_box_autoadd_u_64( - value, - ); - } - - late final _cst_new_box_autoadd_u_64Ptr = - _lookup Function(ffi.Uint64)>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_u_64'); - late final _cst_new_box_autoadd_u_64 = _cst_new_box_autoadd_u_64Ptr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_box_autoadd_u_8( - int value, - ) { - return _cst_new_box_autoadd_u_8( - value, - ); - } - - late final _cst_new_box_autoadd_u_8Ptr = - _lookup Function(ffi.Uint8)>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_u_8'); - late final _cst_new_box_autoadd_u_8 = _cst_new_box_autoadd_u_8Ptr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_bdk_policy( - int len, - ) { - return _cst_new_list_bdk_policy( - len, - ); - } - - late final _cst_new_list_bdk_policyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_bdk_policy'); - late final _cst_new_list_bdk_policy = _cst_new_list_bdk_policyPtr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_condition( - int len, - ) { - return _cst_new_list_condition( - len, - ); - } - - late final _cst_new_list_conditionPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_condition'); - late final _cst_new_list_condition = _cst_new_list_conditionPtr - .asFunction Function(int)>(); - - ffi.Pointer - cst_new_list_list_prim_u_8_strict( - int len, - ) { - return _cst_new_list_list_prim_u_8_strict( - len, - ); - } - - late final _cst_new_list_list_prim_u_8_strictPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>( - 'frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict'); - late final _cst_new_list_list_prim_u_8_strict = - _cst_new_list_list_prim_u_8_strictPtr.asFunction< - ffi.Pointer Function(int)>(); - - ffi.Pointer cst_new_list_local_utxo( - int len, - ) { - return _cst_new_list_local_utxo( - len, - ); - } - - late final _cst_new_list_local_utxoPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_local_utxo'); - late final _cst_new_list_local_utxo = _cst_new_list_local_utxoPtr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_out_point( - int len, - ) { - return _cst_new_list_out_point( - len, - ); - } - - late final _cst_new_list_out_pointPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_out_point'); - late final _cst_new_list_out_point = _cst_new_list_out_pointPtr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_pk_or_f( - int len, - ) { - return _cst_new_list_pk_or_f( - len, - ); - } - - late final _cst_new_list_pk_or_fPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_pk_or_f'); - late final _cst_new_list_pk_or_f = _cst_new_list_pk_or_fPtr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_prim_u_32_strict( - int len, - ) { - return _cst_new_list_prim_u_32_strict( - len, - ); - } - - late final _cst_new_list_prim_u_32_strictPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_prim_u_32_strict'); - late final _cst_new_list_prim_u_32_strict = _cst_new_list_prim_u_32_strictPtr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_prim_u_64_strict( - int len, - ) { - return _cst_new_list_prim_u_64_strict( - len, - ); - } - - late final _cst_new_list_prim_u_64_strictPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_prim_u_64_strict'); - late final _cst_new_list_prim_u_64_strict = _cst_new_list_prim_u_64_strictPtr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_prim_u_8_loose( - int len, - ) { - return _cst_new_list_prim_u_8_loose( - len, - ); - } - - late final _cst_new_list_prim_u_8_loosePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_prim_u_8_loose'); - late final _cst_new_list_prim_u_8_loose = _cst_new_list_prim_u_8_loosePtr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_prim_u_8_strict( - int len, - ) { - return _cst_new_list_prim_u_8_strict( - len, - ); - } - - late final _cst_new_list_prim_u_8_strictPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_prim_u_8_strict'); - late final _cst_new_list_prim_u_8_strict = _cst_new_list_prim_u_8_strictPtr - .asFunction Function(int)>(); - - ffi.Pointer - cst_new_list_record_list_prim_u_32_strict_list_condition( - int len, - ) { - return _cst_new_list_record_list_prim_u_32_strict_list_condition( - len, - ); - } - - late final _cst_new_list_record_list_prim_u_32_strict_list_conditionPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - wire_cst_list_record_list_prim_u_32_strict_list_condition> - Function(ffi.Int32)>>( - 'frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition'); - late final _cst_new_list_record_list_prim_u_32_strict_list_condition = - _cst_new_list_record_list_prim_u_32_strict_list_conditionPtr.asFunction< - ffi.Pointer - Function(int)>(); - - ffi.Pointer - cst_new_list_record_string_list_prim_u_32_strict( - int len, - ) { - return _cst_new_list_record_string_list_prim_u_32_strict( - len, - ); - } - - late final _cst_new_list_record_string_list_prim_u_32_strictPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer - Function(ffi.Int32)>>( - 'frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict'); - late final _cst_new_list_record_string_list_prim_u_32_strict = - _cst_new_list_record_string_list_prim_u_32_strictPtr.asFunction< - ffi.Pointer - Function(int)>(); - - ffi.Pointer - cst_new_list_record_u_32_list_condition( - int len, - ) { - return _cst_new_list_record_u_32_list_condition( - len, - ); - } - - late final _cst_new_list_record_u_32_list_conditionPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>( - 'frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition'); - late final _cst_new_list_record_u_32_list_condition = - _cst_new_list_record_u_32_list_conditionPtr.asFunction< - ffi.Pointer Function( - int)>(); - - ffi.Pointer cst_new_list_script_amount( - int len, - ) { - return _cst_new_list_script_amount( - len, - ); - } - - late final _cst_new_list_script_amountPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_script_amount'); - late final _cst_new_list_script_amount = _cst_new_list_script_amountPtr - .asFunction Function(int)>(); - - ffi.Pointer - cst_new_list_transaction_details( - int len, - ) { - return _cst_new_list_transaction_details( - len, - ); - } - - late final _cst_new_list_transaction_detailsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>( - 'frbgen_bdk_flutter_cst_new_list_transaction_details'); - late final _cst_new_list_transaction_details = - _cst_new_list_transaction_detailsPtr.asFunction< - ffi.Pointer Function(int)>(); - - ffi.Pointer cst_new_list_tx_in( - int len, - ) { - return _cst_new_list_tx_in( - len, - ); - } - - late final _cst_new_list_tx_inPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_tx_in'); - late final _cst_new_list_tx_in = _cst_new_list_tx_inPtr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_tx_out( - int len, - ) { - return _cst_new_list_tx_out( - len, - ); - } - - late final _cst_new_list_tx_outPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_tx_out'); - late final _cst_new_list_tx_out = _cst_new_list_tx_outPtr - .asFunction Function(int)>(); - - int dummy_method_to_enforce_bundling() { - return _dummy_method_to_enforce_bundling(); - } - - late final _dummy_method_to_enforce_bundlingPtr = - _lookup>( - 'dummy_method_to_enforce_bundling'); - late final _dummy_method_to_enforce_bundling = - _dummy_method_to_enforce_bundlingPtr.asFunction(); -} - -typedef DartPostCObjectFnType - = ffi.Pointer>; -typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( - DartPort port_id, ffi.Pointer message); -typedef DartDartPostCObjectFnTypeFunction = bool Function( - DartDartPort port_id, ffi.Pointer message); -typedef DartPort = ffi.Int64; -typedef DartDartPort = int; - -final class wire_cst_bdk_blockchain extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_list_prim_u_8_strict extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_bdk_transaction extends ffi.Struct { - external ffi.Pointer s; -} - -final class wire_cst_electrum_config extends ffi.Struct { - external ffi.Pointer url; - - external ffi.Pointer socks5; - - @ffi.Uint8() - external int retry; - - external ffi.Pointer timeout; - - @ffi.Uint64() - external int stop_gap; - - @ffi.Bool() - external bool validate_domain; -} - -final class wire_cst_BlockchainConfig_Electrum extends ffi.Struct { - external ffi.Pointer config; -} - -final class wire_cst_esplora_config extends ffi.Struct { - external ffi.Pointer base_url; - - external ffi.Pointer proxy; - - external ffi.Pointer concurrency; - - @ffi.Uint64() - external int stop_gap; - - external ffi.Pointer timeout; -} - -final class wire_cst_BlockchainConfig_Esplora extends ffi.Struct { - external ffi.Pointer config; -} - -final class wire_cst_Auth_UserPass extends ffi.Struct { - external ffi.Pointer username; - - external ffi.Pointer password; -} - -final class wire_cst_Auth_Cookie extends ffi.Struct { - external ffi.Pointer file; -} - -final class AuthKind extends ffi.Union { - external wire_cst_Auth_UserPass UserPass; - - external wire_cst_Auth_Cookie Cookie; -} - -final class wire_cst_auth extends ffi.Struct { - @ffi.Int32() - external int tag; - - external AuthKind kind; -} - -final class wire_cst_rpc_sync_params extends ffi.Struct { - @ffi.Uint64() - external int start_script_count; - - @ffi.Uint64() - external int start_time; - - @ffi.Bool() - external bool force_start_time; - - @ffi.Uint64() - external int poll_rate_sec; -} - -final class wire_cst_rpc_config extends ffi.Struct { - external ffi.Pointer url; - - external wire_cst_auth auth; - - @ffi.Int32() - external int network; - - external ffi.Pointer wallet_name; - - external ffi.Pointer sync_params; -} - -final class wire_cst_BlockchainConfig_Rpc extends ffi.Struct { - external ffi.Pointer config; -} - -final class BlockchainConfigKind extends ffi.Union { - external wire_cst_BlockchainConfig_Electrum Electrum; - - external wire_cst_BlockchainConfig_Esplora Esplora; - - external wire_cst_BlockchainConfig_Rpc Rpc; -} - -final class wire_cst_blockchain_config extends ffi.Struct { - @ffi.Int32() - external int tag; - - external BlockchainConfigKind kind; -} - -final class wire_cst_bdk_descriptor extends ffi.Struct { - @ffi.UintPtr() - external int extended_descriptor; - - @ffi.UintPtr() - external int key_map; -} - -final class wire_cst_bdk_descriptor_secret_key extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_bdk_descriptor_public_key extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_bdk_derivation_path extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_bdk_mnemonic extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_list_prim_u_8_loose extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_bdk_psbt extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_bdk_address extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_bdk_script_buf extends ffi.Struct { - external ffi.Pointer bytes; -} - -final class wire_cst_bdk_policy extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_LockTime_Blocks extends ffi.Struct { - @ffi.Uint32() - external int field0; -} - -final class wire_cst_LockTime_Seconds extends ffi.Struct { - @ffi.Uint32() - external int field0; -} - -final class LockTimeKind extends ffi.Union { - external wire_cst_LockTime_Blocks Blocks; - - external wire_cst_LockTime_Seconds Seconds; -} - -final class wire_cst_lock_time extends ffi.Struct { - @ffi.Int32() - external int tag; - - external LockTimeKind kind; -} - -final class wire_cst_out_point extends ffi.Struct { - external ffi.Pointer txid; - - @ffi.Uint32() - external int vout; -} - -final class wire_cst_list_list_prim_u_8_strict extends ffi.Struct { - external ffi.Pointer> ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_tx_in extends ffi.Struct { - external wire_cst_out_point previous_output; - - external wire_cst_bdk_script_buf script_sig; - - @ffi.Uint32() - external int sequence; - - external ffi.Pointer witness; -} - -final class wire_cst_list_tx_in extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_tx_out extends ffi.Struct { - @ffi.Uint64() - external int value; - - external wire_cst_bdk_script_buf script_pubkey; -} - -final class wire_cst_list_tx_out extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_bdk_wallet extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_AddressIndex_Peek extends ffi.Struct { - @ffi.Uint32() - external int index; -} - -final class wire_cst_AddressIndex_Reset extends ffi.Struct { - @ffi.Uint32() - external int index; -} - -final class AddressIndexKind extends ffi.Union { - external wire_cst_AddressIndex_Peek Peek; - - external wire_cst_AddressIndex_Reset Reset; -} - -final class wire_cst_address_index extends ffi.Struct { - @ffi.Int32() - external int tag; - - external AddressIndexKind kind; -} - -final class wire_cst_local_utxo extends ffi.Struct { - external wire_cst_out_point outpoint; - - external wire_cst_tx_out txout; - - @ffi.Int32() - external int keychain; - - @ffi.Bool() - external bool is_spent; -} - -final class wire_cst_psbt_sig_hash_type extends ffi.Struct { - @ffi.Uint32() - external int inner; -} - -final class wire_cst_sqlite_db_configuration extends ffi.Struct { - external ffi.Pointer path; -} - -final class wire_cst_DatabaseConfig_Sqlite extends ffi.Struct { - external ffi.Pointer config; -} - -final class wire_cst_sled_db_configuration extends ffi.Struct { - external ffi.Pointer path; - - external ffi.Pointer tree_name; -} - -final class wire_cst_DatabaseConfig_Sled extends ffi.Struct { - external ffi.Pointer config; -} - -final class DatabaseConfigKind extends ffi.Union { - external wire_cst_DatabaseConfig_Sqlite Sqlite; - - external wire_cst_DatabaseConfig_Sled Sled; -} - -final class wire_cst_database_config extends ffi.Struct { - @ffi.Int32() - external int tag; - - external DatabaseConfigKind kind; -} - -final class wire_cst_sign_options extends ffi.Struct { - @ffi.Bool() - external bool trust_witness_utxo; - - external ffi.Pointer assume_height; - - @ffi.Bool() - external bool allow_all_sighashes; - - @ffi.Bool() - external bool remove_partial_sigs; - - @ffi.Bool() - external bool try_finalize; - - @ffi.Bool() - external bool sign_with_tap_internal_key; - - @ffi.Bool() - external bool allow_grinding; -} - -final class wire_cst_script_amount extends ffi.Struct { - external wire_cst_bdk_script_buf script; - - @ffi.Uint64() - external int amount; -} - -final class wire_cst_list_script_amount extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_list_out_point extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_input extends ffi.Struct { - external ffi.Pointer s; -} - -final class wire_cst_record_out_point_input_usize extends ffi.Struct { - external wire_cst_out_point field0; - - external wire_cst_input field1; - - @ffi.UintPtr() - external int field2; -} - -final class wire_cst_RbfValue_Value extends ffi.Struct { - @ffi.Uint32() - external int field0; -} - -final class RbfValueKind extends ffi.Union { - external wire_cst_RbfValue_Value Value; -} - -final class wire_cst_rbf_value extends ffi.Struct { - @ffi.Int32() - external int tag; - - external RbfValueKind kind; -} - -final class wire_cst_list_prim_u_32_strict extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_record_string_list_prim_u_32_strict extends ffi.Struct { - external ffi.Pointer field0; - - external ffi.Pointer field1; -} - -final class wire_cst_list_record_string_list_prim_u_32_strict - extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_AddressError_Base58 extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_AddressError_Bech32 extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_AddressError_InvalidBech32Variant extends ffi.Struct { - @ffi.Int32() - external int expected; - - @ffi.Int32() - external int found; -} - -final class wire_cst_AddressError_InvalidWitnessVersion extends ffi.Struct { - @ffi.Uint8() - external int field0; -} - -final class wire_cst_AddressError_UnparsableWitnessVersion extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_AddressError_InvalidWitnessProgramLength - extends ffi.Struct { - @ffi.UintPtr() - external int field0; -} - -final class wire_cst_AddressError_InvalidSegwitV0ProgramLength - extends ffi.Struct { - @ffi.UintPtr() - external int field0; -} - -final class wire_cst_AddressError_UnknownAddressType extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_AddressError_NetworkValidation extends ffi.Struct { - @ffi.Int32() - external int network_required; - - @ffi.Int32() - external int network_found; - - external ffi.Pointer address; -} - -final class AddressErrorKind extends ffi.Union { - external wire_cst_AddressError_Base58 Base58; - - external wire_cst_AddressError_Bech32 Bech32; - - external wire_cst_AddressError_InvalidBech32Variant InvalidBech32Variant; - - external wire_cst_AddressError_InvalidWitnessVersion InvalidWitnessVersion; - - external wire_cst_AddressError_UnparsableWitnessVersion - UnparsableWitnessVersion; - - external wire_cst_AddressError_InvalidWitnessProgramLength - InvalidWitnessProgramLength; - - external wire_cst_AddressError_InvalidSegwitV0ProgramLength - InvalidSegwitV0ProgramLength; - - external wire_cst_AddressError_UnknownAddressType UnknownAddressType; - - external wire_cst_AddressError_NetworkValidation NetworkValidation; -} - -final class wire_cst_address_error extends ffi.Struct { - @ffi.Int32() - external int tag; - - external AddressErrorKind kind; -} - -final class wire_cst_block_time extends ffi.Struct { - @ffi.Uint32() - external int height; - - @ffi.Uint64() - external int timestamp; -} - -final class wire_cst_condition extends ffi.Struct { - external ffi.Pointer csv; - - external ffi.Pointer timelock; -} - -final class wire_cst_ConsensusError_Io extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_ConsensusError_OversizedVectorAllocation - extends ffi.Struct { - @ffi.UintPtr() - external int requested; - - @ffi.UintPtr() - external int max; -} - -final class wire_cst_ConsensusError_InvalidChecksum extends ffi.Struct { - external ffi.Pointer expected; - - external ffi.Pointer actual; -} - -final class wire_cst_ConsensusError_ParseFailed extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_ConsensusError_UnsupportedSegwitFlag extends ffi.Struct { - @ffi.Uint8() - external int field0; -} - -final class ConsensusErrorKind extends ffi.Union { - external wire_cst_ConsensusError_Io Io; - - external wire_cst_ConsensusError_OversizedVectorAllocation - OversizedVectorAllocation; - - external wire_cst_ConsensusError_InvalidChecksum InvalidChecksum; - - external wire_cst_ConsensusError_ParseFailed ParseFailed; - - external wire_cst_ConsensusError_UnsupportedSegwitFlag UnsupportedSegwitFlag; -} - -final class wire_cst_consensus_error extends ffi.Struct { - @ffi.Int32() - external int tag; - - external ConsensusErrorKind kind; -} - -final class wire_cst_DescriptorError_Key extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_DescriptorError_Policy extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_DescriptorError_InvalidDescriptorCharacter - extends ffi.Struct { - @ffi.Uint8() - external int field0; -} - -final class wire_cst_DescriptorError_Bip32 extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_DescriptorError_Base58 extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_DescriptorError_Pk extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_DescriptorError_Miniscript extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_DescriptorError_Hex extends ffi.Struct { - external ffi.Pointer field0; -} - -final class DescriptorErrorKind extends ffi.Union { - external wire_cst_DescriptorError_Key Key; - - external wire_cst_DescriptorError_Policy Policy; - - external wire_cst_DescriptorError_InvalidDescriptorCharacter - InvalidDescriptorCharacter; - - external wire_cst_DescriptorError_Bip32 Bip32; - - external wire_cst_DescriptorError_Base58 Base58; - - external wire_cst_DescriptorError_Pk Pk; - - external wire_cst_DescriptorError_Miniscript Miniscript; - - external wire_cst_DescriptorError_Hex Hex; -} - -final class wire_cst_descriptor_error extends ffi.Struct { - @ffi.Int32() - external int tag; - - external DescriptorErrorKind kind; -} - -final class wire_cst_fee_rate extends ffi.Struct { - @ffi.Float() - external double sat_per_vb; -} - -final class wire_cst_HexError_InvalidChar extends ffi.Struct { - @ffi.Uint8() - external int field0; -} - -final class wire_cst_HexError_OddLengthString extends ffi.Struct { - @ffi.UintPtr() - external int field0; -} - -final class wire_cst_HexError_InvalidLength extends ffi.Struct { - @ffi.UintPtr() - external int field0; - - @ffi.UintPtr() - external int field1; -} - -final class HexErrorKind extends ffi.Union { - external wire_cst_HexError_InvalidChar InvalidChar; - - external wire_cst_HexError_OddLengthString OddLengthString; - - external wire_cst_HexError_InvalidLength InvalidLength; -} - -final class wire_cst_hex_error extends ffi.Struct { - @ffi.Int32() - external int tag; - - external HexErrorKind kind; -} - -final class wire_cst_PkOrF_Pubkey extends ffi.Struct { - external ffi.Pointer value; -} - -final class wire_cst_PkOrF_XOnlyPubkey extends ffi.Struct { - external ffi.Pointer value; -} - -final class wire_cst_PkOrF_Fingerprint extends ffi.Struct { - external ffi.Pointer value; -} - -final class PkOrFKind extends ffi.Union { - external wire_cst_PkOrF_Pubkey Pubkey; - - external wire_cst_PkOrF_XOnlyPubkey XOnlyPubkey; - - external wire_cst_PkOrF_Fingerprint Fingerprint; -} - -final class wire_cst_pk_or_f extends ffi.Struct { - @ffi.Int32() - external int tag; - - external PkOrFKind kind; -} - -final class wire_cst_list_bdk_policy extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_list_condition extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_list_local_utxo extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_list_pk_or_f extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_list_prim_u_64_strict extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_record_list_prim_u_32_strict_list_condition - extends ffi.Struct { - external ffi.Pointer field0; - - external ffi.Pointer field1; -} - -final class wire_cst_list_record_list_prim_u_32_strict_list_condition - extends ffi.Struct { - external ffi.Pointer - ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_record_u_32_list_condition extends ffi.Struct { - @ffi.Uint32() - external int field0; - - external ffi.Pointer field1; -} - -final class wire_cst_list_record_u_32_list_condition extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_transaction_details extends ffi.Struct { - external ffi.Pointer transaction; - - external ffi.Pointer txid; - - @ffi.Uint64() - external int received; - - @ffi.Uint64() - external int sent; - - external ffi.Pointer fee; - - external ffi.Pointer confirmation_time; -} - -final class wire_cst_list_transaction_details extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_balance extends ffi.Struct { - @ffi.Uint64() - external int immature; - - @ffi.Uint64() - external int trusted_pending; - - @ffi.Uint64() - external int untrusted_pending; - - @ffi.Uint64() - external int confirmed; - - @ffi.Uint64() - external int spendable; - - @ffi.Uint64() - external int total; -} - -final class wire_cst_BdkError_Hex extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Consensus extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_VerifyTransaction extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Address extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Descriptor extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_InvalidU32Bytes extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Generic extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_OutputBelowDustLimit extends ffi.Struct { - @ffi.UintPtr() - external int field0; -} - -final class wire_cst_BdkError_InsufficientFunds extends ffi.Struct { - @ffi.Uint64() - external int needed; - - @ffi.Uint64() - external int available; -} - -final class wire_cst_BdkError_FeeRateTooLow extends ffi.Struct { - @ffi.Float() - external double needed; -} - -final class wire_cst_BdkError_FeeTooLow extends ffi.Struct { - @ffi.Uint64() - external int needed; -} - -final class wire_cst_BdkError_MissingKeyOrigin extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Key extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_SpendingPolicyRequired extends ffi.Struct { - @ffi.Int32() - external int field0; -} - -final class wire_cst_BdkError_InvalidPolicyPathError extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Signer extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_InvalidNetwork extends ffi.Struct { - @ffi.Int32() - external int requested; - - @ffi.Int32() - external int found; -} - -final class wire_cst_BdkError_InvalidOutpoint extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Encode extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Miniscript extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_MiniscriptPsbt extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Bip32 extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Bip39 extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Secp256k1 extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Json extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Psbt extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_PsbtParse extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_MissingCachedScripts extends ffi.Struct { - @ffi.UintPtr() - external int field0; - - @ffi.UintPtr() - external int field1; -} - -final class wire_cst_BdkError_Electrum extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Esplora extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Sled extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Rpc extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_Rusqlite extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_InvalidInput extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_InvalidLockTime extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_BdkError_InvalidTransaction extends ffi.Struct { - external ffi.Pointer field0; -} - -final class BdkErrorKind extends ffi.Union { - external wire_cst_BdkError_Hex Hex; - - external wire_cst_BdkError_Consensus Consensus; - - external wire_cst_BdkError_VerifyTransaction VerifyTransaction; - - external wire_cst_BdkError_Address Address; - - external wire_cst_BdkError_Descriptor Descriptor; - - external wire_cst_BdkError_InvalidU32Bytes InvalidU32Bytes; - - external wire_cst_BdkError_Generic Generic; - - external wire_cst_BdkError_OutputBelowDustLimit OutputBelowDustLimit; - - external wire_cst_BdkError_InsufficientFunds InsufficientFunds; - - external wire_cst_BdkError_FeeRateTooLow FeeRateTooLow; - - external wire_cst_BdkError_FeeTooLow FeeTooLow; - - external wire_cst_BdkError_MissingKeyOrigin MissingKeyOrigin; - - external wire_cst_BdkError_Key Key; - - external wire_cst_BdkError_SpendingPolicyRequired SpendingPolicyRequired; - - external wire_cst_BdkError_InvalidPolicyPathError InvalidPolicyPathError; - - external wire_cst_BdkError_Signer Signer; - - external wire_cst_BdkError_InvalidNetwork InvalidNetwork; - - external wire_cst_BdkError_InvalidOutpoint InvalidOutpoint; - - external wire_cst_BdkError_Encode Encode; - - external wire_cst_BdkError_Miniscript Miniscript; - - external wire_cst_BdkError_MiniscriptPsbt MiniscriptPsbt; - - external wire_cst_BdkError_Bip32 Bip32; - - external wire_cst_BdkError_Bip39 Bip39; - - external wire_cst_BdkError_Secp256k1 Secp256k1; - - external wire_cst_BdkError_Json Json; - - external wire_cst_BdkError_Psbt Psbt; - - external wire_cst_BdkError_PsbtParse PsbtParse; - - external wire_cst_BdkError_MissingCachedScripts MissingCachedScripts; - - external wire_cst_BdkError_Electrum Electrum; - - external wire_cst_BdkError_Esplora Esplora; - - external wire_cst_BdkError_Sled Sled; - - external wire_cst_BdkError_Rpc Rpc; - - external wire_cst_BdkError_Rusqlite Rusqlite; - - external wire_cst_BdkError_InvalidInput InvalidInput; - - external wire_cst_BdkError_InvalidLockTime InvalidLockTime; - - external wire_cst_BdkError_InvalidTransaction InvalidTransaction; -} - -final class wire_cst_bdk_error extends ffi.Struct { - @ffi.Int32() - external int tag; - - external BdkErrorKind kind; -} - -final class wire_cst_Payload_PubkeyHash extends ffi.Struct { - external ffi.Pointer pubkey_hash; -} - -final class wire_cst_Payload_ScriptHash extends ffi.Struct { - external ffi.Pointer script_hash; -} - -final class wire_cst_Payload_WitnessProgram extends ffi.Struct { - @ffi.Int32() - external int version; - - external ffi.Pointer program; -} - -final class PayloadKind extends ffi.Union { - external wire_cst_Payload_PubkeyHash PubkeyHash; - - external wire_cst_Payload_ScriptHash ScriptHash; - - external wire_cst_Payload_WitnessProgram WitnessProgram; -} - -final class wire_cst_payload extends ffi.Struct { - @ffi.Int32() - external int tag; - - external PayloadKind kind; -} - -final class wire_cst_record_bdk_address_u_32 extends ffi.Struct { - external wire_cst_bdk_address field0; - - @ffi.Uint32() - external int field1; -} - -final class wire_cst_record_bdk_psbt_transaction_details extends ffi.Struct { - external wire_cst_bdk_psbt field0; - - external wire_cst_transaction_details field1; -} - -final class wire_cst_Satisfaction_Partial extends ffi.Struct { - @ffi.Uint64() - external int n; - - @ffi.Uint64() - external int m; - - external ffi.Pointer items; - - external ffi.Pointer sorted; - - external ffi.Pointer conditions; -} - -final class wire_cst_Satisfaction_PartialComplete extends ffi.Struct { - @ffi.Uint64() - external int n; - - @ffi.Uint64() - external int m; - - external ffi.Pointer items; - - external ffi.Pointer sorted; - - external ffi - .Pointer - conditions; -} - -final class wire_cst_Satisfaction_Complete extends ffi.Struct { - external ffi.Pointer condition; -} - -final class wire_cst_Satisfaction_None extends ffi.Struct { - external ffi.Pointer msg; -} - -final class SatisfactionKind extends ffi.Union { - external wire_cst_Satisfaction_Partial Partial; - - external wire_cst_Satisfaction_PartialComplete PartialComplete; - - external wire_cst_Satisfaction_Complete Complete; - - external wire_cst_Satisfaction_None None; -} - -final class wire_cst_satisfaction extends ffi.Struct { - @ffi.Int32() - external int tag; - - external SatisfactionKind kind; -} - -final class wire_cst_SatisfiableItem_EcdsaSignature extends ffi.Struct { - external ffi.Pointer key; -} - -final class wire_cst_SatisfiableItem_SchnorrSignature extends ffi.Struct { - external ffi.Pointer key; -} - -final class wire_cst_SatisfiableItem_Sha256Preimage extends ffi.Struct { - external ffi.Pointer hash; -} - -final class wire_cst_SatisfiableItem_Hash256Preimage extends ffi.Struct { - external ffi.Pointer hash; -} - -final class wire_cst_SatisfiableItem_Ripemd160Preimage extends ffi.Struct { - external ffi.Pointer hash; -} - -final class wire_cst_SatisfiableItem_Hash160Preimage extends ffi.Struct { - external ffi.Pointer hash; -} - -final class wire_cst_SatisfiableItem_AbsoluteTimelock extends ffi.Struct { - external ffi.Pointer value; -} - -final class wire_cst_SatisfiableItem_RelativeTimelock extends ffi.Struct { - @ffi.Uint32() - external int value; -} - -final class wire_cst_SatisfiableItem_Multisig extends ffi.Struct { - external ffi.Pointer keys; - - @ffi.Uint64() - external int threshold; -} - -final class wire_cst_SatisfiableItem_Thresh extends ffi.Struct { - external ffi.Pointer items; - - @ffi.Uint64() - external int threshold; -} - -final class SatisfiableItemKind extends ffi.Union { - external wire_cst_SatisfiableItem_EcdsaSignature EcdsaSignature; - - external wire_cst_SatisfiableItem_SchnorrSignature SchnorrSignature; - - external wire_cst_SatisfiableItem_Sha256Preimage Sha256Preimage; - - external wire_cst_SatisfiableItem_Hash256Preimage Hash256Preimage; - - external wire_cst_SatisfiableItem_Ripemd160Preimage Ripemd160Preimage; - - external wire_cst_SatisfiableItem_Hash160Preimage Hash160Preimage; - - external wire_cst_SatisfiableItem_AbsoluteTimelock AbsoluteTimelock; - - external wire_cst_SatisfiableItem_RelativeTimelock RelativeTimelock; - - external wire_cst_SatisfiableItem_Multisig Multisig; - - external wire_cst_SatisfiableItem_Thresh Thresh; -} - -final class wire_cst_satisfiable_item extends ffi.Struct { - @ffi.Int32() - external int tag; - - external SatisfiableItemKind kind; -} diff --git a/lib/src/generated/lib.dart b/lib/src/generated/lib.dart deleted file mode 100644 index 5e7aab92..00000000 --- a/lib/src/generated/lib.dart +++ /dev/null @@ -1,55 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import 'frb_generated.dart'; -import 'package:collection/collection.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; - -// Rust type: RustOpaqueNom -abstract class Address implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom -abstract class DerivationPath implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom -abstract class AnyBlockchain implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom -abstract class ExtendedDescriptor implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom -abstract class Policy implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom -abstract class DescriptorPublicKey implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom -abstract class DescriptorSecretKey implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom -abstract class KeyMap implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom -abstract class Mnemonic implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom >> -abstract class MutexWalletAnyDatabase implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom> -abstract class MutexPartiallySignedTransaction implements RustOpaqueInterface {} - -class U8Array4 extends NonGrowableListView { - static const arraySize = 4; - - @internal - Uint8List get inner => _inner; - final Uint8List _inner; - - U8Array4(this._inner) - : assert(_inner.length == arraySize), - super(_inner); - - U8Array4.init() : this(Uint8List(arraySize)); -} diff --git a/lib/src/root.dart b/lib/src/root.dart deleted file mode 100644 index fe73e4f0..00000000 --- a/lib/src/root.dart +++ /dev/null @@ -1,1369 +0,0 @@ -import 'dart:typed_data'; -import 'package:bdk_flutter/src/utils/utils.dart'; - -import 'generated/api/blockchain.dart'; -import 'generated/api/descriptor.dart'; -import 'generated/api/error.dart'; -import 'generated/api/key.dart'; -import 'generated/api/psbt.dart'; -import 'generated/api/types.dart' as types; -import 'generated/api/wallet.dart'; - -///A Bitcoin address. -class Address extends types.BdkAddress { - Address._({required super.ptr}); - - /// [Address] constructor - static Future
fromScript( - {required ScriptBuf script, required types.Network network}) async { - try { - await Api.initialize(); - final res = - await types.BdkAddress.fromScript(script: script, network: network); - return Address._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// [Address] constructor - static Future
fromString( - {required String s, required types.Network network}) async { - try { - await Api.initialize(); - final res = - await types.BdkAddress.fromString(address: s, network: network); - return Address._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Generates a script pubkey spending to this address - ScriptBuf scriptPubkey() { - try { - return ScriptBuf(bytes: types.BdkAddress.script(ptr: this).bytes); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - //Creates a URI string bitcoin:address optimized to be encoded in QR codes. - /// If the address is bech32, both the schema and the address become uppercase. If the address is base58, the schema is lowercase and the address is left mixed case. - /// Quoting BIP 173 "inside QR codes uppercase SHOULD be used, as those permit the use of alphanumeric mode, which is 45% more compact than the normal byte mode." - /// Note however that despite BIP21 explicitly stating that the bitcoin: prefix should be parsed as case-insensitive many wallets got this wrong and don't parse correctly. See compatibility table. - /// If you want to avoid allocation you can use alternate display instead: - @override - String toQrUri() { - try { - return super.toQrUri(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Parsed addresses do not always have one network. The problem is that legacy testnet, regtest and signet addresses use the same prefix instead of multiple different ones. - ///When parsing, such addresses are always assumed to be testnet addresses (the same is true for bech32 signet addresses). - ///So if one wants to check if an address belongs to a certain network a simple comparison is not enough anymore. Instead this function can be used. - @override - bool isValidForNetwork({required types.Network network}) { - try { - return super.isValidForNetwork(network: network); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The network on which this address is usable. - @override - types.Network network() { - try { - return super.network(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The type of the address. - @override - types.Payload payload() { - try { - return super.payload(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - @override - String toString() { - return super.asString(); - } -} - -/// Blockchain backends module provides the implementation of a few commonly-used backends like Electrum, and Esplora. -class Blockchain extends BdkBlockchain { - Blockchain._({required super.ptr}); - - /// [Blockchain] constructor - - static Future create({required BlockchainConfig config}) async { - try { - await Api.initialize(); - final res = await BdkBlockchain.create(blockchainConfig: config); - return Blockchain._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// [Blockchain] constructor for creating `Esplora` blockchain in `Mutinynet` - /// Esplora url: https://mutinynet.com/api/ - static Future createMutinynet({ - int stopGap = 20, - }) async { - final config = BlockchainConfig.esplora( - config: EsploraConfig( - baseUrl: 'https://mutinynet.com/api/', - stopGap: BigInt.from(stopGap), - ), - ); - return create(config: config); - } - - /// [Blockchain] constructor for creating `Esplora` blockchain in `Testnet` - /// Esplora url: https://testnet.ltbl.io/api - static Future createTestnet({ - int stopGap = 20, - }) async { - final config = BlockchainConfig.esplora( - config: EsploraConfig( - baseUrl: 'https://testnet.ltbl.io/api', - stopGap: BigInt.from(stopGap), - ), - ); - return create(config: config); - } - - ///Estimate the fee rate required to confirm a transaction in a given target of blocks - @override - Future estimateFee({required BigInt target, hint}) async { - try { - return super.estimateFee(target: target); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The function for broadcasting a transaction - Future broadcast({required Transaction transaction, hint}) async { - try { - return BdkBlockchain.broadcast(ptr: this, transaction: transaction); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The function for getting block hash by block height - @override - Future getBlockHash({required int height, hint}) async { - try { - return super.getBlockHash(height: height); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The function for getting the current height of the blockchain. - @override - Future getHeight({hint}) { - try { - return super.getHeight(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } -} - -/// The BumpFeeTxBuilder is used to bump the fee on a transaction that has been broadcast and has its RBF flag set to true. -class BumpFeeTxBuilder { - int? _nSequence; - Address? _allowShrinking; - bool _enableRbf = false; - final String txid; - final double feeRate; - - BumpFeeTxBuilder({required this.txid, required this.feeRate}); - - ///Explicitly tells the wallet that it is allowed to reduce the amount of the output matching this `address` in order to bump the transaction fee. Without specifying this the wallet will attempt to find a change output to shrink instead. - /// - /// Note that the output may shrink to below the dust limit and therefore be removed. If it is preserved then it is currently not guaranteed to be in the same position as it was originally. - /// - /// Throws and exception if address can’t be found among the recipients of the transaction we are bumping. - BumpFeeTxBuilder allowShrinking(Address address) { - _allowShrinking = address; - return this; - } - - ///Enable signaling RBF - /// - /// This will use the default nSequence value of `0xFFFFFFFD` - BumpFeeTxBuilder enableRbf() { - _enableRbf = true; - return this; - } - - ///Enable signaling RBF with a specific nSequence value - /// - /// This can cause conflicts if the wallet’s descriptors contain an “older†(OP_CSV) operator and the given nsequence is lower than the CSV value. - /// - /// If the nsequence is higher than `0xFFFFFFFD` an error will be thrown, since it would not be a valid nSequence to signal RBF. - - BumpFeeTxBuilder enableRbfWithSequence(int nSequence) { - _nSequence = nSequence; - return this; - } - - /// Finish building the transaction. Returns the [PartiallySignedTransaction]& [TransactionDetails]. - Future<(PartiallySignedTransaction, TransactionDetails)> finish( - Wallet wallet) async { - try { - final res = await finishBumpFeeTxBuilder( - txid: txid.toString(), - enableRbf: _enableRbf, - feeRate: feeRate, - wallet: wallet, - nSequence: _nSequence, - allowShrinking: _allowShrinking); - return ( - PartiallySignedTransaction._(ptr: res.$1.ptr), - TransactionDetails( - transaction: (res.$2.transaction?.s == null) - ? null - : Transaction._(s: res.$2.transaction!.s), - txid: res.$2.txid, - received: res.$2.received, - sent: res.$2.sent, - confirmationTime: res.$2.confirmationTime) - ); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } -} - -///A `BIP-32` derivation path -class DerivationPath extends BdkDerivationPath { - DerivationPath._({required super.ptr}); - - /// [DerivationPath] constructor - static Future create({required String path}) async { - try { - await Api.initialize(); - final res = await BdkDerivationPath.fromString(path: path); - return DerivationPath._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - @override - String toString() { - return super.asString(); - } -} - -///Script descriptor -class Descriptor extends BdkDescriptor { - Descriptor._({required super.extendedDescriptor, required super.keyMap}); - - /// [Descriptor] constructor - static Future create( - {required String descriptor, required types.Network network}) async { - try { - await Api.initialize(); - final res = await BdkDescriptor.newInstance( - descriptor: descriptor, network: network); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///BIP44 template. Expands to pkh(key/44'/{0,1}'/0'/{0,1}/*) - /// - /// Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). - static Future newBip44( - {required DescriptorSecretKey secretKey, - required types.Network network, - required types.KeychainKind keychain}) async { - try { - await Api.initialize(); - final res = await BdkDescriptor.newBip44( - secretKey: secretKey, network: network, keychainKind: keychain); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///BIP44 public template. Expands to pkh(key/{0,1}/*) - /// - /// This assumes that the key used has already been derived with m/44'/0'/0' for Mainnet or m/44'/1'/0' for Testnet. - /// - /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs. - static Future newBip44Public( - {required DescriptorPublicKey publicKey, - required String fingerPrint, - required types.Network network, - required types.KeychainKind keychain}) async { - try { - await Api.initialize(); - final res = await BdkDescriptor.newBip44Public( - network: network, - keychainKind: keychain, - publicKey: publicKey, - fingerprint: fingerPrint); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///BIP49 template. Expands to sh(wpkh(key/49'/{0,1}'/0'/{0,1}/*)) - /// - ///Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). - static Future newBip49( - {required DescriptorSecretKey secretKey, - required types.Network network, - required types.KeychainKind keychain}) async { - try { - await Api.initialize(); - final res = await BdkDescriptor.newBip49( - secretKey: secretKey, network: network, keychainKind: keychain); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///BIP49 public template. Expands to sh(wpkh(key/{0,1}/*)) - /// - /// This assumes that the key used has already been derived with m/49'/0'/0'. - /// - /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs. - static Future newBip49Public( - {required DescriptorPublicKey publicKey, - required String fingerPrint, - required types.Network network, - required types.KeychainKind keychain}) async { - try { - await Api.initialize(); - final res = await BdkDescriptor.newBip49Public( - network: network, - keychainKind: keychain, - publicKey: publicKey, - fingerprint: fingerPrint); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///BIP84 template. Expands to wpkh(key/84'/{0,1}'/0'/{0,1}/*) - /// - ///Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). - static Future newBip84( - {required DescriptorSecretKey secretKey, - required types.Network network, - required types.KeychainKind keychain}) async { - try { - await Api.initialize(); - final res = await BdkDescriptor.newBip84( - secretKey: secretKey, network: network, keychainKind: keychain); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///BIP84 public template. Expands to wpkh(key/{0,1}/*) - /// - /// This assumes that the key used has already been derived with m/84'/0'/0'. - /// - /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs. - static Future newBip84Public( - {required DescriptorPublicKey publicKey, - required String fingerPrint, - required types.Network network, - required types.KeychainKind keychain}) async { - try { - await Api.initialize(); - final res = await BdkDescriptor.newBip84Public( - network: network, - keychainKind: keychain, - publicKey: publicKey, - fingerprint: fingerPrint); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///BIP86 template. Expands to tr(key/86'/{0,1}'/0'/{0,1}/*) - /// - /// Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). - static Future newBip86( - {required DescriptorSecretKey secretKey, - required types.Network network, - required types.KeychainKind keychain}) async { - try { - await Api.initialize(); - final res = await BdkDescriptor.newBip86( - secretKey: secretKey, network: network, keychainKind: keychain); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///BIP86 public template. Expands to tr(key/{0,1}/*) - /// - /// This assumes that the key used has already been derived with m/86'/0'/0' for Mainnet or m/86'/1'/0' for Testnet. - /// - /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs. - static Future newBip86Public( - {required DescriptorPublicKey publicKey, - required String fingerPrint, - required types.Network network, - required types.KeychainKind keychain}) async { - try { - await Api.initialize(); - final res = await BdkDescriptor.newBip86Public( - network: network, - keychainKind: keychain, - publicKey: publicKey, - fingerprint: fingerPrint); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Return the public version of the output descriptor. - @override - String toString() { - return super.asString(); - } - - ///Return the private version of the output descriptor if available, otherwise return the public version. - @override - String toStringPrivate({hint}) { - try { - return super.toStringPrivate(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Computes an upper bound on the difference between a non-satisfied TxIn's segwit_weight and a satisfied TxIn's segwit_weight - @override - BigInt maxSatisfactionWeight({hint}) { - try { - return super.maxSatisfactionWeight(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } -} - -///An extended public key. -class DescriptorPublicKey extends BdkDescriptorPublicKey { - DescriptorPublicKey._({required super.ptr}); - - /// [DescriptorPublicKey] constructor - static Future fromString(String publicKey) async { - try { - await Api.initialize(); - final res = await BdkDescriptorPublicKey.fromString(publicKey: publicKey); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Get the public key as string. - @override - String toString() { - return super.asString(); - } - - ///Derive a public descriptor at a given path. - Future derive( - {required DerivationPath path, hint}) async { - try { - final res = await BdkDescriptorPublicKey.derive(ptr: this, path: path); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Extend the public descriptor with a custom path. - Future extend( - {required DerivationPath path, hint}) async { - try { - final res = await BdkDescriptorPublicKey.extend(ptr: this, path: path); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } -} - -///Script descriptor -class DescriptorSecretKey extends BdkDescriptorSecretKey { - DescriptorSecretKey._({required super.ptr}); - - /// [DescriptorSecretKey] constructor - static Future fromString(String secretKey) async { - try { - await Api.initialize(); - final res = await BdkDescriptorSecretKey.fromString(secretKey: secretKey); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// [DescriptorSecretKey] constructor - static Future create( - {required types.Network network, - required Mnemonic mnemonic, - String? password}) async { - try { - await Api.initialize(); - final res = await BdkDescriptorSecretKey.create( - network: network, mnemonic: mnemonic, password: password); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Derived the XPrv using the derivation path - Future derive(DerivationPath path) async { - try { - final res = await BdkDescriptorSecretKey.derive(ptr: this, path: path); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Extends the XPrv using the derivation path - Future extend(DerivationPath path) async { - try { - final res = await BdkDescriptorSecretKey.extend(ptr: this, path: path); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Returns the public version of this key. - DescriptorPublicKey toPublic() { - try { - final res = BdkDescriptorSecretKey.asPublic(ptr: this); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Get the private key as string. - @override - String toString() { - return super.asString(); - } - - ///Get the private key as bytes. - @override - Uint8List secretBytes({hint}) { - try { - return super.secretBytes(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } -} - -///Mnemonic phrases are a human-readable version of the private keys. Supported number of words are 12, 18, and 24. -class Mnemonic extends BdkMnemonic { - Mnemonic._({required super.ptr}); - - /// Generates [Mnemonic] with given [WordCount] - /// - /// [Mnemonic] constructor - static Future create(types.WordCount wordCount) async { - try { - await Api.initialize(); - final res = await BdkMnemonic.newInstance(wordCount: wordCount); - return Mnemonic._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Create a new [Mnemonic] in the specified language from the given entropy. - /// Entropy must be a multiple of 32 bits (4 bytes) and 128-256 bits in length. - /// - /// [Mnemonic] constructor - static Future fromEntropy(List entropy) async { - try { - await Api.initialize(); - final res = await BdkMnemonic.fromEntropy(entropy: entropy); - return Mnemonic._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Parse a [Mnemonic] with given string - /// - /// [Mnemonic] constructor - static Future fromString(String mnemonic) async { - try { - await Api.initialize(); - final res = await BdkMnemonic.fromString(mnemonic: mnemonic); - return Mnemonic._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Returns Mnemonic as string - @override - String toString() { - return super.asString(); - } -} - -///A Partially Signed Transaction -class PartiallySignedTransaction extends BdkPsbt { - PartiallySignedTransaction._({required super.ptr}); - - /// Parse a [PartiallySignedTransaction] with given Base64 string - /// - /// [PartiallySignedTransaction] constructor - static Future fromString( - String psbtBase64) async { - try { - await Api.initialize(); - final res = await BdkPsbt.fromStr(psbtBase64: psbtBase64); - return PartiallySignedTransaction._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Return fee amount - @override - BigInt? feeAmount({hint}) { - try { - return super.feeAmount(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Return fee rate - @override - types.FeeRate? feeRate({hint}) { - try { - return super.feeRate(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - @override - String jsonSerialize({hint}) { - try { - return super.jsonSerialize(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - @override - String toString() { - return super.asString(); - } - - ///Serialize as raw binary data - @override - Uint8List serialize({hint}) { - try { - return super.serialize(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Return the transaction as bytes. - Transaction extractTx() { - try { - final res = BdkPsbt.extractTx(ptr: this); - return Transaction._(s: res.s); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Combines this [PartiallySignedTransaction] with other PSBT as described by BIP 174. - Future combine( - PartiallySignedTransaction other) async { - try { - final res = await BdkPsbt.combine(ptr: this, other: other); - return PartiallySignedTransaction._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Returns the [PartiallySignedTransaction]'s transaction id - @override - String txid({hint}) { - try { - return super.txid(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } -} - -class Policy extends types.BdkPolicy { - Policy._({required super.ptr}); - - ///Identifier for this policy node - @override - String id() { - return super.id(); - } - - @override - String toString() { - try { - return super.asString(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Return whether or not a specific path in the policy tree is required to unambiguously create a transaction - - ///What this means is that for some spending policies the user should select which paths in the tree it intends to satisfy while signing, because the transaction must be created differently based on that. - @override - bool requiresPath() { - return super.requiresPath(); - } - - ///Type of this policy node - @override - types.SatisfiableItem item() { - return super.item().when( - ecdsaSignature: (e) => types.SatisfiableItem.ecdsaSignature(key: e), - schnorrSignature: (e) => types.SatisfiableItem.ecdsaSignature(key: e), - sha256Preimage: (e) => types.SatisfiableItem.sha256Preimage(hash: e), - hash256Preimage: (e) => - types.SatisfiableItem.hash256Preimage(hash: e), - ripemd160Preimage: (e) => - types.SatisfiableItem.ripemd160Preimage(hash: e), - hash160Preimage: (e) => - types.SatisfiableItem.hash160Preimage(hash: e), - absoluteTimelock: (e) => - types.SatisfiableItem.absoluteTimelock(value: e), - relativeTimelock: (e) => - types.SatisfiableItem.relativeTimelock(value: e), - multisig: (e, f) => - types.SatisfiableItem.multisig(keys: e, threshold: f), - thresh: (e, f) => types.SatisfiableItem.thresh( - items: e.map((e) => Policy._(ptr: e.ptr)).toList(), threshold: f), - ); - } - - ///How much a given PSBT already satisfies this policy node in terms of signatures - @override - types.Satisfaction satisfaction() { - return super.satisfaction(); - } - - ///How the wallet's descriptor can satisfy this policy node - @override - types.Satisfaction contribution() { - return super.contribution(); - } -} - -///Bitcoin script. -class ScriptBuf extends types.BdkScriptBuf { - /// [ScriptBuf] constructor - ScriptBuf({required super.bytes}); - - ///Creates a new empty script. - static Future empty() async { - try { - await Api.initialize(); - return ScriptBuf(bytes: types.BdkScriptBuf.empty().bytes); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Creates a new empty script with pre-allocated capacity. - static Future withCapacity(BigInt capacity) async { - try { - await Api.initialize(); - final res = await types.BdkScriptBuf.withCapacity(capacity: capacity); - return ScriptBuf(bytes: res.bytes); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Creates a ScriptBuf from a hex string. - static Future fromHex(String s) async { - try { - await Api.initialize(); - final res = await types.BdkScriptBuf.fromHex(s: s); - return ScriptBuf(bytes: res.bytes); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - @override - String toString() { - return super.asString(); - } -} - -///A bitcoin transaction. -class Transaction extends types.BdkTransaction { - Transaction._({required super.s}); - - /// [Transaction] constructor - /// Decode an object with a well-defined format. - // This is the method that should be implemented for a typical, fixed sized type implementing this trait. - static Future fromBytes({ - required List transactionBytes, - }) async { - try { - await Api.initialize(); - final res = await types.BdkTransaction.fromBytes( - transactionBytes: transactionBytes); - return Transaction._(s: res.s); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - @override - String toString() { - return s; - } -} - -///A transaction builder -/// -/// A TxBuilder is created by calling TxBuilder or BumpFeeTxBuilder on a wallet. -/// After assigning it, you set options on it until finally calling finish to consume the builder and generate the transaction. -class TxBuilder { - final List _recipients = []; - final List _utxos = []; - final List _unSpendable = []; - (types.OutPoint, types.Input, BigInt)? _foreignUtxo; - bool _manuallySelectedOnly = false; - double? _feeRate; - types.ChangeSpendPolicy _changeSpendPolicy = - types.ChangeSpendPolicy.changeAllowed; - BigInt? _feeAbsolute; - bool _drainWallet = false; - ScriptBuf? _drainTo; - types.RbfValue? _rbfValue; - List _data = []; - Map? _internalPolicyPath; - Map? _externalPolicyPath; - - ///Add data as an output, using OP_RETURN - TxBuilder addData({required List data}) { - _data = data; - return this; - } - - ///Add a recipient to the internal list - TxBuilder addRecipient(ScriptBuf script, BigInt amount) { - _recipients.add(types.ScriptAmount(script: script, amount: amount)); - return this; - } - - ///Add a utxo to the internal list of unspendable utxos - /// - /// It's important to note that the "must-be-spent" utxos added with TxBuilder().addUtxo have priority over this. - /// See the docs of the two linked methods for more details. - TxBuilder unSpendable(List outpoints) { - for (var e in outpoints) { - _unSpendable.add(e); - } - return this; - } - - ///Add a utxo to the internal list of utxos that must be spent - /// - /// These have priority over the "unspendable" utxos, meaning that if a utxo is present both in the "utxos" and the "unspendable" list, it will be spent. - TxBuilder addUtxo(types.OutPoint outpoint) { - _utxos.add(outpoint); - return this; - } - - ///Add the list of outpoints to the internal list of UTXOs that must be spent. - /// - ///If an error occurs while adding any of the UTXOs then none of them are added and the error is returned. - /// - /// These have priority over the "unspendable" utxos, meaning that if a utxo is present both in the "utxos" and the "unspendable" list, it will be spent. - TxBuilder addUtxos(List outpoints) { - for (var e in outpoints) { - _utxos.add(e); - } - return this; - } - - ///Add a foreign UTXO i.e. a UTXO not owned by this wallet. - ///At a minimum to add a foreign UTXO we need: - /// - /// outpoint: To add it to the raw transaction. - /// psbt_input: To know the value. - /// satisfaction_weight: To know how much weight/vbytes the input will add to the transaction for fee calculation. - /// There are several security concerns about adding foreign UTXOs that application developers should consider. First, how do you know the value of the input is correct? If a non_witness_utxo is provided in the psbt_input then this method implicitly verifies the value by checking it against the transaction. If only a witness_utxo is provided then this method doesn't verify the value but just takes it as a given – it is up to you to check that whoever sent you the input_psbt was not lying! - /// - /// Secondly, you must somehow provide satisfaction_weight of the input. Depending on your application it may be important that this be known precisely.If not, - /// a malicious counterparty may fool you into putting in a value that is too low, giving the transaction a lower than expected feerate. They could also fool - /// you into putting a value that is too high causing you to pay a fee that is too high. The party who is broadcasting the transaction can of course check the - /// real input weight matches the expected weight prior to broadcasting. - TxBuilder addForeignUtxo(types.Input psbtInput, types.OutPoint outPoint, - BigInt satisfactionWeight) { - _foreignUtxo = (outPoint, psbtInput, satisfactionWeight); - return this; - } - - ///Do not spend change outputs - /// - /// This effectively adds all the change outputs to the "unspendable" list. See TxBuilder().addUtxos - TxBuilder doNotSpendChange() { - _changeSpendPolicy = types.ChangeSpendPolicy.changeForbidden; - return this; - } - - ///Spend all the available inputs. This respects filters like TxBuilder().unSpendable and the change policy. - TxBuilder drainWallet() { - _drainWallet = true; - return this; - } - - ///Sets the address to drain excess coins to. - /// - /// Usually, when there are excess coins they are sent to a change address generated by the wallet. - /// This option replaces the usual change address with an arbitrary scriptPubkey of your choosing. - /// Just as with a change output, if the drain output is not needed (the excess coins are too small) it will not be included in the resulting transaction. T - /// he only difference is that it is valid to use drainTo without setting any ordinary recipients with add_recipient (but it is perfectly fine to add recipients as well). - /// - /// If you choose not to set any recipients, you should either provide the utxos that the transaction should spend via add_utxos, or set drainWallet to spend all of them. - /// - /// When bumping the fees of a transaction made with this option, you probably want to use allowShrinking to allow this output to be reduced to pay for the extra fees. - TxBuilder drainTo(ScriptBuf script) { - _drainTo = script; - return this; - } - - ///Enable signaling RBF with a specific nSequence value - /// - /// This can cause conflicts if the wallet's descriptors contain an "older" (OP_CSV) operator and the given nsequence is lower than the CSV value. - /// - ///If the nsequence is higher than 0xFFFFFFFD an error will be thrown, since it would not be a valid nSequence to signal RBF. - TxBuilder enableRbfWithSequence(int nSequence) { - _rbfValue = types.RbfValue.value(nSequence); - return this; - } - - ///Enable signaling RBF - /// - /// This will use the default nSequence value of 0xFFFFFFFD. - TxBuilder enableRbf() { - _rbfValue = types.RbfValue.rbfDefault(); - return this; - } - - ///Set an absolute fee - TxBuilder feeAbsolute(BigInt feeAmount) { - _feeAbsolute = feeAmount; - return this; - } - - ///Set a custom fee rate - TxBuilder feeRate(double satPerVbyte) { - _feeRate = satPerVbyte; - return this; - } - - ///Replace the recipients already added with a new list - TxBuilder setRecipients(List<(ScriptBuf script, BigInt amount)> recipients) { - for (var (s, a) in recipients) { - _recipients.add(types.ScriptAmount(amount: a, script: s)); - } - return this; - } - - ///Only spend utxos added by add_utxo. - /// - /// The wallet will not add additional utxos to the transaction even if they are needed to make the transaction valid. - TxBuilder manuallySelectedOnly() { - _manuallySelectedOnly = true; - return this; - } - - ///Add a utxo to the internal list of unspendable utxos - /// - /// It's important to note that the "must-be-spent" utxos added with TxBuilder().addUtxo - /// have priority over this. See the docs of the two linked methods for more details. - TxBuilder addUnSpendable(types.OutPoint unSpendable) { - _unSpendable.add(unSpendable); - return this; - } - - ///Set the policy path to use while creating the transaction for a given keychain. - ///This method accepts a map where the key is the policy node id (see policy.id()) and the value is the list of the indexes of the items that are intended to be satisfied from the policy node (see SatisfiableItem.Thresh.items). - TxBuilder policyPath( - types.KeychainKind keychain, Map path) { - switch (keychain) { - case types.KeychainKind.externalChain: - _externalPolicyPath = path; - break; - case types.KeychainKind.internalChain: - _internalPolicyPath = path; - break; - } - return this; - } - - ///Only spend change outputs - /// - /// This effectively adds all the non-change outputs to the "unspendable" list. - TxBuilder onlySpendChange() { - _changeSpendPolicy = types.ChangeSpendPolicy.onlyChange; - return this; - } - - ///Finish building the transaction. - /// - /// Returns a [PartiallySignedTransaction] & [TransactionDetails] - - Future<(PartiallySignedTransaction, TransactionDetails)> finish( - Wallet wallet) async { - if (_recipients.isEmpty && _drainTo == null) { - throw NoRecipientsException(); - } - try { - final res = await txBuilderFinish( - wallet: wallet, - recipients: _recipients, - utxos: _utxos, - foreignUtxo: _foreignUtxo, - unSpendable: _unSpendable, - manuallySelectedOnly: _manuallySelectedOnly, - drainWallet: _drainWallet, - externalPolicyPath: _externalPolicyPath, - internalPolicyPath: _internalPolicyPath, - rbf: _rbfValue, - drainTo: _drainTo, - feeAbsolute: _feeAbsolute, - feeRate: _feeRate, - data: _data, - changePolicy: _changeSpendPolicy); - - return ( - PartiallySignedTransaction._(ptr: res.$1.ptr), - TransactionDetails( - transaction: (res.$2.transaction?.s == null) - ? null - : Transaction._(s: res.$2.transaction!.s), - txid: res.$2.txid, - received: res.$2.received, - sent: res.$2.sent, - confirmationTime: res.$2.confirmationTime) - ); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } -} - -/// The Wallet acts as a way of coherently interfacing with output descriptors and related transactions. Its main components are: -/// -/// 1. Output descriptors from which it can derive addresses. -/// 2. A Database where it tracks transactions and utxos related to the descriptors. -/// 3. Signers that can contribute signatures to addresses instantiated from the descriptors. -class Wallet extends BdkWallet { - Wallet._({required super.ptr}); - - /// [Wallet] constructor - - ///Create a wallet. - // The only way this can fail is if the descriptors passed in do not match the checksums in database. - static Future create({ - required Descriptor descriptor, - Descriptor? changeDescriptor, - required types.Network network, - required types.DatabaseConfig databaseConfig, - }) async { - try { - await Api.initialize(); - final res = await BdkWallet.newInstance( - descriptor: descriptor, - changeDescriptor: changeDescriptor, - network: network, - databaseConfig: databaseConfig, - ); - return Wallet._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Return a derived address using the external descriptor, see AddressIndex for available address index selection - /// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) - /// then the same address will always be returned for any AddressIndex. - AddressInfo getAddress({required types.AddressIndex addressIndex, hint}) { - try { - final res = BdkWallet.getAddress(ptr: this, addressIndex: addressIndex); - return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates - /// on the internal database, which first needs to be Wallet.sync manually. - @override - types.Balance getBalance({hint}) { - try { - return super.getBalance(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Returns the descriptor used to create addresses for a particular keychain. - Future getDescriptorForKeychain( - {required types.KeychainKind keychain, hint}) async { - try { - final res = - BdkWallet.getDescriptorForKeychain(ptr: this, keychain: keychain); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Return a derived address using the internal (change) descriptor. - /// - /// If the wallet doesn't have an internal descriptor it will use the external descriptor. - /// - /// see [AddressIndex] for available address index selection strategies. If none of the keys - /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always - /// be returned for any [AddressIndex]. - - AddressInfo getInternalAddress( - {required types.AddressIndex addressIndex, hint}) { - try { - final res = - BdkWallet.getInternalAddress(ptr: this, addressIndex: addressIndex); - return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///get the corresponding PSBT Input for a LocalUtxo - @override - Future getPsbtInput( - {required types.LocalUtxo utxo, - required bool onlyWitnessUtxo, - types.PsbtSigHashType? sighashType, - hint}) async { - try { - return super.getPsbtInput( - utxo: utxo, - onlyWitnessUtxo: onlyWitnessUtxo, - sighashType: sighashType); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Return whether or not a script is part of this wallet (either internal or external). - bool isMine({required ScriptBuf script}) { - try { - return BdkWallet.isMine(ptr: this, script: script); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. - @override - List listTransactions({required bool includeRaw, hint}) { - try { - return super - .listTransactions(includeRaw: includeRaw) - .map((e) => TransactionDetails( - transaction: (e.transaction?.s == null) - ? null - : Transaction._(s: e.transaction!.s), - txid: e.txid, - received: e.received, - sent: e.sent, - confirmationTime: e.confirmationTime)) - .toList(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Return the list of unspent outputs of this wallet. Note that this method only operates on the internal database, - /// which first needs to be Wallet.sync manually. - /// TODO; Update; create custom LocalUtxo - @override - List listUnspent({hint}) { - try { - return super.listUnspent(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Get the Bitcoin network the wallet is using. - @override - types.Network network({hint}) { - try { - return super.network(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Sign a transaction with all the wallet's signers. This function returns an encapsulated bool that - /// has the value true if the PSBT was finalized, or false otherwise. - /// - /// The [SignOptions] can be used to tweak the behavior of the software signers, and the way - /// the transaction is finalized at the end. Note that it can't be guaranteed that *every* - /// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined - /// in this library will. - Future sign( - {required PartiallySignedTransaction psbt, - types.SignOptions? signOptions, - hint}) async { - try { - final res = - await BdkWallet.sign(ptr: this, psbt: psbt, signOptions: signOptions); - return res; - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Sync the internal database with the blockchain. - - Future sync({required Blockchain blockchain, hint}) async { - try { - final res = await BdkWallet.sync(ptr: this, blockchain: blockchain); - return res; - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Return the spending policies for the wallet's descriptor - Policy? policies(types.KeychainKind keychain) { - try { - final res = BdkWallet.policies(ptr: this, keychain: keychain); - if (res == null) return null; - return Policy._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// Verify a transaction against the consensus rules - /// - /// This function uses `bitcoinconsensus` to verify transactions by fetching the required data - /// from the Wallet Database or using the [`Blockchain`]. - /// - /// Depending on the capabilities of the - /// [Blockchain] backend, the method could fail when called with old "historical" transactions or - /// with unconfirmed transactions that have been evicted from the backend's memory. - /// Make sure you sync the wallet to get the optimal results. - // Future verifyTx({required Transaction tx}) async { - // try { - // await BdkWallet.verifyTx(ptr: this, tx: tx); - // } on BdkError catch (e) { - // throw mapBdkError(e); - // } - // } -} - -///A derived address and the index it was found at For convenience this automatically derefs to Address -class AddressInfo { - ///Child index of this address - final int index; - - /// Address - final Address address; - - AddressInfo(this.index, this.address); -} - -class TxIn extends types.TxIn { - TxIn( - {required super.previousOutput, - required ScriptBuf scriptSig, - required super.sequence, - required super.witness}) - : super(scriptSig: scriptSig); -} - -///A transaction output, which defines new coins to be created from old ones. -class TxOut extends types.TxOut { - TxOut({required super.value, required ScriptBuf scriptPubkey}) - : super(scriptPubkey: scriptPubkey); -} - -class TransactionDetails extends types.TransactionDetails { - TransactionDetails( - {Transaction? transaction, - required super.txid, - required super.received, - required super.sent, - super.confirmationTime, - super.fee}) - : super(transaction: transaction); -} diff --git a/lib/src/utils/exceptions.dart b/lib/src/utils/exceptions.dart deleted file mode 100644 index 05ae163d..00000000 --- a/lib/src/utils/exceptions.dart +++ /dev/null @@ -1,459 +0,0 @@ -import '../generated/api/error.dart'; - -abstract class BdkFfiException implements Exception { - String? message; - BdkFfiException({this.message}); - @override - String toString() => - (message != null) ? '$runtimeType( $message )' : runtimeType.toString(); -} - -/// Exception thrown when trying to add an invalid byte value, or empty list to txBuilder.addData -class InvalidByteException extends BdkFfiException { - /// Constructs the [InvalidByteException] - InvalidByteException({super.message}); -} - -/// Exception thrown when output created is under the dust limit, 546 sats -class OutputBelowDustLimitException extends BdkFfiException { - /// Constructs the [OutputBelowDustLimitException] - OutputBelowDustLimitException({super.message}); -} - -/// Exception thrown when a there is an error in Partially signed bitcoin transaction -class PsbtException extends BdkFfiException { - /// Constructs the [PsbtException] - PsbtException({super.message}); -} - -/// Exception thrown when a there is an error in Partially signed bitcoin transaction -class PsbtParseException extends BdkFfiException { - /// Constructs the [PsbtParseException] - PsbtParseException({super.message}); -} - -class GenericException extends BdkFfiException { - /// Constructs the [GenericException] - GenericException({super.message}); -} - -class Bip32Exception extends BdkFfiException { - /// Constructs the [Bip32Exception] - Bip32Exception({super.message}); -} - -/// Exception thrown when a tx is build without recipients -class NoRecipientsException extends BdkFfiException { - /// Constructs the [NoRecipientsException] - NoRecipientsException({super.message}); -} - -/// Exception thrown when trying to convert Bare and Public key script to address -class ScriptDoesntHaveAddressFormException extends BdkFfiException { - /// Constructs the [ScriptDoesntHaveAddressFormException] - ScriptDoesntHaveAddressFormException({super.message}); -} - -/// Exception thrown when manuallySelectedOnly() is called but no utxos has been passed -class NoUtxosSelectedException extends BdkFfiException { - /// Constructs the [NoUtxosSelectedException] - NoUtxosSelectedException({super.message}); -} - -/// Branch and bound coin selection possible attempts with sufficiently big UTXO set could grow exponentially, -/// thus a limit is set, and when hit, this exception is thrown -class BnBTotalTriesExceededException extends BdkFfiException { - /// Constructs the [BnBTotalTriesExceededException] - BnBTotalTriesExceededException({super.message}); -} - -///Branch and bound coin selection tries to avoid needing a change by finding the right inputs for the desired outputs plus fee, -/// if there is not such combination this exception is thrown -class BnBNoExactMatchException extends BdkFfiException { - /// Constructs the [BnBNoExactMatchException] - BnBNoExactMatchException({super.message}); -} - -///Exception thrown when trying to replace a tx that has a sequence >= 0xFFFFFFFE -class IrreplaceableTransactionException extends BdkFfiException { - /// Constructs the [IrreplaceableTransactionException] - IrreplaceableTransactionException({super.message}); -} - -///Exception thrown when the keys are invalid -class KeyException extends BdkFfiException { - /// Constructs the [KeyException] - KeyException({super.message}); -} - -///Exception thrown when spending policy is not compatible with this KeychainKind -class SpendingPolicyRequiredException extends BdkFfiException { - /// Constructs the [SpendingPolicyRequiredException] - SpendingPolicyRequiredException({super.message}); -} - -///Transaction verification Exception -class VerificationException extends BdkFfiException { - /// Constructs the [VerificationException] - VerificationException({super.message}); -} - -///Exception thrown when progress value is not between 0.0 (included) and 100.0 (included) -class InvalidProgressValueException extends BdkFfiException { - /// Constructs the [InvalidProgressValueException] - InvalidProgressValueException({super.message}); -} - -///Progress update error (maybe the channel has been closed) -class ProgressUpdateException extends BdkFfiException { - /// Constructs the [ProgressUpdateException] - ProgressUpdateException({super.message}); -} - -///Exception thrown when the requested outpoint doesn’t exist in the tx (vout greater than available outputs) -class InvalidOutpointException extends BdkFfiException { - /// Constructs the [InvalidOutpointException] - InvalidOutpointException({super.message}); -} - -class EncodeException extends BdkFfiException { - /// Constructs the [EncodeException] - EncodeException({super.message}); -} - -class MiniscriptPsbtException extends BdkFfiException { - /// Constructs the [MiniscriptPsbtException] - MiniscriptPsbtException({super.message}); -} - -class SignerException extends BdkFfiException { - /// Constructs the [SignerException] - SignerException({super.message}); -} - -///Exception thrown when there is an error while extracting and manipulating policies -class InvalidPolicyPathException extends BdkFfiException { - /// Constructs the [InvalidPolicyPathException] - InvalidPolicyPathException({super.message}); -} - -/// Exception thrown when extended key in the descriptor is neither be a master key itself (having depth = 0) or have an explicit origin provided -class MissingKeyOriginException extends BdkFfiException { - /// Constructs the [MissingKeyOriginException] - MissingKeyOriginException({super.message}); -} - -///Exception thrown when trying to spend an UTXO that is not in the internal database -class UnknownUtxoException extends BdkFfiException { - /// Constructs the [UnknownUtxoException] - UnknownUtxoException({super.message}); -} - -///Exception thrown when trying to bump a transaction that is already confirmed -class TransactionNotFoundException extends BdkFfiException { - /// Constructs the [TransactionNotFoundException] - TransactionNotFoundException({super.message}); -} - -///Exception thrown when node doesn’t have data to estimate a fee rate -class FeeRateUnavailableException extends BdkFfiException { - /// Constructs the [FeeRateUnavailableException] - FeeRateUnavailableException({super.message}); -} - -///Exception thrown when the descriptor checksum mismatch -class ChecksumMismatchException extends BdkFfiException { - /// Constructs the [ChecksumMismatchException] - ChecksumMismatchException({super.message}); -} - -///Exception thrown when sync attempt failed due to missing scripts in cache which are needed to satisfy stopGap. -class MissingCachedScriptsException extends BdkFfiException { - /// Constructs the [MissingCachedScriptsException] - MissingCachedScriptsException({super.message}); -} - -///Exception thrown when wallet’s UTXO set is not enough to cover recipient’s requested plus fee -class InsufficientFundsException extends BdkFfiException { - /// Constructs the [InsufficientFundsException] - InsufficientFundsException({super.message}); -} - -///Exception thrown when bumping a tx, the fee rate requested is lower than required -class FeeRateTooLowException extends BdkFfiException { - /// Constructs the [FeeRateTooLowException] - FeeRateTooLowException({super.message}); -} - -///Exception thrown when bumping a tx, the absolute fee requested is lower than replaced tx absolute fee -class FeeTooLowException extends BdkFfiException { - /// Constructs the [FeeTooLowException] - FeeTooLowException({super.message}); -} - -///Sled database error -class SledException extends BdkFfiException { - /// Constructs the [SledException] - SledException({super.message}); -} - -///Exception thrown when there is an error in parsing and usage of descriptors -class DescriptorException extends BdkFfiException { - /// Constructs the [DescriptorException] - DescriptorException({super.message}); -} - -///Miniscript exception -class MiniscriptException extends BdkFfiException { - /// Constructs the [MiniscriptException] - MiniscriptException({super.message}); -} - -///Esplora Client exception -class EsploraException extends BdkFfiException { - /// Constructs the [EsploraException] - EsploraException({super.message}); -} - -class Secp256k1Exception extends BdkFfiException { - /// Constructs the [ Secp256k1Exception] - Secp256k1Exception({super.message}); -} - -///Exception thrown when trying to bump a transaction that is already confirmed -class TransactionConfirmedException extends BdkFfiException { - /// Constructs the [TransactionConfirmedException] - TransactionConfirmedException({super.message}); -} - -class ElectrumException extends BdkFfiException { - /// Constructs the [ElectrumException] - ElectrumException({super.message}); -} - -class RpcException extends BdkFfiException { - /// Constructs the [RpcException] - RpcException({super.message}); -} - -class RusqliteException extends BdkFfiException { - /// Constructs the [RusqliteException] - RusqliteException({super.message}); -} - -class InvalidNetworkException extends BdkFfiException { - /// Constructs the [InvalidNetworkException] - InvalidNetworkException({super.message}); -} - -class JsonException extends BdkFfiException { - /// Constructs the [JsonException] - JsonException({super.message}); -} - -class HexException extends BdkFfiException { - /// Constructs the [HexException] - HexException({super.message}); -} - -class AddressException extends BdkFfiException { - /// Constructs the [AddressException] - AddressException({super.message}); -} - -class ConsensusException extends BdkFfiException { - /// Constructs the [ConsensusException] - ConsensusException({super.message}); -} - -class Bip39Exception extends BdkFfiException { - /// Constructs the [Bip39Exception] - Bip39Exception({super.message}); -} - -class InvalidTransactionException extends BdkFfiException { - /// Constructs the [InvalidTransactionException] - InvalidTransactionException({super.message}); -} - -class InvalidLockTimeException extends BdkFfiException { - /// Constructs the [InvalidLockTimeException] - InvalidLockTimeException({super.message}); -} - -class InvalidInputException extends BdkFfiException { - /// Constructs the [InvalidInputException] - InvalidInputException({super.message}); -} - -class VerifyTransactionException extends BdkFfiException { - /// Constructs the [VerifyTransactionException] - VerifyTransactionException({super.message}); -} - -Exception mapHexError(HexError error) { - return error.when( - invalidChar: (e) => HexException(message: "Non-hexadecimal character $e"), - oddLengthString: (e) => - HexException(message: "Purported hex string had odd length $e"), - invalidLength: (BigInt expected, BigInt found) => HexException( - message: - "Tried to parse fixed-length hash from a string with the wrong type; \n expected: ${expected.toString()}, found: ${found.toString()}.")); -} - -Exception mapAddressError(AddressError error) { - return error.when( - base58: (e) => AddressException(message: "Base58 encoding error: $e"), - bech32: (e) => AddressException(message: "Bech32 encoding error: $e"), - emptyBech32Payload: () => - AddressException(message: "The bech32 payload was empty."), - invalidBech32Variant: (e, f) => AddressException( - message: - "Invalid bech32 variant: The wrong checksum algorithm was used. See BIP-0350; \n expected:$e, found: $f "), - invalidWitnessVersion: (e) => AddressException( - message: - "Invalid witness version script: $e, version must be 0 to 16 inclusive."), - unparsableWitnessVersion: (e) => AddressException( - message: "Unable to parse witness version from string: $e"), - malformedWitnessVersion: () => AddressException( - message: - "Bitcoin script opcode does not match any known witness version, the script is malformed."), - invalidWitnessProgramLength: (e) => AddressException( - message: - "Invalid witness program length: $e, The witness program must be between 2 and 40 bytes in length."), - invalidSegwitV0ProgramLength: (e) => AddressException( - message: - "Invalid segwitV0 program length: $e, A v0 witness program must be either of length 20 or 32."), - uncompressedPubkey: () => AddressException( - message: "An uncompressed pubkey was used where it is not allowed."), - excessiveScriptSize: () => AddressException( - message: "Address size more than 520 bytes is not allowed."), - unrecognizedScript: () => AddressException( - message: - "Unrecognized script: Script is not a p2pkh, p2sh or witness program."), - unknownAddressType: (e) => AddressException( - message: "Unknown address type: $e, Address type is either invalid or not supported in rust-bitcoin."), - networkValidation: (required, found, _) => AddressException(message: "Address’s network differs from required one; \n required: $required, found: $found ")); -} - -Exception mapDescriptorError(DescriptorError error) { - return error.when( - invalidHdKeyPath: () => DescriptorException( - message: - "Invalid HD Key path, such as having a wildcard but a length != 1"), - invalidDescriptorChecksum: () => DescriptorException( - message: "The provided descriptor doesn’t match its checksum"), - hardenedDerivationXpub: () => DescriptorException( - message: "The provided descriptor doesn’t match its checksum"), - multiPath: () => - DescriptorException(message: "The descriptor contains multipath keys"), - key: (e) => KeyException(message: e), - policy: (e) => DescriptorException( - message: "Error while extracting and manipulating policies: $e"), - bip32: (e) => Bip32Exception(message: e), - base58: (e) => - DescriptorException(message: "Error during base58 decoding: $e"), - pk: (e) => KeyException(message: e), - miniscript: (e) => MiniscriptException(message: e), - hex: (e) => HexException(message: e), - invalidDescriptorCharacter: (e) => DescriptorException( - message: "Invalid byte found in the descriptor checksum: $e"), - ); -} - -Exception mapConsensusError(ConsensusError error) { - return error.when( - io: (e) => ConsensusException(message: "I/O error: $e"), - oversizedVectorAllocation: (e, f) => ConsensusException( - message: - "Tried to allocate an oversized vector. The capacity requested: $e, found: $f "), - invalidChecksum: (e, f) => ConsensusException( - message: - "Checksum was invalid, expected: ${e.toString()}, actual:${f.toString()}"), - nonMinimalVarInt: () => ConsensusException( - message: "VarInt was encoded in a non-minimal way."), - parseFailed: (e) => ConsensusException(message: "Parsing error: $e"), - unsupportedSegwitFlag: (e) => - ConsensusException(message: "Unsupported segwit flag $e")); -} - -Exception mapBdkError(BdkError error) { - return error.when( - noUtxosSelected: () => NoUtxosSelectedException( - message: - "manuallySelectedOnly option is selected but no utxo has been passed"), - invalidU32Bytes: (e) => InvalidByteException( - message: - 'Wrong number of bytes found when trying to convert the bytes, ${e.toString()}'), - generic: (e) => GenericException(message: e), - scriptDoesntHaveAddressForm: () => ScriptDoesntHaveAddressFormException(), - noRecipients: () => NoRecipientsException( - message: "Failed to build a transaction without recipients"), - outputBelowDustLimit: (e) => OutputBelowDustLimitException( - message: - 'Output created is under the dust limit (546 sats). Output value: ${e.toString()}'), - insufficientFunds: (needed, available) => InsufficientFundsException( - message: - "Wallet's UTXO set is not enough to cover recipient's requested plus fee; \n Needed: $needed, Available: $available"), - bnBTotalTriesExceeded: () => BnBTotalTriesExceededException( - message: - "Utxo branch and bound coin selection attempts have reached its limit"), - bnBNoExactMatch: () => BnBNoExactMatchException( - message: - "Utxo branch and bound coin selection failed to find the correct inputs for the desired outputs."), - unknownUtxo: () => UnknownUtxoException( - message: "Utxo not found in the internal database"), - transactionNotFound: () => TransactionNotFoundException(), - transactionConfirmed: () => TransactionConfirmedException(), - irreplaceableTransaction: () => IrreplaceableTransactionException( - message: - "Trying to replace the transaction that has a sequence >= 0xFFFFFFFE"), - feeRateTooLow: (e) => FeeRateTooLowException( - message: - "The Fee rate requested is lower than required. Required: ${e.toString()}"), - feeTooLow: (e) => FeeTooLowException( - message: - "The absolute fee requested is lower than replaced tx's absolute fee; \n Required: ${e.toString()}"), - feeRateUnavailable: () => FeeRateUnavailableException( - message: "Node doesn't have data to estimate a fee rate"), - missingKeyOrigin: (e) => MissingKeyOriginException(message: e.toString()), - key: (e) => KeyException(message: e.toString()), - checksumMismatch: () => ChecksumMismatchException(), - spendingPolicyRequired: (e) => SpendingPolicyRequiredException( - message: "Spending policy is not compatible with: ${e.toString()}"), - invalidPolicyPathError: (e) => - InvalidPolicyPathException(message: e.toString()), - signer: (e) => SignerException(message: e.toString()), - invalidNetwork: (requested, found) => InvalidNetworkException( - message: 'Requested; $requested, Found: $found'), - invalidOutpoint: (e) => InvalidOutpointException( - message: - "${e.toString()} doesn’t exist in the tx (vout greater than available outputs)"), - descriptor: (e) => mapDescriptorError(e), - encode: (e) => EncodeException(message: e.toString()), - miniscript: (e) => MiniscriptException(message: e.toString()), - miniscriptPsbt: (e) => MiniscriptPsbtException(message: e.toString()), - bip32: (e) => Bip32Exception(message: e.toString()), - secp256K1: (e) => Secp256k1Exception(message: e.toString()), - missingCachedScripts: (missingCount, lastCount) => - MissingCachedScriptsException( - message: - 'Sync attempt failed due to missing scripts in cache which are needed to satisfy stop_gap; \n MissingCount: $missingCount, LastCount: $lastCount '), - json: (e) => JsonException(message: e.toString()), - hex: (e) => mapHexError(e), - psbt: (e) => PsbtException(message: e.toString()), - psbtParse: (e) => PsbtParseException(message: e.toString()), - electrum: (e) => ElectrumException(message: e.toString()), - esplora: (e) => EsploraException(message: e.toString()), - sled: (e) => SledException(message: e.toString()), - rpc: (e) => RpcException(message: e.toString()), - rusqlite: (e) => RusqliteException(message: e.toString()), - consensus: (e) => mapConsensusError(e), - address: (e) => mapAddressError(e), - bip39: (e) => Bip39Exception(message: e.toString()), - invalidInput: (e) => InvalidInputException(message: e), - invalidLockTime: (e) => InvalidLockTimeException(message: e), - invalidTransaction: (e) => InvalidTransactionException(message: e), - verifyTransaction: (e) => VerifyTransactionException(message: e), - ); -} diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart deleted file mode 100644 index 45294f8f..00000000 --- a/lib/src/utils/utils.dart +++ /dev/null @@ -1,15 +0,0 @@ -import '../generated/frb_generated.dart'; - -export 'exceptions.dart'; - -class Api { - static Future initialize() async { - try { - if (!core.instance.initialized) { - await core.init(); - } - } catch (e) { - throw Exception("Failed to initialize bdk-flutter"); - } - } -} diff --git a/macos/.gitignore b/macos/.gitignore deleted file mode 100644 index 09a762be..00000000 --- a/macos/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/Generated.xcconfig -/Flutter/ephemeral/ -/Flutter/flutter_export_environment.sh -Flutter/ -Frameworks/* -!Frameworks/.gitkeep diff --git a/macos/Classes/EnforceBundling.swift b/macos/Classes/EnforceBundling.swift deleted file mode 100644 index f95cacb9..00000000 --- a/macos/Classes/EnforceBundling.swift +++ /dev/null @@ -1,4 +0,0 @@ -public func dummyMethodToEnforceBundling() -> Int64 { - return dummy_method_to_enforce_bundling() -} -let dummyVar = dummyMethodToEnforceBundling(); diff --git a/macos/Classes/bdk_flutter.c b/macos/Classes/bdk_flutter.c deleted file mode 100644 index e69de29b..00000000 diff --git a/macos/Classes/frb_generated.h b/macos/Classes/frb_generated.h deleted file mode 100644 index 2430b240..00000000 --- a/macos/Classes/frb_generated.h +++ /dev/null @@ -1,1542 +0,0 @@ -#include -#include -#include -// EXTRA BEGIN -typedef struct DartCObject *WireSyncRust2DartDco; -typedef struct WireSyncRust2DartSse { - uint8_t *ptr; - int32_t len; -} WireSyncRust2DartSse; - -typedef int64_t DartPort; -typedef bool (*DartPostCObjectFnType)(DartPort port_id, void *message); -void store_dart_post_cobject(DartPostCObjectFnType ptr); -// EXTRA END -typedef struct _Dart_Handle* Dart_Handle; - -typedef struct wire_cst_bdk_blockchain { - uintptr_t ptr; -} wire_cst_bdk_blockchain; - -typedef struct wire_cst_list_prim_u_8_strict { - uint8_t *ptr; - int32_t len; -} wire_cst_list_prim_u_8_strict; - -typedef struct wire_cst_bdk_transaction { - struct wire_cst_list_prim_u_8_strict *s; -} wire_cst_bdk_transaction; - -typedef struct wire_cst_electrum_config { - struct wire_cst_list_prim_u_8_strict *url; - struct wire_cst_list_prim_u_8_strict *socks5; - uint8_t retry; - uint8_t *timeout; - uint64_t stop_gap; - bool validate_domain; -} wire_cst_electrum_config; - -typedef struct wire_cst_BlockchainConfig_Electrum { - struct wire_cst_electrum_config *config; -} wire_cst_BlockchainConfig_Electrum; - -typedef struct wire_cst_esplora_config { - struct wire_cst_list_prim_u_8_strict *base_url; - struct wire_cst_list_prim_u_8_strict *proxy; - uint8_t *concurrency; - uint64_t stop_gap; - uint64_t *timeout; -} wire_cst_esplora_config; - -typedef struct wire_cst_BlockchainConfig_Esplora { - struct wire_cst_esplora_config *config; -} wire_cst_BlockchainConfig_Esplora; - -typedef struct wire_cst_Auth_UserPass { - struct wire_cst_list_prim_u_8_strict *username; - struct wire_cst_list_prim_u_8_strict *password; -} wire_cst_Auth_UserPass; - -typedef struct wire_cst_Auth_Cookie { - struct wire_cst_list_prim_u_8_strict *file; -} wire_cst_Auth_Cookie; - -typedef union AuthKind { - struct wire_cst_Auth_UserPass UserPass; - struct wire_cst_Auth_Cookie Cookie; -} AuthKind; - -typedef struct wire_cst_auth { - int32_t tag; - union AuthKind kind; -} wire_cst_auth; - -typedef struct wire_cst_rpc_sync_params { - uint64_t start_script_count; - uint64_t start_time; - bool force_start_time; - uint64_t poll_rate_sec; -} wire_cst_rpc_sync_params; - -typedef struct wire_cst_rpc_config { - struct wire_cst_list_prim_u_8_strict *url; - struct wire_cst_auth auth; - int32_t network; - struct wire_cst_list_prim_u_8_strict *wallet_name; - struct wire_cst_rpc_sync_params *sync_params; -} wire_cst_rpc_config; - -typedef struct wire_cst_BlockchainConfig_Rpc { - struct wire_cst_rpc_config *config; -} wire_cst_BlockchainConfig_Rpc; - -typedef union BlockchainConfigKind { - struct wire_cst_BlockchainConfig_Electrum Electrum; - struct wire_cst_BlockchainConfig_Esplora Esplora; - struct wire_cst_BlockchainConfig_Rpc Rpc; -} BlockchainConfigKind; - -typedef struct wire_cst_blockchain_config { - int32_t tag; - union BlockchainConfigKind kind; -} wire_cst_blockchain_config; - -typedef struct wire_cst_bdk_descriptor { - uintptr_t extended_descriptor; - uintptr_t key_map; -} wire_cst_bdk_descriptor; - -typedef struct wire_cst_bdk_descriptor_secret_key { - uintptr_t ptr; -} wire_cst_bdk_descriptor_secret_key; - -typedef struct wire_cst_bdk_descriptor_public_key { - uintptr_t ptr; -} wire_cst_bdk_descriptor_public_key; - -typedef struct wire_cst_bdk_derivation_path { - uintptr_t ptr; -} wire_cst_bdk_derivation_path; - -typedef struct wire_cst_bdk_mnemonic { - uintptr_t ptr; -} wire_cst_bdk_mnemonic; - -typedef struct wire_cst_list_prim_u_8_loose { - uint8_t *ptr; - int32_t len; -} wire_cst_list_prim_u_8_loose; - -typedef struct wire_cst_bdk_psbt { - uintptr_t ptr; -} wire_cst_bdk_psbt; - -typedef struct wire_cst_bdk_address { - uintptr_t ptr; -} wire_cst_bdk_address; - -typedef struct wire_cst_bdk_script_buf { - struct wire_cst_list_prim_u_8_strict *bytes; -} wire_cst_bdk_script_buf; - -typedef struct wire_cst_bdk_policy { - uintptr_t ptr; -} wire_cst_bdk_policy; - -typedef struct wire_cst_LockTime_Blocks { - uint32_t field0; -} wire_cst_LockTime_Blocks; - -typedef struct wire_cst_LockTime_Seconds { - uint32_t field0; -} wire_cst_LockTime_Seconds; - -typedef union LockTimeKind { - struct wire_cst_LockTime_Blocks Blocks; - struct wire_cst_LockTime_Seconds Seconds; -} LockTimeKind; - -typedef struct wire_cst_lock_time { - int32_t tag; - union LockTimeKind kind; -} wire_cst_lock_time; - -typedef struct wire_cst_out_point { - struct wire_cst_list_prim_u_8_strict *txid; - uint32_t vout; -} wire_cst_out_point; - -typedef struct wire_cst_list_list_prim_u_8_strict { - struct wire_cst_list_prim_u_8_strict **ptr; - int32_t len; -} wire_cst_list_list_prim_u_8_strict; - -typedef struct wire_cst_tx_in { - struct wire_cst_out_point previous_output; - struct wire_cst_bdk_script_buf script_sig; - uint32_t sequence; - struct wire_cst_list_list_prim_u_8_strict *witness; -} wire_cst_tx_in; - -typedef struct wire_cst_list_tx_in { - struct wire_cst_tx_in *ptr; - int32_t len; -} wire_cst_list_tx_in; - -typedef struct wire_cst_tx_out { - uint64_t value; - struct wire_cst_bdk_script_buf script_pubkey; -} wire_cst_tx_out; - -typedef struct wire_cst_list_tx_out { - struct wire_cst_tx_out *ptr; - int32_t len; -} wire_cst_list_tx_out; - -typedef struct wire_cst_bdk_wallet { - uintptr_t ptr; -} wire_cst_bdk_wallet; - -typedef struct wire_cst_AddressIndex_Peek { - uint32_t index; -} wire_cst_AddressIndex_Peek; - -typedef struct wire_cst_AddressIndex_Reset { - uint32_t index; -} wire_cst_AddressIndex_Reset; - -typedef union AddressIndexKind { - struct wire_cst_AddressIndex_Peek Peek; - struct wire_cst_AddressIndex_Reset Reset; -} AddressIndexKind; - -typedef struct wire_cst_address_index { - int32_t tag; - union AddressIndexKind kind; -} wire_cst_address_index; - -typedef struct wire_cst_local_utxo { - struct wire_cst_out_point outpoint; - struct wire_cst_tx_out txout; - int32_t keychain; - bool is_spent; -} wire_cst_local_utxo; - -typedef struct wire_cst_psbt_sig_hash_type { - uint32_t inner; -} wire_cst_psbt_sig_hash_type; - -typedef struct wire_cst_sqlite_db_configuration { - struct wire_cst_list_prim_u_8_strict *path; -} wire_cst_sqlite_db_configuration; - -typedef struct wire_cst_DatabaseConfig_Sqlite { - struct wire_cst_sqlite_db_configuration *config; -} wire_cst_DatabaseConfig_Sqlite; - -typedef struct wire_cst_sled_db_configuration { - struct wire_cst_list_prim_u_8_strict *path; - struct wire_cst_list_prim_u_8_strict *tree_name; -} wire_cst_sled_db_configuration; - -typedef struct wire_cst_DatabaseConfig_Sled { - struct wire_cst_sled_db_configuration *config; -} wire_cst_DatabaseConfig_Sled; - -typedef union DatabaseConfigKind { - struct wire_cst_DatabaseConfig_Sqlite Sqlite; - struct wire_cst_DatabaseConfig_Sled Sled; -} DatabaseConfigKind; - -typedef struct wire_cst_database_config { - int32_t tag; - union DatabaseConfigKind kind; -} wire_cst_database_config; - -typedef struct wire_cst_sign_options { - bool trust_witness_utxo; - uint32_t *assume_height; - bool allow_all_sighashes; - bool remove_partial_sigs; - bool try_finalize; - bool sign_with_tap_internal_key; - bool allow_grinding; -} wire_cst_sign_options; - -typedef struct wire_cst_script_amount { - struct wire_cst_bdk_script_buf script; - uint64_t amount; -} wire_cst_script_amount; - -typedef struct wire_cst_list_script_amount { - struct wire_cst_script_amount *ptr; - int32_t len; -} wire_cst_list_script_amount; - -typedef struct wire_cst_list_out_point { - struct wire_cst_out_point *ptr; - int32_t len; -} wire_cst_list_out_point; - -typedef struct wire_cst_input { - struct wire_cst_list_prim_u_8_strict *s; -} wire_cst_input; - -typedef struct wire_cst_record_out_point_input_usize { - struct wire_cst_out_point field0; - struct wire_cst_input field1; - uintptr_t field2; -} wire_cst_record_out_point_input_usize; - -typedef struct wire_cst_RbfValue_Value { - uint32_t field0; -} wire_cst_RbfValue_Value; - -typedef union RbfValueKind { - struct wire_cst_RbfValue_Value Value; -} RbfValueKind; - -typedef struct wire_cst_rbf_value { - int32_t tag; - union RbfValueKind kind; -} wire_cst_rbf_value; - -typedef struct wire_cst_list_prim_u_32_strict { - uint32_t *ptr; - int32_t len; -} wire_cst_list_prim_u_32_strict; - -typedef struct wire_cst_record_string_list_prim_u_32_strict { - struct wire_cst_list_prim_u_8_strict *field0; - struct wire_cst_list_prim_u_32_strict *field1; -} wire_cst_record_string_list_prim_u_32_strict; - -typedef struct wire_cst_list_record_string_list_prim_u_32_strict { - struct wire_cst_record_string_list_prim_u_32_strict *ptr; - int32_t len; -} wire_cst_list_record_string_list_prim_u_32_strict; - -typedef struct wire_cst_AddressError_Base58 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_Base58; - -typedef struct wire_cst_AddressError_Bech32 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_Bech32; - -typedef struct wire_cst_AddressError_InvalidBech32Variant { - int32_t expected; - int32_t found; -} wire_cst_AddressError_InvalidBech32Variant; - -typedef struct wire_cst_AddressError_InvalidWitnessVersion { - uint8_t field0; -} wire_cst_AddressError_InvalidWitnessVersion; - -typedef struct wire_cst_AddressError_UnparsableWitnessVersion { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_UnparsableWitnessVersion; - -typedef struct wire_cst_AddressError_InvalidWitnessProgramLength { - uintptr_t field0; -} wire_cst_AddressError_InvalidWitnessProgramLength; - -typedef struct wire_cst_AddressError_InvalidSegwitV0ProgramLength { - uintptr_t field0; -} wire_cst_AddressError_InvalidSegwitV0ProgramLength; - -typedef struct wire_cst_AddressError_UnknownAddressType { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_UnknownAddressType; - -typedef struct wire_cst_AddressError_NetworkValidation { - int32_t network_required; - int32_t network_found; - struct wire_cst_list_prim_u_8_strict *address; -} wire_cst_AddressError_NetworkValidation; - -typedef union AddressErrorKind { - struct wire_cst_AddressError_Base58 Base58; - struct wire_cst_AddressError_Bech32 Bech32; - struct wire_cst_AddressError_InvalidBech32Variant InvalidBech32Variant; - struct wire_cst_AddressError_InvalidWitnessVersion InvalidWitnessVersion; - struct wire_cst_AddressError_UnparsableWitnessVersion UnparsableWitnessVersion; - struct wire_cst_AddressError_InvalidWitnessProgramLength InvalidWitnessProgramLength; - struct wire_cst_AddressError_InvalidSegwitV0ProgramLength InvalidSegwitV0ProgramLength; - struct wire_cst_AddressError_UnknownAddressType UnknownAddressType; - struct wire_cst_AddressError_NetworkValidation NetworkValidation; -} AddressErrorKind; - -typedef struct wire_cst_address_error { - int32_t tag; - union AddressErrorKind kind; -} wire_cst_address_error; - -typedef struct wire_cst_block_time { - uint32_t height; - uint64_t timestamp; -} wire_cst_block_time; - -typedef struct wire_cst_condition { - uint32_t *csv; - struct wire_cst_lock_time *timelock; -} wire_cst_condition; - -typedef struct wire_cst_ConsensusError_Io { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_ConsensusError_Io; - -typedef struct wire_cst_ConsensusError_OversizedVectorAllocation { - uintptr_t requested; - uintptr_t max; -} wire_cst_ConsensusError_OversizedVectorAllocation; - -typedef struct wire_cst_ConsensusError_InvalidChecksum { - struct wire_cst_list_prim_u_8_strict *expected; - struct wire_cst_list_prim_u_8_strict *actual; -} wire_cst_ConsensusError_InvalidChecksum; - -typedef struct wire_cst_ConsensusError_ParseFailed { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_ConsensusError_ParseFailed; - -typedef struct wire_cst_ConsensusError_UnsupportedSegwitFlag { - uint8_t field0; -} wire_cst_ConsensusError_UnsupportedSegwitFlag; - -typedef union ConsensusErrorKind { - struct wire_cst_ConsensusError_Io Io; - struct wire_cst_ConsensusError_OversizedVectorAllocation OversizedVectorAllocation; - struct wire_cst_ConsensusError_InvalidChecksum InvalidChecksum; - struct wire_cst_ConsensusError_ParseFailed ParseFailed; - struct wire_cst_ConsensusError_UnsupportedSegwitFlag UnsupportedSegwitFlag; -} ConsensusErrorKind; - -typedef struct wire_cst_consensus_error { - int32_t tag; - union ConsensusErrorKind kind; -} wire_cst_consensus_error; - -typedef struct wire_cst_DescriptorError_Key { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Key; - -typedef struct wire_cst_DescriptorError_Policy { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Policy; - -typedef struct wire_cst_DescriptorError_InvalidDescriptorCharacter { - uint8_t field0; -} wire_cst_DescriptorError_InvalidDescriptorCharacter; - -typedef struct wire_cst_DescriptorError_Bip32 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Bip32; - -typedef struct wire_cst_DescriptorError_Base58 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Base58; - -typedef struct wire_cst_DescriptorError_Pk { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Pk; - -typedef struct wire_cst_DescriptorError_Miniscript { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Miniscript; - -typedef struct wire_cst_DescriptorError_Hex { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DescriptorError_Hex; - -typedef union DescriptorErrorKind { - struct wire_cst_DescriptorError_Key Key; - struct wire_cst_DescriptorError_Policy Policy; - struct wire_cst_DescriptorError_InvalidDescriptorCharacter InvalidDescriptorCharacter; - struct wire_cst_DescriptorError_Bip32 Bip32; - struct wire_cst_DescriptorError_Base58 Base58; - struct wire_cst_DescriptorError_Pk Pk; - struct wire_cst_DescriptorError_Miniscript Miniscript; - struct wire_cst_DescriptorError_Hex Hex; -} DescriptorErrorKind; - -typedef struct wire_cst_descriptor_error { - int32_t tag; - union DescriptorErrorKind kind; -} wire_cst_descriptor_error; - -typedef struct wire_cst_fee_rate { - float sat_per_vb; -} wire_cst_fee_rate; - -typedef struct wire_cst_HexError_InvalidChar { - uint8_t field0; -} wire_cst_HexError_InvalidChar; - -typedef struct wire_cst_HexError_OddLengthString { - uintptr_t field0; -} wire_cst_HexError_OddLengthString; - -typedef struct wire_cst_HexError_InvalidLength { - uintptr_t field0; - uintptr_t field1; -} wire_cst_HexError_InvalidLength; - -typedef union HexErrorKind { - struct wire_cst_HexError_InvalidChar InvalidChar; - struct wire_cst_HexError_OddLengthString OddLengthString; - struct wire_cst_HexError_InvalidLength InvalidLength; -} HexErrorKind; - -typedef struct wire_cst_hex_error { - int32_t tag; - union HexErrorKind kind; -} wire_cst_hex_error; - -typedef struct wire_cst_PkOrF_Pubkey { - struct wire_cst_list_prim_u_8_strict *value; -} wire_cst_PkOrF_Pubkey; - -typedef struct wire_cst_PkOrF_XOnlyPubkey { - struct wire_cst_list_prim_u_8_strict *value; -} wire_cst_PkOrF_XOnlyPubkey; - -typedef struct wire_cst_PkOrF_Fingerprint { - struct wire_cst_list_prim_u_8_strict *value; -} wire_cst_PkOrF_Fingerprint; - -typedef union PkOrFKind { - struct wire_cst_PkOrF_Pubkey Pubkey; - struct wire_cst_PkOrF_XOnlyPubkey XOnlyPubkey; - struct wire_cst_PkOrF_Fingerprint Fingerprint; -} PkOrFKind; - -typedef struct wire_cst_pk_or_f { - int32_t tag; - union PkOrFKind kind; -} wire_cst_pk_or_f; - -typedef struct wire_cst_list_bdk_policy { - struct wire_cst_bdk_policy *ptr; - int32_t len; -} wire_cst_list_bdk_policy; - -typedef struct wire_cst_list_condition { - struct wire_cst_condition *ptr; - int32_t len; -} wire_cst_list_condition; - -typedef struct wire_cst_list_local_utxo { - struct wire_cst_local_utxo *ptr; - int32_t len; -} wire_cst_list_local_utxo; - -typedef struct wire_cst_list_pk_or_f { - struct wire_cst_pk_or_f *ptr; - int32_t len; -} wire_cst_list_pk_or_f; - -typedef struct wire_cst_list_prim_u_64_strict { - uint64_t *ptr; - int32_t len; -} wire_cst_list_prim_u_64_strict; - -typedef struct wire_cst_record_list_prim_u_32_strict_list_condition { - struct wire_cst_list_prim_u_32_strict *field0; - struct wire_cst_list_condition *field1; -} wire_cst_record_list_prim_u_32_strict_list_condition; - -typedef struct wire_cst_list_record_list_prim_u_32_strict_list_condition { - struct wire_cst_record_list_prim_u_32_strict_list_condition *ptr; - int32_t len; -} wire_cst_list_record_list_prim_u_32_strict_list_condition; - -typedef struct wire_cst_record_u_32_list_condition { - uint32_t field0; - struct wire_cst_list_condition *field1; -} wire_cst_record_u_32_list_condition; - -typedef struct wire_cst_list_record_u_32_list_condition { - struct wire_cst_record_u_32_list_condition *ptr; - int32_t len; -} wire_cst_list_record_u_32_list_condition; - -typedef struct wire_cst_transaction_details { - struct wire_cst_bdk_transaction *transaction; - struct wire_cst_list_prim_u_8_strict *txid; - uint64_t received; - uint64_t sent; - uint64_t *fee; - struct wire_cst_block_time *confirmation_time; -} wire_cst_transaction_details; - -typedef struct wire_cst_list_transaction_details { - struct wire_cst_transaction_details *ptr; - int32_t len; -} wire_cst_list_transaction_details; - -typedef struct wire_cst_balance { - uint64_t immature; - uint64_t trusted_pending; - uint64_t untrusted_pending; - uint64_t confirmed; - uint64_t spendable; - uint64_t total; -} wire_cst_balance; - -typedef struct wire_cst_BdkError_Hex { - struct wire_cst_hex_error *field0; -} wire_cst_BdkError_Hex; - -typedef struct wire_cst_BdkError_Consensus { - struct wire_cst_consensus_error *field0; -} wire_cst_BdkError_Consensus; - -typedef struct wire_cst_BdkError_VerifyTransaction { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_VerifyTransaction; - -typedef struct wire_cst_BdkError_Address { - struct wire_cst_address_error *field0; -} wire_cst_BdkError_Address; - -typedef struct wire_cst_BdkError_Descriptor { - struct wire_cst_descriptor_error *field0; -} wire_cst_BdkError_Descriptor; - -typedef struct wire_cst_BdkError_InvalidU32Bytes { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidU32Bytes; - -typedef struct wire_cst_BdkError_Generic { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Generic; - -typedef struct wire_cst_BdkError_OutputBelowDustLimit { - uintptr_t field0; -} wire_cst_BdkError_OutputBelowDustLimit; - -typedef struct wire_cst_BdkError_InsufficientFunds { - uint64_t needed; - uint64_t available; -} wire_cst_BdkError_InsufficientFunds; - -typedef struct wire_cst_BdkError_FeeRateTooLow { - float needed; -} wire_cst_BdkError_FeeRateTooLow; - -typedef struct wire_cst_BdkError_FeeTooLow { - uint64_t needed; -} wire_cst_BdkError_FeeTooLow; - -typedef struct wire_cst_BdkError_MissingKeyOrigin { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_MissingKeyOrigin; - -typedef struct wire_cst_BdkError_Key { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Key; - -typedef struct wire_cst_BdkError_SpendingPolicyRequired { - int32_t field0; -} wire_cst_BdkError_SpendingPolicyRequired; - -typedef struct wire_cst_BdkError_InvalidPolicyPathError { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidPolicyPathError; - -typedef struct wire_cst_BdkError_Signer { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Signer; - -typedef struct wire_cst_BdkError_InvalidNetwork { - int32_t requested; - int32_t found; -} wire_cst_BdkError_InvalidNetwork; - -typedef struct wire_cst_BdkError_InvalidOutpoint { - struct wire_cst_out_point *field0; -} wire_cst_BdkError_InvalidOutpoint; - -typedef struct wire_cst_BdkError_Encode { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Encode; - -typedef struct wire_cst_BdkError_Miniscript { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Miniscript; - -typedef struct wire_cst_BdkError_MiniscriptPsbt { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_MiniscriptPsbt; - -typedef struct wire_cst_BdkError_Bip32 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Bip32; - -typedef struct wire_cst_BdkError_Bip39 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Bip39; - -typedef struct wire_cst_BdkError_Secp256k1 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Secp256k1; - -typedef struct wire_cst_BdkError_Json { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Json; - -typedef struct wire_cst_BdkError_Psbt { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Psbt; - -typedef struct wire_cst_BdkError_PsbtParse { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_PsbtParse; - -typedef struct wire_cst_BdkError_MissingCachedScripts { - uintptr_t field0; - uintptr_t field1; -} wire_cst_BdkError_MissingCachedScripts; - -typedef struct wire_cst_BdkError_Electrum { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Electrum; - -typedef struct wire_cst_BdkError_Esplora { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Esplora; - -typedef struct wire_cst_BdkError_Sled { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Sled; - -typedef struct wire_cst_BdkError_Rpc { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Rpc; - -typedef struct wire_cst_BdkError_Rusqlite { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Rusqlite; - -typedef struct wire_cst_BdkError_InvalidInput { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidInput; - -typedef struct wire_cst_BdkError_InvalidLockTime { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidLockTime; - -typedef struct wire_cst_BdkError_InvalidTransaction { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidTransaction; - -typedef union BdkErrorKind { - struct wire_cst_BdkError_Hex Hex; - struct wire_cst_BdkError_Consensus Consensus; - struct wire_cst_BdkError_VerifyTransaction VerifyTransaction; - struct wire_cst_BdkError_Address Address; - struct wire_cst_BdkError_Descriptor Descriptor; - struct wire_cst_BdkError_InvalidU32Bytes InvalidU32Bytes; - struct wire_cst_BdkError_Generic Generic; - struct wire_cst_BdkError_OutputBelowDustLimit OutputBelowDustLimit; - struct wire_cst_BdkError_InsufficientFunds InsufficientFunds; - struct wire_cst_BdkError_FeeRateTooLow FeeRateTooLow; - struct wire_cst_BdkError_FeeTooLow FeeTooLow; - struct wire_cst_BdkError_MissingKeyOrigin MissingKeyOrigin; - struct wire_cst_BdkError_Key Key; - struct wire_cst_BdkError_SpendingPolicyRequired SpendingPolicyRequired; - struct wire_cst_BdkError_InvalidPolicyPathError InvalidPolicyPathError; - struct wire_cst_BdkError_Signer Signer; - struct wire_cst_BdkError_InvalidNetwork InvalidNetwork; - struct wire_cst_BdkError_InvalidOutpoint InvalidOutpoint; - struct wire_cst_BdkError_Encode Encode; - struct wire_cst_BdkError_Miniscript Miniscript; - struct wire_cst_BdkError_MiniscriptPsbt MiniscriptPsbt; - struct wire_cst_BdkError_Bip32 Bip32; - struct wire_cst_BdkError_Bip39 Bip39; - struct wire_cst_BdkError_Secp256k1 Secp256k1; - struct wire_cst_BdkError_Json Json; - struct wire_cst_BdkError_Psbt Psbt; - struct wire_cst_BdkError_PsbtParse PsbtParse; - struct wire_cst_BdkError_MissingCachedScripts MissingCachedScripts; - struct wire_cst_BdkError_Electrum Electrum; - struct wire_cst_BdkError_Esplora Esplora; - struct wire_cst_BdkError_Sled Sled; - struct wire_cst_BdkError_Rpc Rpc; - struct wire_cst_BdkError_Rusqlite Rusqlite; - struct wire_cst_BdkError_InvalidInput InvalidInput; - struct wire_cst_BdkError_InvalidLockTime InvalidLockTime; - struct wire_cst_BdkError_InvalidTransaction InvalidTransaction; -} BdkErrorKind; - -typedef struct wire_cst_bdk_error { - int32_t tag; - union BdkErrorKind kind; -} wire_cst_bdk_error; - -typedef struct wire_cst_Payload_PubkeyHash { - struct wire_cst_list_prim_u_8_strict *pubkey_hash; -} wire_cst_Payload_PubkeyHash; - -typedef struct wire_cst_Payload_ScriptHash { - struct wire_cst_list_prim_u_8_strict *script_hash; -} wire_cst_Payload_ScriptHash; - -typedef struct wire_cst_Payload_WitnessProgram { - int32_t version; - struct wire_cst_list_prim_u_8_strict *program; -} wire_cst_Payload_WitnessProgram; - -typedef union PayloadKind { - struct wire_cst_Payload_PubkeyHash PubkeyHash; - struct wire_cst_Payload_ScriptHash ScriptHash; - struct wire_cst_Payload_WitnessProgram WitnessProgram; -} PayloadKind; - -typedef struct wire_cst_payload { - int32_t tag; - union PayloadKind kind; -} wire_cst_payload; - -typedef struct wire_cst_record_bdk_address_u_32 { - struct wire_cst_bdk_address field0; - uint32_t field1; -} wire_cst_record_bdk_address_u_32; - -typedef struct wire_cst_record_bdk_psbt_transaction_details { - struct wire_cst_bdk_psbt field0; - struct wire_cst_transaction_details field1; -} wire_cst_record_bdk_psbt_transaction_details; - -typedef struct wire_cst_Satisfaction_Partial { - uint64_t n; - uint64_t m; - struct wire_cst_list_prim_u_64_strict *items; - bool *sorted; - struct wire_cst_list_record_u_32_list_condition *conditions; -} wire_cst_Satisfaction_Partial; - -typedef struct wire_cst_Satisfaction_PartialComplete { - uint64_t n; - uint64_t m; - struct wire_cst_list_prim_u_64_strict *items; - bool *sorted; - struct wire_cst_list_record_list_prim_u_32_strict_list_condition *conditions; -} wire_cst_Satisfaction_PartialComplete; - -typedef struct wire_cst_Satisfaction_Complete { - struct wire_cst_condition *condition; -} wire_cst_Satisfaction_Complete; - -typedef struct wire_cst_Satisfaction_None { - struct wire_cst_list_prim_u_8_strict *msg; -} wire_cst_Satisfaction_None; - -typedef union SatisfactionKind { - struct wire_cst_Satisfaction_Partial Partial; - struct wire_cst_Satisfaction_PartialComplete PartialComplete; - struct wire_cst_Satisfaction_Complete Complete; - struct wire_cst_Satisfaction_None None; -} SatisfactionKind; - -typedef struct wire_cst_satisfaction { - int32_t tag; - union SatisfactionKind kind; -} wire_cst_satisfaction; - -typedef struct wire_cst_SatisfiableItem_EcdsaSignature { - struct wire_cst_pk_or_f *key; -} wire_cst_SatisfiableItem_EcdsaSignature; - -typedef struct wire_cst_SatisfiableItem_SchnorrSignature { - struct wire_cst_pk_or_f *key; -} wire_cst_SatisfiableItem_SchnorrSignature; - -typedef struct wire_cst_SatisfiableItem_Sha256Preimage { - struct wire_cst_list_prim_u_8_strict *hash; -} wire_cst_SatisfiableItem_Sha256Preimage; - -typedef struct wire_cst_SatisfiableItem_Hash256Preimage { - struct wire_cst_list_prim_u_8_strict *hash; -} wire_cst_SatisfiableItem_Hash256Preimage; - -typedef struct wire_cst_SatisfiableItem_Ripemd160Preimage { - struct wire_cst_list_prim_u_8_strict *hash; -} wire_cst_SatisfiableItem_Ripemd160Preimage; - -typedef struct wire_cst_SatisfiableItem_Hash160Preimage { - struct wire_cst_list_prim_u_8_strict *hash; -} wire_cst_SatisfiableItem_Hash160Preimage; - -typedef struct wire_cst_SatisfiableItem_AbsoluteTimelock { - struct wire_cst_lock_time *value; -} wire_cst_SatisfiableItem_AbsoluteTimelock; - -typedef struct wire_cst_SatisfiableItem_RelativeTimelock { - uint32_t value; -} wire_cst_SatisfiableItem_RelativeTimelock; - -typedef struct wire_cst_SatisfiableItem_Multisig { - struct wire_cst_list_pk_or_f *keys; - uint64_t threshold; -} wire_cst_SatisfiableItem_Multisig; - -typedef struct wire_cst_SatisfiableItem_Thresh { - struct wire_cst_list_bdk_policy *items; - uint64_t threshold; -} wire_cst_SatisfiableItem_Thresh; - -typedef union SatisfiableItemKind { - struct wire_cst_SatisfiableItem_EcdsaSignature EcdsaSignature; - struct wire_cst_SatisfiableItem_SchnorrSignature SchnorrSignature; - struct wire_cst_SatisfiableItem_Sha256Preimage Sha256Preimage; - struct wire_cst_SatisfiableItem_Hash256Preimage Hash256Preimage; - struct wire_cst_SatisfiableItem_Ripemd160Preimage Ripemd160Preimage; - struct wire_cst_SatisfiableItem_Hash160Preimage Hash160Preimage; - struct wire_cst_SatisfiableItem_AbsoluteTimelock AbsoluteTimelock; - struct wire_cst_SatisfiableItem_RelativeTimelock RelativeTimelock; - struct wire_cst_SatisfiableItem_Multisig Multisig; - struct wire_cst_SatisfiableItem_Thresh Thresh; -} SatisfiableItemKind; - -typedef struct wire_cst_satisfiable_item { - int32_t tag; - union SatisfiableItemKind kind; -} wire_cst_satisfiable_item; - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast(int64_t port_, - struct wire_cst_bdk_blockchain *ptr, - struct wire_cst_bdk_transaction *transaction); - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create(int64_t port_, - struct wire_cst_blockchain_config *blockchain_config); - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint64_t target); - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint32_t height); - -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height(int64_t port_, - struct wire_cst_bdk_blockchain *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string(struct wire_cst_bdk_descriptor *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight(struct wire_cst_bdk_descriptor *that); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new(int64_t port_, - struct wire_cst_list_prim_u_8_strict *descriptor, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, - struct wire_cst_list_prim_u_8_strict *fingerprint, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, - struct wire_cst_list_prim_u_8_strict *fingerprint, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, - struct wire_cst_list_prim_u_8_strict *fingerprint, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, - int32_t keychain_kind, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, - struct wire_cst_list_prim_u_8_strict *fingerprint, - int32_t keychain_kind, - int32_t network); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private(struct wire_cst_bdk_descriptor *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string(struct wire_cst_bdk_derivation_path *that); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *path); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string(struct wire_cst_bdk_descriptor_public_key *that); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *ptr, - struct wire_cst_bdk_derivation_path *path); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *ptr, - struct wire_cst_bdk_derivation_path *path); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *public_key); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public(struct wire_cst_bdk_descriptor_secret_key *ptr); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string(struct wire_cst_bdk_descriptor_secret_key *that); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create(int64_t port_, - int32_t network, - struct wire_cst_bdk_mnemonic *mnemonic, - struct wire_cst_list_prim_u_8_strict *password); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr, - struct wire_cst_bdk_derivation_path *path); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr, - struct wire_cst_bdk_derivation_path *path); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *secret_key); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes(struct wire_cst_bdk_descriptor_secret_key *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string(struct wire_cst_bdk_mnemonic *that); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy(int64_t port_, - struct wire_cst_list_prim_u_8_loose *entropy); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *mnemonic); - -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new(int64_t port_, int32_t word_count); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string(struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine(int64_t port_, - struct wire_cst_bdk_psbt *ptr, - struct wire_cst_bdk_psbt *other); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx(struct wire_cst_bdk_psbt *ptr); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate(struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str(int64_t port_, - struct wire_cst_list_prim_u_8_strict *psbt_base64); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string(struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script(int64_t port_, - struct wire_cst_bdk_script_buf *script, - int32_t network); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *address, - int32_t network); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network(struct wire_cst_bdk_address *that, - int32_t network); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network(struct wire_cst_bdk_address *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload(struct wire_cst_bdk_address *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script(struct wire_cst_bdk_address *ptr); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri(struct wire_cst_bdk_address *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction(struct wire_cst_bdk_policy *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string(struct wire_cst_bdk_script_buf *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty(void); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity(int64_t port_, - uintptr_t capacity); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes(int64_t port_, - struct wire_cst_list_prim_u_8_loose *transaction_bytes); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new(int64_t port_, - int32_t version, - struct wire_cst_lock_time *lock_time, - struct wire_cst_list_tx_in *input, - struct wire_cst_list_tx_out *output); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight(int64_t port_, - struct wire_cst_bdk_transaction *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance(struct wire_cst_bdk_wallet *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain(struct wire_cst_bdk_wallet *ptr, - int32_t keychain); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); - -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(int64_t port_, - struct wire_cst_bdk_wallet *that, - struct wire_cst_local_utxo *utxo, - bool only_witness_utxo, - struct wire_cst_psbt_sig_hash_type *sighash_type); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_script_buf *script); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions(struct wire_cst_bdk_wallet *that, - bool include_raw); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent(struct wire_cst_bdk_wallet *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network(struct wire_cst_bdk_wallet *that); - -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new(int64_t port_, - struct wire_cst_bdk_descriptor *descriptor, - struct wire_cst_bdk_descriptor *change_descriptor, - int32_t network, - struct wire_cst_database_config *database_config); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies(struct wire_cst_bdk_wallet *ptr, - int32_t keychain); - -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_psbt *psbt, - struct wire_cst_sign_options *sign_options); - -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_blockchain *blockchain); - -void frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder(int64_t port_, - struct wire_cst_list_prim_u_8_strict *txid, - float fee_rate, - struct wire_cst_bdk_address *allow_shrinking, - struct wire_cst_bdk_wallet *wallet, - bool enable_rbf, - uint32_t *n_sequence); - -void frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish(int64_t port_, - struct wire_cst_bdk_wallet *wallet, - struct wire_cst_list_script_amount *recipients, - struct wire_cst_list_out_point *utxos, - struct wire_cst_record_out_point_input_usize *foreign_utxo, - struct wire_cst_list_out_point *un_spendable, - int32_t change_policy, - bool manually_selected_only, - float *fee_rate, - uint64_t *fee_absolute, - bool drain_wallet, - struct wire_cst_bdk_script_buf *drain_to, - struct wire_cst_rbf_value *rbf, - struct wire_cst_list_record_string_list_prim_u_32_strict *internal_policy_path, - struct wire_cst_list_record_string_list_prim_u_32_strict *external_policy_path, - struct wire_cst_list_prim_u_8_loose *data); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); - -struct wire_cst_address_error *frbgen_bdk_flutter_cst_new_box_autoadd_address_error(void); - -struct wire_cst_address_index *frbgen_bdk_flutter_cst_new_box_autoadd_address_index(void); - -struct wire_cst_bdk_address *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address(void); - -struct wire_cst_bdk_blockchain *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain(void); - -struct wire_cst_bdk_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path(void); - -struct wire_cst_bdk_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor(void); - -struct wire_cst_bdk_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key(void); - -struct wire_cst_bdk_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key(void); - -struct wire_cst_bdk_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic(void); - -struct wire_cst_bdk_policy *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy(void); - -struct wire_cst_bdk_psbt *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt(void); - -struct wire_cst_bdk_script_buf *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf(void); - -struct wire_cst_bdk_transaction *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction(void); - -struct wire_cst_bdk_wallet *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet(void); - -struct wire_cst_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_block_time(void); - -struct wire_cst_blockchain_config *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config(void); - -bool *frbgen_bdk_flutter_cst_new_box_autoadd_bool(bool value); - -struct wire_cst_condition *frbgen_bdk_flutter_cst_new_box_autoadd_condition(void); - -struct wire_cst_consensus_error *frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error(void); - -struct wire_cst_database_config *frbgen_bdk_flutter_cst_new_box_autoadd_database_config(void); - -struct wire_cst_descriptor_error *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error(void); - -struct wire_cst_electrum_config *frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config(void); - -struct wire_cst_esplora_config *frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config(void); - -float *frbgen_bdk_flutter_cst_new_box_autoadd_f_32(float value); - -struct wire_cst_fee_rate *frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate(void); - -struct wire_cst_hex_error *frbgen_bdk_flutter_cst_new_box_autoadd_hex_error(void); - -struct wire_cst_local_utxo *frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo(void); - -struct wire_cst_lock_time *frbgen_bdk_flutter_cst_new_box_autoadd_lock_time(void); - -struct wire_cst_out_point *frbgen_bdk_flutter_cst_new_box_autoadd_out_point(void); - -struct wire_cst_pk_or_f *frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f(void); - -struct wire_cst_psbt_sig_hash_type *frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type(void); - -struct wire_cst_rbf_value *frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value(void); - -struct wire_cst_record_out_point_input_usize *frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize(void); - -struct wire_cst_rpc_config *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config(void); - -struct wire_cst_rpc_sync_params *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params(void); - -struct wire_cst_sign_options *frbgen_bdk_flutter_cst_new_box_autoadd_sign_options(void); - -struct wire_cst_sled_db_configuration *frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration(void); - -struct wire_cst_sqlite_db_configuration *frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration(void); - -uint32_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_32(uint32_t value); - -uint64_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_64(uint64_t value); - -uint8_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_8(uint8_t value); - -struct wire_cst_list_bdk_policy *frbgen_bdk_flutter_cst_new_list_bdk_policy(int32_t len); - -struct wire_cst_list_condition *frbgen_bdk_flutter_cst_new_list_condition(int32_t len); - -struct wire_cst_list_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict(int32_t len); - -struct wire_cst_list_local_utxo *frbgen_bdk_flutter_cst_new_list_local_utxo(int32_t len); - -struct wire_cst_list_out_point *frbgen_bdk_flutter_cst_new_list_out_point(int32_t len); - -struct wire_cst_list_pk_or_f *frbgen_bdk_flutter_cst_new_list_pk_or_f(int32_t len); - -struct wire_cst_list_prim_u_32_strict *frbgen_bdk_flutter_cst_new_list_prim_u_32_strict(int32_t len); - -struct wire_cst_list_prim_u_64_strict *frbgen_bdk_flutter_cst_new_list_prim_u_64_strict(int32_t len); - -struct wire_cst_list_prim_u_8_loose *frbgen_bdk_flutter_cst_new_list_prim_u_8_loose(int32_t len); - -struct wire_cst_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_prim_u_8_strict(int32_t len); - -struct wire_cst_list_record_list_prim_u_32_strict_list_condition *frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition(int32_t len); - -struct wire_cst_list_record_string_list_prim_u_32_strict *frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict(int32_t len); - -struct wire_cst_list_record_u_32_list_condition *frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition(int32_t len); - -struct wire_cst_list_script_amount *frbgen_bdk_flutter_cst_new_list_script_amount(int32_t len); - -struct wire_cst_list_transaction_details *frbgen_bdk_flutter_cst_new_list_transaction_details(int32_t len); - -struct wire_cst_list_tx_in *frbgen_bdk_flutter_cst_new_list_tx_in(int32_t len); - -struct wire_cst_list_tx_out *frbgen_bdk_flutter_cst_new_list_tx_out(int32_t len); -static int64_t dummy_method_to_enforce_bundling(void) { - int64_t dummy_var = 0; - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_address_error); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_address_index); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_block_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bool); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_condition); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_database_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_f_32); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_hex_error); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_out_point); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sign_options); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_32); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_64); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_8); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_bdk_policy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_condition); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_local_utxo); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_out_point); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_pk_or_f); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_32_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_64_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_loose); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_script_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_transaction_details); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_in); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_out); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish); - dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); - return dummy_var; -} diff --git a/macos/bdk_flutter.podspec b/macos/bdk_flutter.podspec deleted file mode 100644 index 5e88ecd3..00000000 --- a/macos/bdk_flutter.podspec +++ /dev/null @@ -1,36 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'bdk_flutter' - s.version = "0.31.3" - s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' - s.description = <<-DESC - A new Flutter plugin 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.platform = :osx, '10.11' - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } - s.swift_version = '5.0' - s.dependency 'FlutterMacOS' - s.osx.deployment_target = '14.0' - s.script_phase = { - :name => 'Build Rust library', - # First argument is relative path to the `rust` folder, second is name of rust library - :script => 'sh "$PODS_TARGET_SRCROOT/../cargokit/build_pod.sh" ../rust bdk_flutter', - :execution_position => :before_compile, - :input_files => ['${BUILT_PRODUCTS_DIR}/cargokit_phony'], - # Let XCode know that the static library referenced in -force_load below is - # created by this build step. - :output_files => ["${BUILT_PRODUCTS_DIR}/libbdk_flutter.a"], - } - s.pod_target_xcconfig = { - 'DEFINES_MODULE' => 'YES', - 'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/libbdk_flutter.a', - 'DEAD_CODE_STRIPPING' => 'YES', - 'STRIP_INSTALLED_PRODUCT[config=Release][sdk=*][arch=*]' => "YES", - 'STRIP_STYLE[config=Release][sdk=*][arch=*]' => "non-global", - 'DEPLOYMENT_POSTPROCESSING[config=Release][sdk=*][arch=*]' => "YES", - } -end diff --git a/makefile b/makefile deleted file mode 100644 index a003e3c9..00000000 --- a/makefile +++ /dev/null @@ -1,29 +0,0 @@ -.DEFAULT_GOAL := help -PROJECTNAME=$(shell basename "$(PWD)") - -.PHONY: help -help: makefile - @echo - @echo " Available actions in "$(PROJECTNAME)":" - @echo - @sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /' - @echo - -## init: Install missing dependencies. -init: - cargo install flutter_rust_bridge_codegen --version 2.0.0 -## : - -all: init generate-bindings - -generate-bindings: - @echo "[GENERATING FRB CODE] $@" - flutter_rust_bridge_codegen generate - @echo "[Done ✅]" - - - - - - - diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index 1d3c7320..00000000 --- a/pubspec.lock +++ /dev/null @@ -1,621 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" - url: "https://pub.dev" - source: hosted - version: "67.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" - url: "https://pub.dev" - source: hosted - version: "6.4.1" - args: - dependency: transitive - description: - name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" - url: "https://pub.dev" - source: hosted - version: "2.5.0" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - build_cli_annotations: - dependency: transitive - description: - name: build_cli_annotations - sha256: b59d2769769efd6c9ff6d4c4cede0be115a566afc591705c2040b707534b1172 - url: "https://pub.dev" - source: hosted - version: "2.1.0" - build_config: - dependency: transitive - description: - name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 - url: "https://pub.dev" - source: hosted - version: "1.1.1" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - build_runner: - dependency: "direct dev" - description: - name: build_runner - sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" - url: "https://pub.dev" - source: hosted - version: "2.4.11" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe - url: "https://pub.dev" - source: hosted - version: "7.3.1" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb - url: "https://pub.dev" - source: hosted - version: "8.9.2" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.dev" - source: hosted - version: "2.0.3" - cli_util: - dependency: transitive - description: - name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 - url: "https://pub.dev" - source: hosted - version: "0.4.1" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 - url: "https://pub.dev" - source: hosted - version: "4.10.0" - collection: - dependency: "direct main" - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" - url: "https://pub.dev" - source: hosted - version: "2.3.6" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - ffi: - dependency: "direct main" - description: - name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" - url: "https://pub.dev" - source: hosted - version: "2.1.3" - ffigen: - dependency: "direct dev" - description: - name: ffigen - sha256: "3e12e80ccb6539bb3917217bb6f32709220efb737de0d0fa8736da0b7cb507da" - url: "https://pub.dev" - source: hosted - version: "12.0.0" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_rust_bridge: - dependency: "direct main" - description: - name: flutter_rust_bridge - sha256: f703c4b50e253e53efc604d50281bbaefe82d615856f8ae1e7625518ae252e98 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - freezed: - dependency: "direct dev" - description: - name: freezed - sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 - url: "https://pub.dev" - source: hosted - version: "2.5.2" - freezed_annotation: - dependency: "direct main" - description: - name: freezed_annotation - sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 - url: "https://pub.dev" - source: hosted - version: "2.4.4" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - graphs: - dependency: transitive - description: - name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 - url: "https://pub.dev" - source: hosted - version: "2.3.1" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - io: - dependency: transitive - description: - name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf - url: "https://pub.dev" - source: hosted - version: "0.7.1" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" - url: "https://pub.dev" - source: hosted - version: "10.0.5" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" - url: "https://pub.dev" - source: hosted - version: "3.0.5" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - lints: - dependency: "direct dev" - description: - name: lints - sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb - url: "https://pub.dev" - source: hosted - version: "0.12.16+1" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: "direct main" - description: - name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 - url: "https://pub.dev" - source: hosted - version: "1.15.0" - mime: - dependency: transitive - description: - name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" - url: "https://pub.dev" - source: hosted - version: "1.0.5" - mockito: - dependency: "direct main" - description: - name: mockito - sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" - url: "https://pub.dev" - source: hosted - version: "5.4.4" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - path: - dependency: transitive - description: - name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" - url: "https://pub.dev" - source: hosted - version: "1.9.0" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - quiver: - dependency: transitive - description: - name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 - url: "https://pub.dev" - source: hosted - version: "3.2.1" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" - url: "https://pub.dev" - source: hosted - version: "0.7.2" - timing: - dependency: transitive - description: - name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" - url: "https://pub.dev" - source: hosted - version: "14.2.5" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - web_socket: - dependency: transitive - description: - name: web_socket - sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" - url: "https://pub.dev" - source: hosted - version: "0.1.5" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 - url: "https://pub.dev" - source: hosted - version: "3.0.0" - yaml: - dependency: transitive - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" - yaml_edit: - dependency: transitive - description: - name: yaml_edit - sha256: e9c1a3543d2da0db3e90270dbb1e4eebc985ee5e3ffe468d83224472b2194a5f - url: "https://pub.dev" - source: hosted - version: "2.2.1" -sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.yaml b/pubspec.yaml deleted file mode 100644 index f2c2ee14..00000000 --- a/pubspec.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: bdk_flutter -description: A Flutter library for the Bitcoin Development Kit(bdk) (https://bitcoindevkit.org/) -version: 0.31.3 -homepage: https://github.com/LtbLightning/bdk-flutter - -environment: - sdk: ">=3.1.5 <4.0.0" - flutter: ">=3.0.0" - -dependencies: - flutter: - sdk: flutter - flutter_rust_bridge: ">=2.0.0 < 2.1.0" - ffi: ^2.1.3 - freezed_annotation: ^2.4.4 - mockito: ^5.4.4 - collection: ^1.18.0 - meta: ^1.15.0 - -dev_dependencies: - flutter_test: - sdk: flutter - ffigen: ^12.0.0 - freezed: ^2.5.2 - build_runner: ^2.4.8 - lints: ^5.0.0 - -flutter: - plugin: - platforms: - android: - ffiPlugin: true - ios: - ffiPlugin: true - macos: - ffiPlugin: true diff --git a/run_build_tool.cmd b/run_build_tool.cmd new file mode 100644 index 00000000..c45d0aa8 --- /dev/null +++ b/run_build_tool.cmd @@ -0,0 +1,91 @@ +@echo off +setlocal + +setlocal ENABLEDELAYEDEXPANSION + +SET BASEDIR=%~dp0 + +if not exist "%CARGOKIT_TOOL_TEMP_DIR%" ( + mkdir "%CARGOKIT_TOOL_TEMP_DIR%" +) +cd /D "%CARGOKIT_TOOL_TEMP_DIR%" + +SET BUILD_TOOL_PKG_DIR=%BASEDIR%build_tool +SET DART=%FLUTTER_ROOT%\bin\cache\dart-sdk\bin\dart + +set BUILD_TOOL_PKG_DIR_POSIX=%BUILD_TOOL_PKG_DIR:\=/% + +( + echo name: build_tool_runner + echo version: 1.0.0 + echo publish_to: none + echo. + echo environment: + echo sdk: '^>=3.0.0 ^<4.0.0' + echo. + echo dependencies: + echo build_tool: + echo path: %BUILD_TOOL_PKG_DIR_POSIX% +) >pubspec.yaml + +if not exist bin ( + mkdir bin +) + +( + echo import 'package:build_tool/build_tool.dart' as build_tool; + echo void main^(List^ args^) ^{ + echo build_tool.runMain^(args^); + echo ^} +) >bin\build_tool_runner.dart + +SET PRECOMPILED=bin\build_tool_runner.dill + +REM To detect changes in package we compare output of DIR /s (recursive) +set PREV_PACKAGE_INFO=.dart_tool\package_info.prev +set CUR_PACKAGE_INFO=.dart_tool\package_info.cur + +DIR "%BUILD_TOOL_PKG_DIR%" /s > "%CUR_PACKAGE_INFO%_orig" + +REM Last line in dir output is free space on harddrive. That is bound to +REM change between invocation so we need to remove it +( + Set "Line=" + For /F "UseBackQ Delims=" %%A In ("%CUR_PACKAGE_INFO%_orig") Do ( + SetLocal EnableDelayedExpansion + If Defined Line Echo !Line! + EndLocal + Set "Line=%%A") +) >"%CUR_PACKAGE_INFO%" +DEL "%CUR_PACKAGE_INFO%_orig" + +REM Compare current directory listing with previous +FC /B "%CUR_PACKAGE_INFO%" "%PREV_PACKAGE_INFO%" > nul 2>&1 + +If %ERRORLEVEL% neq 0 ( + REM Changed - copy current to previous and remove precompiled kernel + if exist "%PREV_PACKAGE_INFO%" ( + DEL "%PREV_PACKAGE_INFO%" + ) + MOVE /Y "%CUR_PACKAGE_INFO%" "%PREV_PACKAGE_INFO%" + if exist "%PRECOMPILED%" ( + DEL "%PRECOMPILED%" + ) +) + +REM There is no CUR_PACKAGE_INFO it was renamed in previous step to %PREV_PACKAGE_INFO% +REM which means we need to do pub get and precompile +if not exist "%PRECOMPILED%" ( + echo Running pub get in "%cd%" + "%DART%" pub get --no-precompile + "%DART%" compile kernel bin/build_tool_runner.dart +) + +"%DART%" "%PRECOMPILED%" %* + +REM 253 means invalid snapshot version. +If %ERRORLEVEL% equ 253 ( + "%DART%" pub get --no-precompile + "%DART%" compile kernel bin/build_tool_runner.dart + "%DART%" "%PRECOMPILED%" %* +) diff --git a/run_build_tool.sh b/run_build_tool.sh new file mode 100755 index 00000000..24b0ed89 --- /dev/null +++ b/run_build_tool.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash + +set -e + +BASEDIR=$(dirname "$0") + +mkdir -p "$CARGOKIT_TOOL_TEMP_DIR" + +cd "$CARGOKIT_TOOL_TEMP_DIR" + +# Write a very simple bin package in temp folder that depends on build_tool package +# from Cargokit. This is done to ensure that we don't pollute Cargokit folder +# with .dart_tool contents. + +BUILD_TOOL_PKG_DIR="$BASEDIR/build_tool" + +if [[ -z $FLUTTER_ROOT ]]; then # not defined + DART=dart +else + DART="$FLUTTER_ROOT/bin/cache/dart-sdk/bin/dart" +fi + +cat << EOF > "pubspec.yaml" +name: build_tool_runner +version: 1.0.0 +publish_to: none + +environment: + sdk: '>=3.0.0 <4.0.0' + +dependencies: + build_tool: + path: "$BUILD_TOOL_PKG_DIR" +EOF + +mkdir -p "bin" + +cat << EOF > "bin/build_tool_runner.dart" +import 'package:build_tool/build_tool.dart' as build_tool; +void main(List args) { + build_tool.runMain(args); +} +EOF + +# Create alias for `shasum` if it does not exist and `sha1sum` exists +if ! [ -x "$(command -v shasum)" ] && [ -x "$(command -v sha1sum)" ]; then + shopt -s expand_aliases + alias shasum="sha1sum" +fi + +# Dart run will not cache any package that has a path dependency, which +# is the case for our build_tool_runner. So instead we precompile the package +# ourselves. +# To invalidate the cached kernel we use the hash of ls -LR of the build_tool +# package directory. This should be good enough, as the build_tool package +# itself is not meant to have any path dependencies. + +if [[ "$OSTYPE" == "darwin"* ]]; then + PACKAGE_HASH=$(ls -lTR "$BUILD_TOOL_PKG_DIR" | shasum) +else + PACKAGE_HASH=$(ls -lR --full-time "$BUILD_TOOL_PKG_DIR" | shasum) +fi + +PACKAGE_HASH_FILE=".package_hash" + +if [ -f "$PACKAGE_HASH_FILE" ]; then + EXISTING_HASH=$(cat "$PACKAGE_HASH_FILE") + if [ "$PACKAGE_HASH" != "$EXISTING_HASH" ]; then + rm "$PACKAGE_HASH_FILE" + fi +fi + +# Run pub get if needed. +if [ ! -f "$PACKAGE_HASH_FILE" ]; then + "$DART" pub get --no-precompile + "$DART" compile kernel bin/build_tool_runner.dart + echo "$PACKAGE_HASH" > "$PACKAGE_HASH_FILE" +fi + +# Rebuild the tool if it was deleted by Android Studio +if [ ! -f "bin/build_tool_runner.dill" ]; then + "$DART" compile kernel bin/build_tool_runner.dart +fi + +set +e + +"$DART" bin/build_tool_runner.dill "$@" + +exit_code=$? + +# 253 means invalid snapshot version. +if [ $exit_code == 253 ]; then + "$DART" pub get --no-precompile + "$DART" compile kernel bin/build_tool_runner.dart + "$DART" bin/build_tool_runner.dill "$@" + exit_code=$? +fi + +exit $exit_code diff --git a/rust/Cargo.lock b/rust/Cargo.lock deleted file mode 100644 index 4e3fbdf7..00000000 --- a/rust/Cargo.lock +++ /dev/null @@ -1,1592 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allo-isolate" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b6d794345b06592d0ebeed8e477e41b71e5a0a49df4fc0e4184d5938b99509" -dependencies = [ - "anyhow", - "atomic", - "backtrace", -] - -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "android_log-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ecc8056bf6ab9892dcd53216c83d1597487d7dacac16c8df6b877d127df9937" - -[[package]] -name = "android_logger" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c494134f746c14dc653a35a4ea5aca24ac368529da5370ecf41fe0341c35772f" -dependencies = [ - "android_log-sys", - "env_logger", - "log", - "once_cell", -] - -[[package]] -name = "anyhow" -version = "1.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" - -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - -[[package]] -name = "async-trait" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "atomic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" - -[[package]] -name = "autocfg" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" - -[[package]] -name = "backtrace" -version = "0.3.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "bdk" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc1fc1a92e0943bfbcd6eb7d32c1b2a79f2f1357eb1e2eee9d7f36d6d7ca44a" -dependencies = [ - "ahash 0.7.8", - "async-trait", - "bdk-macros", - "bip39", - "bitcoin", - "core-rpc", - "electrum-client", - "esplora-client", - "getrandom", - "js-sys", - "log", - "miniscript", - "rand", - "rusqlite", - "serde", - "serde_json", - "sled", - "tokio", -] - -[[package]] -name = "bdk-macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c1980e50ae23bb6efa9283ae8679d6ea2c6fa6a99fe62533f65f4a25a1a56c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bdk_flutter" -version = "0.31.3" -dependencies = [ - "anyhow", - "assert_matches", - "bdk", - "flutter_rust_bridge", - "rand", - "serde", - "serde_json", -] - -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - -[[package]] -name = "bip39" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" -dependencies = [ - "bitcoin_hashes 0.11.0", - "serde", - "unicode-normalization", -] - -[[package]] -name = "bitcoin" -version = "0.30.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1945a5048598e4189e239d3f809b19bdad4845c4b2ba400d304d2dcf26d2c462" -dependencies = [ - "base64 0.13.1", - "bech32", - "bitcoin-private", - "bitcoin_hashes 0.12.0", - "hex_lit", - "secp256k1", - "serde", -] - -[[package]] -name = "bitcoin-internals" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f9997f8650dd818369931b5672a18dbef95324d0513aa99aae758de8ce86e5b" - -[[package]] -name = "bitcoin-private" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" - -[[package]] -name = "bitcoin_hashes" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" - -[[package]] -name = "bitcoin_hashes" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" -dependencies = [ - "bitcoin-private", - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "build-target" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832133bbabbbaa9fbdba793456a2827627a7d2b8fb96032fa1e7666d7895832b" - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bytemuck" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "cc" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - -[[package]] -name = "core-rpc" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d77079e1b71c2778d6e1daf191adadcd4ff5ec3ccad8298a79061d865b235b" -dependencies = [ - "bitcoin-private", - "core-rpc-json", - "jsonrpc", - "log", - "serde", - "serde_json", -] - -[[package]] -name = "core-rpc-json" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581898ed9a83f31c64731b1d8ca2dfffcfec14edf1635afacd5234cddbde3a41" -dependencies = [ - "bitcoin", - "bitcoin-private", - "serde", - "serde_json", -] - -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "dart-sys-fork" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dafff26172b719bb9695dd3715a1e7792f62dcdc8a5d4c740db7e0fedee8b" -dependencies = [ - "cc", -] - -[[package]] -name = "dashmap" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" -dependencies = [ - "cfg-if", - "num_cpus", -] - -[[package]] -name = "delegate-attr" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51aac4c99b2e6775164b412ea33ae8441b2fde2dbf05a20bc0052a63d08c475b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "electrum-client" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bc133f1c8d829d254f013f946653cbeb2b08674b960146361d1e9b67733ad19" -dependencies = [ - "bitcoin", - "bitcoin-private", - "byteorder", - "libc", - "log", - "rustls 0.21.10", - "serde", - "serde_json", - "webpki", - "webpki-roots 0.22.6", - "winapi", -] - -[[package]] -name = "env_logger" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "esplora-client" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb1f7f2489cce83bc3bd92784f9ba5271eeb6e729b975895fc541f78cbfcdca" -dependencies = [ - "bitcoin", - "bitcoin-internals", - "log", - "serde", - "ureq", -] - -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flutter_rust_bridge" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033e831e28f1077ceae3490fb6d093dfdefefd09c5c6e8544c6579effe7e814f" -dependencies = [ - "allo-isolate", - "android_logger", - "anyhow", - "build-target", - "bytemuck", - "byteorder", - "console_error_panic_hook", - "dart-sys-fork", - "delegate-attr", - "flutter_rust_bridge_macros", - "futures", - "js-sys", - "lazy_static", - "oslog", - "threadpool", - "tokio", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "flutter_rust_bridge_macros" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0217fc4b7131b52578be60bbe38c76b3edfc2f9fecab46d9f930510f40ef9023" -dependencies = [ - "hex", - "md-5", - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -dependencies = [ - "ahash 0.8.11", - "allocator-api2", -] - -[[package]] -name = "hashlink" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" -dependencies = [ - "hashbrown", -] - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex_lit" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "jsonrpc" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd8d6b3f301ba426b30feca834a2a18d48d5b54e5065496b5c1b05537bee3639" -dependencies = [ - "base64 0.13.1", - "serde", - "serde_json", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libsqlite3-sys" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f835d03d717946d28b1d1ed632eb6f0e24a299388ee623d0c23118d3e8a7fa" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "miniscript" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eb102b66b2127a872dbcc73095b7b47aeb9d92f7b03c2b2298253ffc82c7594" -dependencies = [ - "bitcoin", - "bitcoin-private", - "serde", -] - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "oslog" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8343ce955f18e7e68c0207dd0ea776ec453035685395ababd2ea651c569728b3" -dependencies = [ - "cc", - "dashmap", - "log", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro2" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56dea16b0a29e94408b9aa5e2940a4eedbd128a1ba20e8f7ae60fd3d465af0e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys", -] - -[[package]] -name = "rusqlite" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a" -dependencies = [ - "bitflags", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink", - "libsqlite3-sys", - "smallvec", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" -dependencies = [ - "log", - "ring", - "rustls-pki-types", - "rustls-webpki 0.102.2", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.102.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "ryu" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "secp256k1" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" -dependencies = [ - "bitcoin_hashes 0.12.0", - "rand", - "secp256k1-sys", - "serde", -] - -[[package]] -name = "secp256k1-sys" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" -dependencies = [ - "cc", -] - -[[package]] -name = "serde" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "serde_json" -version = "1.0.115" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "sled" -version = "0.34.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" -dependencies = [ - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socks" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b" -dependencies = [ - "byteorder", - "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" -dependencies = [ - "backtrace", - "num_cpus", - "pin-project-lite", - "tokio-macros", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "ureq" -version = "2.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35" -dependencies = [ - "base64 0.21.7", - "flate2", - "log", - "once_cell", - "rustls 0.22.3", - "rustls-pki-types", - "rustls-webpki 0.102.2", - "serde", - "serde_json", - "socks", - "url", - "webpki-roots 0.26.1", -] - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.59", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] - -[[package]] -name = "webpki-roots" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/rust/Cargo.toml b/rust/Cargo.toml deleted file mode 100644 index c8372212..00000000 --- a/rust/Cargo.toml +++ /dev/null @@ -1,29 +0,0 @@ -[package] -name = "bdk_flutter" -version = "0.31.3" -edition = "2021" - -[lib] -crate-type = ["staticlib", "cdylib"] -[dev-dependencies] -assert_matches = "1.5" -anyhow = "1.0.68" -[dependencies] -flutter_rust_bridge = "=2.0.0" -rand = "0.8" -bdk = { version = "0.29.0", features = [ - "all-keys", - "use-esplora-ureq", - "sqlite-bundled", - "rpc", -] } -serde = "1.0.89" -serde_json = "1.0.96" -anyhow = "1.0.68" - -[profile.release] -strip = true -opt-level = 3 -lto = true -codegen-units = 1 -panic = "abort" diff --git a/rust/cargokit.yaml b/rust/cargokit.yaml deleted file mode 100644 index 4657395e..00000000 --- a/rust/cargokit.yaml +++ /dev/null @@ -1,6 +0,0 @@ -cargo: - release: - toolchain: stable -precompiled_binaries: - url_prefix: https://github.com/LtbLightning/bdk-flutter/releases/download/precompiled_ - public_key: 0e43d5e8452d00db7f3000c18fb1ba796babfcb5dc6306bb0629eff24f8be85b \ No newline at end of file diff --git a/rust/src/api/blockchain.rs b/rust/src/api/blockchain.rs deleted file mode 100644 index c27bef2f..00000000 --- a/rust/src/api/blockchain.rs +++ /dev/null @@ -1,207 +0,0 @@ -use crate::api::types::{BdkTransaction, FeeRate, Network}; - -use crate::api::error::BdkError; -use crate::frb_generated::RustOpaque; -use bdk::bitcoin::Transaction; - -use bdk::blockchain::esplora::EsploraBlockchainConfig; - -pub use bdk::blockchain::{ - AnyBlockchainConfig, Blockchain, ConfigurableBlockchain, ElectrumBlockchainConfig, - GetBlockHash, GetHeight, -}; - -use std::path::PathBuf; - -pub struct BdkBlockchain { - pub ptr: RustOpaque, -} - -impl From for BdkBlockchain { - fn from(value: bdk::blockchain::AnyBlockchain) -> Self { - Self { - ptr: RustOpaque::new(value), - } - } -} -impl BdkBlockchain { - pub fn create(blockchain_config: BlockchainConfig) -> Result { - let any_blockchain_config = match blockchain_config { - BlockchainConfig::Electrum { config } => { - AnyBlockchainConfig::Electrum(ElectrumBlockchainConfig { - retry: config.retry, - socks5: config.socks5, - timeout: config.timeout, - url: config.url, - stop_gap: config.stop_gap as usize, - validate_domain: config.validate_domain, - }) - } - BlockchainConfig::Esplora { config } => { - AnyBlockchainConfig::Esplora(EsploraBlockchainConfig { - base_url: config.base_url, - proxy: config.proxy, - concurrency: config.concurrency, - stop_gap: config.stop_gap as usize, - timeout: config.timeout, - }) - } - BlockchainConfig::Rpc { config } => { - AnyBlockchainConfig::Rpc(bdk::blockchain::rpc::RpcConfig { - url: config.url, - auth: config.auth.into(), - network: config.network.into(), - wallet_name: config.wallet_name, - sync_params: config.sync_params.map(|p| p.into()), - }) - } - }; - let blockchain = bdk::blockchain::AnyBlockchain::from_config(&any_blockchain_config)?; - Ok(blockchain.into()) - } - pub(crate) fn get_blockchain(&self) -> RustOpaque { - self.ptr.clone() - } - pub fn broadcast(ptr: BdkBlockchain, transaction: &BdkTransaction) -> Result { - let tx: Transaction = transaction.try_into()?; - ptr.get_blockchain().broadcast(&tx)?; - Ok(tx.txid().to_string()) - } - - pub fn estimate_fee(&self, target: u64) -> Result { - self.get_blockchain() - .estimate_fee(target as usize) - .map_err(|e| e.into()) - .map(|e| e.into()) - } - - pub fn get_height(&self) -> Result { - self.get_blockchain().get_height().map_err(|e| e.into()) - } - - pub fn get_block_hash(&self, height: u32) -> Result { - self.get_blockchain() - .get_block_hash(u64::from(height)) - .map(|hash| hash.to_string()) - .map_err(|e| e.into()) - } -} -/// Configuration for an ElectrumBlockchain -pub struct ElectrumConfig { - /// URL of the Electrum server (such as ElectrumX, Esplora, BWT) may start with ssl:// or tcp:// and include a port - /// e.g. ssl://electrum.blockstream.info:60002 - pub url: String, - /// URL of the socks5 proxy server or a Tor service - pub socks5: Option, - /// Request retry count - pub retry: u8, - /// Request timeout (seconds) - pub timeout: Option, - /// Stop searching addresses for transactions after finding an unused gap of this length - pub stop_gap: u64, - /// Validate the domain when using SSL - pub validate_domain: bool, -} - -/// Configuration for an EsploraBlockchain -pub struct EsploraConfig { - /// Base URL of the esplora service - /// e.g. https://blockstream.info/api/ - pub base_url: String, - /// Optional URL of the proxy to use to make requests to the Esplora server - /// The string should be formatted as: ://:@host:. - /// Note that the format of this value and the supported protocols change slightly between the - /// sync version of esplora (using ureq) and the async version (using reqwest). For more - /// details check with the documentation of the two crates. Both of them are compiled with - /// the socks feature enabled. - /// The proxy is ignored when targeting wasm32. - pub proxy: Option, - /// Number of parallel requests sent to the esplora service (default: 4) - pub concurrency: Option, - /// Stop searching addresses for transactions after finding an unused gap of this length. - pub stop_gap: u64, - /// Socket timeout. - pub timeout: Option, -} - -pub enum Auth { - /// No authentication - None, - /// Authentication with username and password. - UserPass { - /// Username - username: String, - /// Password - password: String, - }, - /// Authentication with a cookie file - Cookie { - /// Cookie file - file: String, - }, -} - -impl From for bdk::blockchain::rpc::Auth { - fn from(auth: Auth) -> Self { - match auth { - Auth::None => bdk::blockchain::rpc::Auth::None, - Auth::UserPass { username, password } => { - bdk::blockchain::rpc::Auth::UserPass { username, password } - } - Auth::Cookie { file } => bdk::blockchain::rpc::Auth::Cookie { - file: PathBuf::from(file), - }, - } - } -} - -/// Sync parameters for Bitcoin Core RPC. -/// -/// In general, BDK tries to sync `scriptPubKey`s cached in `Database` with -/// `scriptPubKey`s imported in the Bitcoin Core Wallet. These parameters are used for determining -/// how the `importdescriptors` RPC calls are to be made. -pub struct RpcSyncParams { - /// The minimum number of scripts to scan for on initial sync. - pub start_script_count: u64, - /// Time in unix seconds in which initial sync will start scanning from (0 to start from genesis). - pub start_time: u64, - /// Forces every sync to use `start_time` as import timestamp. - pub force_start_time: bool, - /// RPC poll rate (in seconds) to get state updates. - pub poll_rate_sec: u64, -} - -impl From for bdk::blockchain::rpc::RpcSyncParams { - fn from(params: RpcSyncParams) -> Self { - bdk::blockchain::rpc::RpcSyncParams { - start_script_count: params.start_script_count as usize, - start_time: params.start_time, - force_start_time: params.force_start_time, - poll_rate_sec: params.poll_rate_sec, - } - } -} - -/// RpcBlockchain configuration options -pub struct RpcConfig { - /// The bitcoin node url - pub url: String, - /// The bitcoin node authentication mechanism - pub auth: Auth, - /// The network we are using (it will be checked the bitcoin node network matches this) - pub network: Network, - /// The wallet name in the bitcoin node. - pub wallet_name: String, - /// Sync parameters - pub sync_params: Option, -} - -/// Type that can contain any of the blockchain configurations defined by the library. -pub enum BlockchainConfig { - /// Electrum client - Electrum { config: ElectrumConfig }, - /// Esplora client - Esplora { config: EsploraConfig }, - /// Bitcoin Core RPC client - Rpc { config: RpcConfig }, -} diff --git a/rust/src/api/descriptor.rs b/rust/src/api/descriptor.rs deleted file mode 100644 index e7f6f0d2..00000000 --- a/rust/src/api/descriptor.rs +++ /dev/null @@ -1,274 +0,0 @@ -use crate::api::error::BdkError; -use crate::api::key::{BdkDescriptorPublicKey, BdkDescriptorSecretKey}; -use crate::api::types::{KeychainKind, Network}; -use crate::frb_generated::RustOpaque; -use bdk::bitcoin::bip32::Fingerprint; -use bdk::bitcoin::key::Secp256k1; -pub use bdk::descriptor::IntoWalletDescriptor; -pub use bdk::keys; -use bdk::template::{ - Bip44, Bip44Public, Bip49, Bip49Public, Bip84, Bip84Public, Bip86, Bip86Public, - DescriptorTemplate, -}; -use flutter_rust_bridge::frb; -use std::str::FromStr; - -#[derive(Debug)] -pub struct BdkDescriptor { - pub extended_descriptor: RustOpaque, - pub key_map: RustOpaque, -} - -impl BdkDescriptor { - pub fn new(descriptor: String, network: Network) -> Result { - let secp = Secp256k1::new(); - let (extended_descriptor, key_map) = - descriptor.into_wallet_descriptor(&secp, network.into())?; - Ok(Self { - extended_descriptor: RustOpaque::new(extended_descriptor), - key_map: RustOpaque::new(key_map), - }) - } - - pub fn new_bip44( - secret_key: BdkDescriptorSecretKey, - keychain_kind: KeychainKind, - network: Network, - ) -> Result { - let derivable_key = &*secret_key.ptr; - match derivable_key { - keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { - let derivable_key = descriptor_x_key.xkey; - let (extended_descriptor, key_map, _) = - Bip44(derivable_key, keychain_kind.into()).build(network.into())?; - Ok(Self { - extended_descriptor: RustOpaque::new(extended_descriptor), - key_map: RustOpaque::new(key_map), - }) - } - keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - pub fn new_bip44_public( - public_key: BdkDescriptorPublicKey, - fingerprint: String, - keychain_kind: KeychainKind, - network: Network, - ) -> Result { - let fingerprint = Fingerprint::from_str(fingerprint.as_str()) - .map_err(|e| BdkError::Generic(e.to_string()))?; - let derivable_key = &*public_key.ptr; - match derivable_key { - keys::DescriptorPublicKey::XPub(descriptor_x_key) => { - let derivable_key = descriptor_x_key.xkey; - let (extended_descriptor, key_map, _) = - Bip44Public(derivable_key, fingerprint, keychain_kind.into()) - .build(network.into())?; - - Ok(Self { - extended_descriptor: RustOpaque::new(extended_descriptor), - key_map: RustOpaque::new(key_map), - }) - } - keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - pub fn new_bip49( - secret_key: BdkDescriptorSecretKey, - keychain_kind: KeychainKind, - network: Network, - ) -> Result { - let derivable_key = &*secret_key.ptr; - match derivable_key { - keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { - let derivable_key = descriptor_x_key.xkey; - let (extended_descriptor, key_map, _) = - Bip49(derivable_key, keychain_kind.into()).build(network.into())?; - Ok(Self { - extended_descriptor: RustOpaque::new(extended_descriptor), - key_map: RustOpaque::new(key_map), - }) - } - keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - pub fn new_bip49_public( - public_key: BdkDescriptorPublicKey, - fingerprint: String, - keychain_kind: KeychainKind, - network: Network, - ) -> Result { - let fingerprint = Fingerprint::from_str(fingerprint.as_str()) - .map_err(|e| BdkError::Generic(e.to_string()))?; - let derivable_key = &*public_key.ptr; - - match derivable_key { - keys::DescriptorPublicKey::XPub(descriptor_x_key) => { - let derivable_key = descriptor_x_key.xkey; - let (extended_descriptor, key_map, _) = - Bip49Public(derivable_key, fingerprint, keychain_kind.into()) - .build(network.into())?; - - Ok(Self { - extended_descriptor: RustOpaque::new(extended_descriptor), - key_map: RustOpaque::new(key_map), - }) - } - keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - pub fn new_bip84( - secret_key: BdkDescriptorSecretKey, - keychain_kind: KeychainKind, - network: Network, - ) -> Result { - let derivable_key = &*secret_key.ptr; - match derivable_key { - keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { - let derivable_key = descriptor_x_key.xkey; - let (extended_descriptor, key_map, _) = - Bip84(derivable_key, keychain_kind.into()).build(network.into())?; - Ok(Self { - extended_descriptor: RustOpaque::new(extended_descriptor), - key_map: RustOpaque::new(key_map), - }) - } - keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - pub fn new_bip84_public( - public_key: BdkDescriptorPublicKey, - fingerprint: String, - keychain_kind: KeychainKind, - network: Network, - ) -> Result { - let fingerprint = Fingerprint::from_str(fingerprint.as_str()) - .map_err(|e| BdkError::Generic(e.to_string()))?; - let derivable_key = &*public_key.ptr; - - match derivable_key { - keys::DescriptorPublicKey::XPub(descriptor_x_key) => { - let derivable_key = descriptor_x_key.xkey; - let (extended_descriptor, key_map, _) = - Bip84Public(derivable_key, fingerprint, keychain_kind.into()) - .build(network.into())?; - - Ok(Self { - extended_descriptor: RustOpaque::new(extended_descriptor), - key_map: RustOpaque::new(key_map), - }) - } - keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - pub fn new_bip86( - secret_key: BdkDescriptorSecretKey, - keychain_kind: KeychainKind, - network: Network, - ) -> Result { - let derivable_key = &*secret_key.ptr; - - match derivable_key { - keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { - let derivable_key = descriptor_x_key.xkey; - let (extended_descriptor, key_map, _) = - Bip86(derivable_key, keychain_kind.into()).build(network.into())?; - Ok(Self { - extended_descriptor: RustOpaque::new(extended_descriptor), - key_map: RustOpaque::new(key_map), - }) - } - keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - pub fn new_bip86_public( - public_key: BdkDescriptorPublicKey, - fingerprint: String, - keychain_kind: KeychainKind, - network: Network, - ) -> Result { - let fingerprint = Fingerprint::from_str(fingerprint.as_str()) - .map_err(|e| BdkError::Generic(e.to_string()))?; - let derivable_key = &*public_key.ptr; - - match derivable_key { - keys::DescriptorPublicKey::XPub(descriptor_x_key) => { - let derivable_key = descriptor_x_key.xkey; - let (extended_descriptor, key_map, _) = - Bip86Public(derivable_key, fingerprint, keychain_kind.into()) - .build(network.into())?; - - Ok(Self { - extended_descriptor: RustOpaque::new(extended_descriptor), - key_map: RustOpaque::new(key_map), - }) - } - keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - #[frb(sync)] - pub fn to_string_private(&self) -> String { - let descriptor = &self.extended_descriptor; - let key_map = &*self.key_map; - descriptor.to_string_with_secret(key_map) - } - - #[frb(sync)] - pub fn as_string(&self) -> String { - self.extended_descriptor.to_string() - } - #[frb(sync)] - pub fn max_satisfaction_weight(&self) -> Result { - self.extended_descriptor - .max_weight_to_satisfy() - .map_err(|e| e.into()) - } -} diff --git a/rust/src/api/error.rs b/rust/src/api/error.rs deleted file mode 100644 index 9a986ab0..00000000 --- a/rust/src/api/error.rs +++ /dev/null @@ -1,368 +0,0 @@ -use crate::api::types::{KeychainKind, Network, OutPoint, Variant}; -use bdk::descriptor::error::Error as BdkDescriptorError; - -#[derive(Debug)] -pub enum BdkError { - /// Hex decoding error - Hex(HexError), - /// Encoding error - Consensus(ConsensusError), - VerifyTransaction(String), - /// Address error. - Address(AddressError), - /// Error related to the parsing and usage of descriptors - Descriptor(DescriptorError), - /// Wrong number of bytes found when trying to convert to u32 - InvalidU32Bytes(Vec), - /// Generic error - Generic(String), - /// This error is thrown when trying to convert Bare and Public key script to address - ScriptDoesntHaveAddressForm, - /// Cannot build a tx without recipients - NoRecipients, - /// `manually_selected_only` option is selected but no utxo has been passed - NoUtxosSelected, - /// Output created is under the dust limit, 546 satoshis - OutputBelowDustLimit(usize), - /// Wallet's UTXO set is not enough to cover recipient's requested plus fee - InsufficientFunds { - /// Sats needed for some transaction - needed: u64, - /// Sats available for spending - available: u64, - }, - /// Branch and bound coin selection possible attempts with sufficiently big UTXO set could grow - /// exponentially, thus a limit is set, and when hit, this error is thrown - BnBTotalTriesExceeded, - /// Branch and bound coin selection tries to avoid needing a change by finding the right inputs for - /// the desired outputs plus fee, if there is not such combination this error is thrown - BnBNoExactMatch, - /// Happens when trying to spend an UTXO that is not in the internal database - UnknownUtxo, - /// Thrown when a tx is not found in the internal database - TransactionNotFound, - /// Happens when trying to bump a transaction that is already confirmed - TransactionConfirmed, - /// Trying to replace a tx that has a sequence >= `0xFFFFFFFE` - IrreplaceableTransaction, - /// When bumping a tx the fee rate requested is lower than required - FeeRateTooLow { - /// Required fee rate (satoshi/vbyte) - needed: f32, - }, - /// When bumping a tx the absolute fee requested is lower than replaced tx absolute fee - FeeTooLow { - /// Required fee absolute value (satoshi) - needed: u64, - }, - /// Node doesn't have data to estimate a fee rate - FeeRateUnavailable, - MissingKeyOrigin(String), - /// Error while working with keys - Key(String), - /// Descriptor checksum mismatch - ChecksumMismatch, - /// Spending policy is not compatible with this [KeychainKind] - SpendingPolicyRequired(KeychainKind), - /// Error while extracting and manipulating policies - InvalidPolicyPathError(String), - /// Signing error - Signer(String), - /// Invalid network - InvalidNetwork { - /// requested network, for example what is given as bdk-cli option - requested: Network, - /// found network, for example the network of the bitcoin node - found: Network, - }, - /// Requested outpoint doesn't exist in the tx (vout greater than available outputs) - InvalidOutpoint(OutPoint), - /// Encoding error - Encode(String), - /// Miniscript error - Miniscript(String), - /// Miniscript PSBT error - MiniscriptPsbt(String), - /// BIP32 error - Bip32(String), - /// BIP39 error - Bip39(String), - /// A secp256k1 error - Secp256k1(String), - /// Error serializing or deserializing JSON data - Json(String), - /// Partially signed bitcoin transaction error - Psbt(String), - /// Partially signed bitcoin transaction parse error - PsbtParse(String), - /// sync attempt failed due to missing scripts in cache which - /// are needed to satisfy `stop_gap`. - MissingCachedScripts(usize, usize), - /// Electrum client error - Electrum(String), - /// Esplora client error - Esplora(String), - /// Sled database error - Sled(String), - /// Rpc client error - Rpc(String), - /// Rusqlite client error - Rusqlite(String), - InvalidInput(String), - InvalidLockTime(String), - InvalidTransaction(String), -} - -impl From for BdkError { - fn from(value: bdk::Error) -> Self { - match value { - bdk::Error::InvalidU32Bytes(e) => BdkError::InvalidU32Bytes(e), - bdk::Error::Generic(e) => BdkError::Generic(e), - bdk::Error::ScriptDoesntHaveAddressForm => BdkError::ScriptDoesntHaveAddressForm, - bdk::Error::NoRecipients => BdkError::NoRecipients, - bdk::Error::NoUtxosSelected => BdkError::NoUtxosSelected, - bdk::Error::OutputBelowDustLimit(e) => BdkError::OutputBelowDustLimit(e), - bdk::Error::InsufficientFunds { needed, available } => { - BdkError::InsufficientFunds { needed, available } - } - bdk::Error::BnBTotalTriesExceeded => BdkError::BnBTotalTriesExceeded, - bdk::Error::BnBNoExactMatch => BdkError::BnBNoExactMatch, - bdk::Error::UnknownUtxo => BdkError::UnknownUtxo, - bdk::Error::TransactionNotFound => BdkError::TransactionNotFound, - bdk::Error::TransactionConfirmed => BdkError::TransactionConfirmed, - bdk::Error::IrreplaceableTransaction => BdkError::IrreplaceableTransaction, - bdk::Error::FeeRateTooLow { required } => BdkError::FeeRateTooLow { - needed: required.as_sat_per_vb(), - }, - bdk::Error::FeeTooLow { required } => BdkError::FeeTooLow { needed: required }, - bdk::Error::FeeRateUnavailable => BdkError::FeeRateUnavailable, - bdk::Error::MissingKeyOrigin(e) => BdkError::MissingKeyOrigin(e), - bdk::Error::Key(e) => BdkError::Key(e.to_string()), - bdk::Error::ChecksumMismatch => BdkError::ChecksumMismatch, - bdk::Error::SpendingPolicyRequired(e) => BdkError::SpendingPolicyRequired(e.into()), - bdk::Error::InvalidPolicyPathError(e) => { - BdkError::InvalidPolicyPathError(e.to_string()) - } - bdk::Error::Signer(e) => BdkError::Signer(e.to_string()), - bdk::Error::InvalidNetwork { requested, found } => BdkError::InvalidNetwork { - requested: requested.into(), - found: found.into(), - }, - bdk::Error::InvalidOutpoint(e) => BdkError::InvalidOutpoint(e.into()), - bdk::Error::Descriptor(e) => BdkError::Descriptor(e.into()), - bdk::Error::Encode(e) => BdkError::Encode(e.to_string()), - bdk::Error::Miniscript(e) => BdkError::Miniscript(e.to_string()), - bdk::Error::MiniscriptPsbt(e) => BdkError::MiniscriptPsbt(e.to_string()), - bdk::Error::Bip32(e) => BdkError::Bip32(e.to_string()), - bdk::Error::Secp256k1(e) => BdkError::Secp256k1(e.to_string()), - bdk::Error::Json(e) => BdkError::Json(e.to_string()), - bdk::Error::Hex(e) => BdkError::Hex(e.into()), - bdk::Error::Psbt(e) => BdkError::Psbt(e.to_string()), - bdk::Error::PsbtParse(e) => BdkError::PsbtParse(e.to_string()), - bdk::Error::MissingCachedScripts(e) => { - BdkError::MissingCachedScripts(e.missing_count, e.last_count) - } - bdk::Error::Electrum(e) => BdkError::Electrum(e.to_string()), - bdk::Error::Esplora(e) => BdkError::Esplora(e.to_string()), - bdk::Error::Sled(e) => BdkError::Sled(e.to_string()), - bdk::Error::Rpc(e) => BdkError::Rpc(e.to_string()), - bdk::Error::Rusqlite(e) => BdkError::Rusqlite(e.to_string()), - _ => BdkError::Generic("".to_string()), - } - } -} -#[derive(Debug)] -pub enum DescriptorError { - InvalidHdKeyPath, - InvalidDescriptorChecksum, - HardenedDerivationXpub, - MultiPath, - Key(String), - Policy(String), - InvalidDescriptorCharacter(u8), - Bip32(String), - Base58(String), - Pk(String), - Miniscript(String), - Hex(String), -} -impl From for BdkError { - fn from(value: BdkDescriptorError) -> Self { - BdkError::Descriptor(value.into()) - } -} -impl From for DescriptorError { - fn from(value: BdkDescriptorError) -> Self { - match value { - BdkDescriptorError::InvalidHdKeyPath => DescriptorError::InvalidHdKeyPath, - BdkDescriptorError::InvalidDescriptorChecksum => { - DescriptorError::InvalidDescriptorChecksum - } - BdkDescriptorError::HardenedDerivationXpub => DescriptorError::HardenedDerivationXpub, - BdkDescriptorError::MultiPath => DescriptorError::MultiPath, - BdkDescriptorError::Key(e) => DescriptorError::Key(e.to_string()), - BdkDescriptorError::Policy(e) => DescriptorError::Policy(e.to_string()), - BdkDescriptorError::InvalidDescriptorCharacter(e) => { - DescriptorError::InvalidDescriptorCharacter(e) - } - BdkDescriptorError::Bip32(e) => DescriptorError::Bip32(e.to_string()), - BdkDescriptorError::Base58(e) => DescriptorError::Base58(e.to_string()), - BdkDescriptorError::Pk(e) => DescriptorError::Pk(e.to_string()), - BdkDescriptorError::Miniscript(e) => DescriptorError::Miniscript(e.to_string()), - BdkDescriptorError::Hex(e) => DescriptorError::Hex(e.to_string()), - } - } -} -#[derive(Debug)] -pub enum HexError { - InvalidChar(u8), - OddLengthString(usize), - InvalidLength(usize, usize), -} - -impl From for HexError { - fn from(value: bdk::bitcoin::hashes::hex::Error) -> Self { - match value { - bdk::bitcoin::hashes::hex::Error::InvalidChar(e) => HexError::InvalidChar(e), - bdk::bitcoin::hashes::hex::Error::OddLengthString(e) => HexError::OddLengthString(e), - bdk::bitcoin::hashes::hex::Error::InvalidLength(e, f) => HexError::InvalidLength(e, f), - } - } -} - -#[derive(Debug)] -pub enum ConsensusError { - Io(String), - OversizedVectorAllocation { requested: usize, max: usize }, - InvalidChecksum { expected: [u8; 4], actual: [u8; 4] }, - NonMinimalVarInt, - ParseFailed(String), - UnsupportedSegwitFlag(u8), -} -impl From for BdkError { - fn from(value: bdk::bitcoin::consensus::encode::Error) -> Self { - BdkError::Consensus(value.into()) - } -} -impl From for ConsensusError { - fn from(value: bdk::bitcoin::consensus::encode::Error) -> Self { - match value { - bdk::bitcoin::consensus::encode::Error::Io(e) => ConsensusError::Io(e.to_string()), - bdk::bitcoin::consensus::encode::Error::OversizedVectorAllocation { - requested, - max, - } => ConsensusError::OversizedVectorAllocation { requested, max }, - bdk::bitcoin::consensus::encode::Error::InvalidChecksum { expected, actual } => { - ConsensusError::InvalidChecksum { expected, actual } - } - bdk::bitcoin::consensus::encode::Error::NonMinimalVarInt => { - ConsensusError::NonMinimalVarInt - } - bdk::bitcoin::consensus::encode::Error::ParseFailed(e) => { - ConsensusError::ParseFailed(e.to_string()) - } - bdk::bitcoin::consensus::encode::Error::UnsupportedSegwitFlag(e) => { - ConsensusError::UnsupportedSegwitFlag(e) - } - _ => unreachable!(), - } - } -} -#[derive(Debug)] -pub enum AddressError { - Base58(String), - Bech32(String), - EmptyBech32Payload, - InvalidBech32Variant { - expected: Variant, - found: Variant, - }, - InvalidWitnessVersion(u8), - UnparsableWitnessVersion(String), - MalformedWitnessVersion, - InvalidWitnessProgramLength(usize), - InvalidSegwitV0ProgramLength(usize), - UncompressedPubkey, - ExcessiveScriptSize, - UnrecognizedScript, - UnknownAddressType(String), - NetworkValidation { - network_required: Network, - network_found: Network, - address: String, - }, -} -impl From for BdkError { - fn from(value: bdk::bitcoin::address::Error) -> Self { - BdkError::Address(value.into()) - } -} - -impl From for AddressError { - fn from(value: bdk::bitcoin::address::Error) -> Self { - match value { - bdk::bitcoin::address::Error::Base58(e) => AddressError::Base58(e.to_string()), - bdk::bitcoin::address::Error::Bech32(e) => AddressError::Bech32(e.to_string()), - bdk::bitcoin::address::Error::EmptyBech32Payload => AddressError::EmptyBech32Payload, - bdk::bitcoin::address::Error::InvalidBech32Variant { expected, found } => { - AddressError::InvalidBech32Variant { - expected: expected.into(), - found: found.into(), - } - } - bdk::bitcoin::address::Error::InvalidWitnessVersion(e) => { - AddressError::InvalidWitnessVersion(e) - } - bdk::bitcoin::address::Error::UnparsableWitnessVersion(e) => { - AddressError::UnparsableWitnessVersion(e.to_string()) - } - bdk::bitcoin::address::Error::MalformedWitnessVersion => { - AddressError::MalformedWitnessVersion - } - bdk::bitcoin::address::Error::InvalidWitnessProgramLength(e) => { - AddressError::InvalidWitnessProgramLength(e) - } - bdk::bitcoin::address::Error::InvalidSegwitV0ProgramLength(e) => { - AddressError::InvalidSegwitV0ProgramLength(e) - } - bdk::bitcoin::address::Error::UncompressedPubkey => AddressError::UncompressedPubkey, - bdk::bitcoin::address::Error::ExcessiveScriptSize => AddressError::ExcessiveScriptSize, - bdk::bitcoin::address::Error::UnrecognizedScript => AddressError::UnrecognizedScript, - bdk::bitcoin::address::Error::UnknownAddressType(e) => { - AddressError::UnknownAddressType(e) - } - bdk::bitcoin::address::Error::NetworkValidation { - required, - found, - address, - } => AddressError::NetworkValidation { - network_required: required.into(), - network_found: found.into(), - address: address.assume_checked().to_string(), - }, - _ => unreachable!(), - } - } -} - -impl From for BdkError { - fn from(value: bdk::miniscript::Error) -> Self { - BdkError::Miniscript(value.to_string()) - } -} - -impl From for BdkError { - fn from(value: bdk::bitcoin::psbt::Error) -> Self { - BdkError::Psbt(value.to_string()) - } -} -impl From for BdkError { - fn from(value: bdk::bitcoin::psbt::PsbtParseError) -> Self { - BdkError::PsbtParse(value.to_string()) - } -} -impl From for BdkError { - fn from(value: bdk::keys::bip39::Error) -> Self { - BdkError::Bip39(value.to_string()) - } -} diff --git a/rust/src/api/key.rs b/rust/src/api/key.rs deleted file mode 100644 index ef55b4c2..00000000 --- a/rust/src/api/key.rs +++ /dev/null @@ -1,297 +0,0 @@ -use crate::api::error::BdkError; -use crate::api::types::{Network, WordCount}; -use crate::frb_generated::RustOpaque; -pub use bdk::bitcoin; -use bdk::bitcoin::secp256k1::Secp256k1; -pub use bdk::keys; -use bdk::keys::bip39::Language; -use bdk::keys::{DerivableKey, GeneratableKey}; -use bdk::miniscript::descriptor::{DescriptorXKey, Wildcard}; -use bdk::miniscript::BareCtx; -use flutter_rust_bridge::frb; -use std::str::FromStr; - -pub struct BdkMnemonic { - pub ptr: RustOpaque, -} -impl From for BdkMnemonic { - fn from(value: keys::bip39::Mnemonic) -> Self { - Self { - ptr: RustOpaque::new(value), - } - } -} -impl BdkMnemonic { - /// Generates Mnemonic with a random entropy - pub fn new(word_count: WordCount) -> Result { - let generated_key: keys::GeneratedKey<_, BareCtx> = - (match keys::bip39::Mnemonic::generate((word_count.into(), Language::English)) { - Ok(value) => Ok(value), - Err(Some(err)) => Err(BdkError::Bip39(err.to_string())), - Err(None) => Err(BdkError::Generic("".to_string())), // If - })?; - - keys::bip39::Mnemonic::parse_in(Language::English, generated_key.to_string()) - .map(|e| e.into()) - .map_err(|e| BdkError::Bip39(e.to_string())) - } - - /// Parse a Mnemonic with given string - pub fn from_string(mnemonic: String) -> Result { - keys::bip39::Mnemonic::from_str(&mnemonic) - .map(|m| m.into()) - .map_err(|e| BdkError::Bip39(e.to_string())) - } - - /// Create a new Mnemonic in the specified language from the given entropy. - /// Entropy must be a multiple of 32 bits (4 bytes) and 128-256 bits in length. - pub fn from_entropy(entropy: Vec) -> Result { - keys::bip39::Mnemonic::from_entropy(entropy.as_slice()) - .map(|m| m.into()) - .map_err(|e| BdkError::Bip39(e.to_string())) - } - - #[frb(sync)] - pub fn as_string(&self) -> String { - self.ptr.to_string() - } -} - -pub struct BdkDerivationPath { - pub ptr: RustOpaque, -} -impl From for BdkDerivationPath { - fn from(value: bitcoin::bip32::DerivationPath) -> Self { - BdkDerivationPath { - ptr: RustOpaque::new(value), - } - } -} - -impl BdkDerivationPath { - pub fn from_string(path: String) -> Result { - bitcoin::bip32::DerivationPath::from_str(&path) - .map(|e| e.into()) - .map_err(|e| BdkError::Generic(e.to_string())) - } - #[frb(sync)] - pub fn as_string(&self) -> String { - self.ptr.to_string() - } -} - -#[derive(Debug)] -pub struct BdkDescriptorSecretKey { - pub ptr: RustOpaque, -} -impl From for BdkDescriptorSecretKey { - fn from(value: keys::DescriptorSecretKey) -> Self { - Self { - ptr: RustOpaque::new(value), - } - } -} -impl BdkDescriptorSecretKey { - pub fn create( - network: Network, - mnemonic: BdkMnemonic, - password: Option, - ) -> Result { - let mnemonic = (*mnemonic.ptr).clone(); - let xkey: keys::ExtendedKey = (mnemonic, password) - .into_extended_key() - .map_err(|e| BdkError::Key(e.to_string()))?; - let xpriv = if let Some(e) = xkey.into_xprv(network.into()) { - Ok(e) - } else { - Err(BdkError::Generic( - "private data not found in the key!".to_string(), - )) - }; - let descriptor_secret_key = keys::DescriptorSecretKey::XPrv(DescriptorXKey { - origin: None, - xkey: xpriv?, - derivation_path: bitcoin::bip32::DerivationPath::master(), - wildcard: Wildcard::Unhardened, - }); - Ok(descriptor_secret_key.into()) - } - - pub fn derive(ptr: BdkDescriptorSecretKey, path: BdkDerivationPath) -> Result { - let secp = Secp256k1::new(); - let descriptor_secret_key = (*ptr.ptr).clone(); - match descriptor_secret_key { - keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { - let derived_xprv = descriptor_x_key - .xkey - .derive_priv(&secp, &(*path.ptr).clone()) - .map_err(|e| BdkError::Bip32(e.to_string()))?; - let key_source = match descriptor_x_key.origin.clone() { - Some((fingerprint, origin_path)) => { - (fingerprint, origin_path.extend(&(*path.ptr).clone())) - } - None => ( - descriptor_x_key.xkey.fingerprint(&secp), - (*path.ptr).clone(), - ), - }; - let derived_descriptor_secret_key = - keys::DescriptorSecretKey::XPrv(DescriptorXKey { - origin: Some(key_source), - xkey: derived_xprv, - derivation_path: bitcoin::bip32::DerivationPath::default(), - wildcard: descriptor_x_key.wildcard, - }); - Ok(derived_descriptor_secret_key.into()) - } - keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - pub fn extend(ptr: BdkDescriptorSecretKey, path: BdkDerivationPath) -> Result { - let descriptor_secret_key = (*ptr.ptr).clone(); - match descriptor_secret_key { - keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { - let extended_path = descriptor_x_key.derivation_path.extend((*path.ptr).clone()); - let extended_descriptor_secret_key = - keys::DescriptorSecretKey::XPrv(DescriptorXKey { - origin: descriptor_x_key.origin.clone(), - xkey: descriptor_x_key.xkey, - derivation_path: extended_path, - wildcard: descriptor_x_key.wildcard, - }); - Ok(extended_descriptor_secret_key.into()) - } - keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - #[frb(sync)] - pub fn as_public(ptr: BdkDescriptorSecretKey) -> Result { - let secp = Secp256k1::new(); - let descriptor_public_key = ptr - .ptr - .to_public(&secp) - .map_err(|e| BdkError::Generic(e.to_string()))?; - Ok(descriptor_public_key.into()) - } - #[frb(sync)] - /// Get the private key as bytes. - pub fn secret_bytes(&self) -> Result, BdkError> { - let descriptor_secret_key = &*self.ptr; - match descriptor_secret_key { - keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { - Ok(descriptor_x_key.xkey.private_key.secret_bytes().to_vec()) - } - keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - pub fn from_string(secret_key: String) -> Result { - let key = keys::DescriptorSecretKey::from_str(&*secret_key) - .map_err(|e| BdkError::Generic(e.to_string()))?; - Ok(key.into()) - } - #[frb(sync)] - pub fn as_string(&self) -> String { - self.ptr.to_string() - } -} -#[derive(Debug)] -pub struct BdkDescriptorPublicKey { - pub ptr: RustOpaque, -} -impl From for BdkDescriptorPublicKey { - fn from(value: keys::DescriptorPublicKey) -> Self { - Self { - ptr: RustOpaque::new(value), - } - } -} - -impl BdkDescriptorPublicKey { - pub fn from_string(public_key: String) -> Result { - keys::DescriptorPublicKey::from_str(public_key.as_str()) - .map_err(|e| BdkError::Generic(e.to_string())) - .map(|e| e.into()) - } - pub fn derive(ptr: BdkDescriptorPublicKey, path: BdkDerivationPath) -> Result { - let secp = Secp256k1::new(); - let descriptor_public_key = (*ptr.ptr).clone(); - match descriptor_public_key { - keys::DescriptorPublicKey::XPub(descriptor_x_key) => { - let derived_xpub = descriptor_x_key - .xkey - .derive_pub(&secp, &(*path.ptr).clone()) - .map_err(|e| BdkError::Bip32(e.to_string()))?; - let key_source = match descriptor_x_key.origin.clone() { - Some((fingerprint, origin_path)) => { - (fingerprint, origin_path.extend(&(*path.ptr).clone())) - } - None => (descriptor_x_key.xkey.fingerprint(), (*path.ptr).clone()), - }; - let derived_descriptor_public_key = - keys::DescriptorPublicKey::XPub(DescriptorXKey { - origin: Some(key_source), - xkey: derived_xpub, - derivation_path: bitcoin::bip32::DerivationPath::default(), - wildcard: descriptor_x_key.wildcard, - }); - Ok(Self { - ptr: RustOpaque::new(derived_descriptor_public_key), - }) - } - keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( - "Cannot derive from a single key".to_string(), - )), - keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( - "Cannot derive from a multi key".to_string(), - )), - } - } - - pub fn extend(ptr: BdkDescriptorPublicKey, path: BdkDerivationPath) -> Result { - let descriptor_public_key = (*ptr.ptr).clone(); - match descriptor_public_key { - keys::DescriptorPublicKey::XPub(descriptor_x_key) => { - let extended_path = descriptor_x_key - .derivation_path - .extend(&(*path.ptr).clone()); - let extended_descriptor_public_key = - keys::DescriptorPublicKey::XPub(DescriptorXKey { - origin: descriptor_x_key.origin.clone(), - xkey: descriptor_x_key.xkey, - derivation_path: extended_path, - wildcard: descriptor_x_key.wildcard, - }); - Ok(Self { - ptr: RustOpaque::new(extended_descriptor_public_key), - }) - } - keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( - "Cannot extend from a single key".to_string(), - )), - keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( - "Cannot extend from a multi key".to_string(), - )), - } - } - - #[frb(sync)] - pub fn as_string(&self) -> String { - self.ptr.to_string() - } -} diff --git a/rust/src/api/mod.rs b/rust/src/api/mod.rs deleted file mode 100644 index acf4d1d3..00000000 --- a/rust/src/api/mod.rs +++ /dev/null @@ -1,24 +0,0 @@ -use std::{fmt::Debug, sync::Mutex}; - -use error::BdkError; - -pub mod blockchain; -pub mod descriptor; -pub mod error; -pub mod key; -pub mod psbt; -pub mod types; -pub mod wallet; - -pub(crate) fn execute_with_lock(lock: &Mutex, operation: F) -> Result -where - T: Debug, - F: FnOnce(&mut T) -> R, -{ - lock.lock() - .map_err(|poisoned| { - drop(poisoned.into_inner()); - BdkError::Generic("Poison Error!".to_string()) - }) - .map(|mut guard| operation(&mut *guard)) -} diff --git a/rust/src/api/psbt.rs b/rust/src/api/psbt.rs deleted file mode 100644 index c31e9520..00000000 --- a/rust/src/api/psbt.rs +++ /dev/null @@ -1,101 +0,0 @@ -use crate::api::error::BdkError; -use crate::api::types::{BdkTransaction, FeeRate}; -use crate::frb_generated::RustOpaque; - -use bdk::psbt::PsbtUtils; -use std::ops::Deref; -use std::str::FromStr; - -use flutter_rust_bridge::frb; - -use super::execute_with_lock; - -#[derive(Debug)] -pub struct BdkPsbt { - pub ptr: RustOpaque>, -} - -impl From for BdkPsbt { - fn from(value: bdk::bitcoin::psbt::PartiallySignedTransaction) -> Self { - Self { - ptr: RustOpaque::new(std::sync::Mutex::new(value)), - } - } -} -impl BdkPsbt { - pub fn from_str(psbt_base64: String) -> Result { - let psbt: bdk::bitcoin::psbt::PartiallySignedTransaction = - bdk::bitcoin::psbt::PartiallySignedTransaction::from_str(&psbt_base64)?; - Ok(psbt.into()) - } - - #[frb(sync)] - pub fn as_string(&self) -> Result { - execute_with_lock(&self.ptr, |psbt| psbt.to_string()) - } - - ///Computes the `Txid`. - /// Hashes the transaction excluding the segwit data (i. e. the marker, flag bytes, and the witness fields themselves). - /// For non-segwit transactions which do not have any segwit data, this will be equal to transaction.wtxid(). - #[frb(sync)] - pub fn txid(&self) -> Result { - execute_with_lock(&self.ptr, |psbt| { - psbt.to_owned().extract_tx().txid().to_string() - }) - } - - /// Return the transaction. - #[frb(sync)] - pub fn extract_tx(ptr: BdkPsbt) -> Result { - execute_with_lock(&ptr.ptr, |psbt| { - let tx = psbt.to_owned().extract_tx(); - tx.try_into() - })? - } - - /// Combines this PartiallySignedTransaction with other PSBT as described by BIP 174. - /// - /// In accordance with BIP 174 this function is commutative i.e., `A.combine(B) == B.combine(A)` - pub fn combine(ptr: BdkPsbt, other: BdkPsbt) -> Result { - let other_psbt = other - .ptr - .lock() - .map_err(|_| BdkError::Generic("Poison Error!".to_string()))? - .clone(); - let mut original_psbt = ptr - .ptr - .lock() - .map_err(|_| BdkError::Generic("Poison Error!".to_string()))?; - original_psbt.combine(other_psbt)?; - Ok(original_psbt.to_owned().into()) - } - - /// The total transaction fee amount, sum of input amounts minus sum of output amounts, in Sats. - /// If the PSBT is missing a TxOut for an input returns None. - #[frb(sync)] - pub fn fee_amount(&self) -> Result, BdkError> { - execute_with_lock(&self.ptr, |psbt| psbt.fee_amount()) - } - - /// The transaction's fee rate. This value will only be accurate if calculated AFTER the - /// `PartiallySignedTransaction` is finalized and all witness/signature data is added to the - /// transaction. - /// If the PSBT is missing a TxOut for an input returns None. - #[frb(sync)] - pub fn fee_rate(&self) -> Result, BdkError> { - execute_with_lock(&self.ptr, |psbt| psbt.fee_rate().map(|e| e.into())) - } - - ///Serialize as raw binary data - #[frb(sync)] - pub fn serialize(&self) -> Result, BdkError> { - execute_with_lock(&self.ptr, |psbt| psbt.serialize()) - } - /// Serialize the PSBT data structure as a String of JSON. - #[frb(sync)] - pub fn json_serialize(&self) -> Result { - execute_with_lock(&self.ptr, |psbt| { - serde_json::to_string(psbt.deref()).map_err(|e| BdkError::Generic(e.to_string())) - })? - } -} diff --git a/rust/src/api/types.rs b/rust/src/api/types.rs deleted file mode 100644 index a721c5cb..00000000 --- a/rust/src/api/types.rs +++ /dev/null @@ -1,1168 +0,0 @@ -use crate::api::error::{BdkError, HexError}; -use crate::frb_generated::RustOpaque; -use bdk::bitcoin::consensus::{serialize, Decodable}; -use bdk::bitcoin::hashes::hex::Error; -use bdk::database::AnyDatabaseConfig; -use flutter_rust_bridge::frb; -use serde::{Deserialize, Serialize}; -use std::collections::HashMap; -use std::io::Cursor; -use std::str::FromStr; - -/// A reference to a transaction output. -#[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub struct OutPoint { - /// The referenced transaction's txid. - pub(crate) txid: String, - /// The index of the referenced output in its transaction's vout. - pub(crate) vout: u32, -} -impl TryFrom<&OutPoint> for bdk::bitcoin::OutPoint { - type Error = BdkError; - - fn try_from(x: &OutPoint) -> Result { - Ok(bdk::bitcoin::OutPoint { - txid: bdk::bitcoin::Txid::from_str(x.txid.as_str()).map_err(|e| match e { - Error::InvalidChar(e) => BdkError::Hex(HexError::InvalidChar(e)), - Error::OddLengthString(e) => BdkError::Hex(HexError::OddLengthString(e)), - Error::InvalidLength(e, f) => BdkError::Hex(HexError::InvalidLength(e, f)), - })?, - vout: x.clone().vout, - }) - } -} -impl From for OutPoint { - fn from(x: bdk::bitcoin::OutPoint) -> OutPoint { - OutPoint { - txid: x.txid.to_string(), - vout: x.clone().vout, - } - } -} -#[derive(Debug, Clone)] -pub struct TxIn { - pub previous_output: OutPoint, - pub script_sig: BdkScriptBuf, - pub sequence: u32, - pub witness: Vec>, -} -impl TryFrom<&TxIn> for bdk::bitcoin::TxIn { - type Error = BdkError; - - fn try_from(x: &TxIn) -> Result { - Ok(bdk::bitcoin::TxIn { - previous_output: (&x.previous_output).try_into()?, - script_sig: x.clone().script_sig.into(), - sequence: bdk::bitcoin::blockdata::transaction::Sequence::from_consensus( - x.sequence.clone(), - ), - witness: bdk::bitcoin::blockdata::witness::Witness::from_slice( - x.clone().witness.as_slice(), - ), - }) - } -} -impl From<&bdk::bitcoin::TxIn> for TxIn { - fn from(x: &bdk::bitcoin::TxIn) -> Self { - TxIn { - previous_output: x.previous_output.into(), - script_sig: x.clone().script_sig.into(), - sequence: x.clone().sequence.0, - witness: x.witness.to_vec(), - } - } -} -///A transaction output, which defines new coins to be created from old ones. -pub struct TxOut { - /// The value of the output, in satoshis. - pub value: u64, - /// The address of the output. - pub script_pubkey: BdkScriptBuf, -} -impl From for bdk::bitcoin::TxOut { - fn from(value: TxOut) -> Self { - Self { - value: value.value, - script_pubkey: value.script_pubkey.into(), - } - } -} -impl From<&bdk::bitcoin::TxOut> for TxOut { - fn from(x: &bdk::bitcoin::TxOut) -> Self { - TxOut { - value: x.clone().value, - script_pubkey: x.clone().script_pubkey.into(), - } - } -} -impl From<&TxOut> for bdk::bitcoin::TxOut { - fn from(x: &TxOut) -> Self { - Self { - value: x.value, - script_pubkey: x.script_pubkey.clone().into(), - } - } -} -#[derive(Clone, Debug)] -pub struct BdkScriptBuf { - pub bytes: Vec, -} -impl From for BdkScriptBuf { - fn from(value: bdk::bitcoin::ScriptBuf) -> Self { - Self { - bytes: value.as_bytes().to_vec(), - } - } -} -impl From for bdk::bitcoin::ScriptBuf { - fn from(value: BdkScriptBuf) -> Self { - bdk::bitcoin::ScriptBuf::from_bytes(value.bytes) - } -} -impl BdkScriptBuf { - #[frb(sync)] - ///Creates a new empty script. - pub fn empty() -> BdkScriptBuf { - bdk::bitcoin::ScriptBuf::new().into() - } - ///Creates a new empty script with pre-allocated capacity. - pub fn with_capacity(capacity: usize) -> BdkScriptBuf { - bdk::bitcoin::ScriptBuf::with_capacity(capacity).into() - } - - pub fn from_hex(s: String) -> Result { - bdk::bitcoin::ScriptBuf::from_hex(s.as_str()) - .map(|e| e.into()) - .map_err(|e| match e { - Error::InvalidChar(e) => BdkError::Hex(HexError::InvalidChar(e)), - Error::OddLengthString(e) => BdkError::Hex(HexError::OddLengthString(e)), - Error::InvalidLength(e, f) => BdkError::Hex(HexError::InvalidLength(e, f)), - }) - } - #[frb(sync)] - pub fn as_string(&self) -> String { - let script: bdk::bitcoin::ScriptBuf = self.to_owned().into(); - script.to_string() - } -} -pub struct PsbtSigHashType { - pub inner: u32, -} -impl From for bdk::bitcoin::psbt::PsbtSighashType { - fn from(value: PsbtSigHashType) -> Self { - bdk::bitcoin::psbt::PsbtSighashType::from_u32(value.inner) - } -} -/// Local Wallet's Balance -#[derive(Deserialize, Debug)] -pub struct Balance { - // All coinbase outputs not yet matured - pub immature: u64, - /// Unconfirmed UTXOs generated by a wallet tx - pub trusted_pending: u64, - /// Unconfirmed UTXOs received from an external wallet - pub untrusted_pending: u64, - /// Confirmed and immediately spendable balance - pub confirmed: u64, - /// Get sum of trusted_pending and confirmed coins - pub spendable: u64, - /// Get the whole balance visible to the wallet - pub total: u64, -} -impl From for Balance { - fn from(value: bdk::Balance) -> Self { - Balance { - immature: value.immature, - trusted_pending: value.trusted_pending, - untrusted_pending: value.untrusted_pending, - confirmed: value.confirmed, - spendable: value.get_spendable(), - total: value.get_total(), - } - } -} -/// The address index selection strategy to use to derived an address from the wallet's external -/// descriptor. -pub enum AddressIndex { - ///Return a new address after incrementing the current descriptor index. - Increase, - ///Return the address for the current descriptor index if it has not been used in a received transaction. Otherwise return a new address as with AddressIndex.New. - ///Use with caution, if the wallet has not yet detected an address has been used it could return an already used address. This function is primarily meant for situations where the caller is untrusted; for example when deriving donation addresses on-demand for a public web page. - LastUnused, - /// Return the address for a specific descriptor index. Does not change the current descriptor - /// index used by `AddressIndex` and `AddressIndex.LastUsed`. - /// Use with caution, if an index is given that is less than the current descriptor index - /// then the returned address may have already been used. - Peek { index: u32 }, - /// Return the address for a specific descriptor index and reset the current descriptor index - /// used by `AddressIndex` and `AddressIndex.LastUsed` to this value. - /// Use with caution, if an index is given that is less than the current descriptor index - /// then the returned address and subsequent addresses returned by calls to `AddressIndex` - /// and `AddressIndex.LastUsed` may have already been used. Also if the index is reset to a - /// value earlier than the Blockchain stopGap (default is 20) then a - /// larger stopGap should be used to monitor for all possibly used addresses. - Reset { index: u32 }, -} -impl From for bdk::wallet::AddressIndex { - fn from(x: AddressIndex) -> bdk::wallet::AddressIndex { - match x { - AddressIndex::Increase => bdk::wallet::AddressIndex::New, - AddressIndex::LastUnused => bdk::wallet::AddressIndex::LastUnused, - AddressIndex::Peek { index } => bdk::wallet::AddressIndex::Peek(index), - AddressIndex::Reset { index } => bdk::wallet::AddressIndex::Reset(index), - } - } -} -#[derive(Debug, Clone, PartialEq, Eq)] -///A wallet transaction -pub struct TransactionDetails { - pub transaction: Option, - /// Transaction id. - pub txid: String, - /// Received value (sats) - /// Sum of owned outputs of this transaction. - pub received: u64, - /// Sent value (sats) - /// Sum of owned inputs of this transaction. - pub sent: u64, - /// Fee value (sats) if confirmed. - /// The availability of the fee depends on the backend. It's never None with an Electrum - /// Server backend, but it could be None with a Bitcoin RPC node without txindex that receive - /// funds while offline. - pub fee: Option, - /// If the transaction is confirmed, contains height and timestamp of the block containing the - /// transaction, unconfirmed transaction contains `None`. - pub confirmation_time: Option, -} -/// A wallet transaction -impl TryFrom<&bdk::TransactionDetails> for TransactionDetails { - type Error = BdkError; - - fn try_from(x: &bdk::TransactionDetails) -> Result { - let transaction: Option = if let Some(tx) = x.transaction.clone() { - Some(tx.try_into()?) - } else { - None - }; - Ok(TransactionDetails { - transaction, - fee: x.clone().fee, - txid: x.clone().txid.to_string(), - received: x.clone().received, - sent: x.clone().sent, - confirmation_time: x.confirmation_time.clone().map(|e| e.into()), - }) - } -} -impl TryFrom for TransactionDetails { - type Error = BdkError; - - fn try_from(x: bdk::TransactionDetails) -> Result { - let transaction: Option = if let Some(tx) = x.transaction { - Some(tx.try_into()?) - } else { - None - }; - Ok(TransactionDetails { - transaction, - fee: x.fee, - txid: x.txid.to_string(), - received: x.received, - sent: x.sent, - confirmation_time: x.confirmation_time.map(|e| e.into()), - }) - } -} -#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] -///Block height and timestamp of a block -pub struct BlockTime { - ///Confirmation block height - pub height: u32, - ///Confirmation block timestamp - pub timestamp: u64, -} -impl From for BlockTime { - fn from(value: bdk::BlockTime) -> Self { - Self { - height: value.height, - timestamp: value.timestamp, - } - } -} -/// A output script and an amount of satoshis. -pub struct ScriptAmount { - pub script: BdkScriptBuf, - pub amount: u64, -} -#[allow(dead_code)] -#[derive(Clone, Debug)] -pub enum RbfValue { - RbfDefault, - Value(u32), -} -#[derive(Debug, Clone)] -///The cryptocurrency to act on -pub enum Network { - ///Bitcoin’s testnet - Testnet, - ///Bitcoin’s regtest - Regtest, - ///Classic Bitcoin - Bitcoin, - ///Bitcoin’s signet - Signet, -} -impl Default for Network { - fn default() -> Self { - Network::Testnet - } -} -impl From for bdk::bitcoin::Network { - fn from(network: Network) -> Self { - match network { - Network::Signet => bdk::bitcoin::Network::Signet, - Network::Testnet => bdk::bitcoin::Network::Testnet, - Network::Regtest => bdk::bitcoin::Network::Regtest, - Network::Bitcoin => bdk::bitcoin::Network::Bitcoin, - } - } -} -impl From for Network { - fn from(network: bdk::bitcoin::Network) -> Self { - match network { - bdk::bitcoin::Network::Signet => Network::Signet, - bdk::bitcoin::Network::Testnet => Network::Testnet, - bdk::bitcoin::Network::Regtest => Network::Regtest, - bdk::bitcoin::Network::Bitcoin => Network::Bitcoin, - _ => unreachable!(), - } - } -} -///Type describing entropy length (aka word count) in the mnemonic -pub enum WordCount { - ///12 words mnemonic (128 bits entropy) - Words12, - ///18 words mnemonic (192 bits entropy) - Words18, - ///24 words mnemonic (256 bits entropy) - Words24, -} -impl From for bdk::keys::bip39::WordCount { - fn from(word_count: WordCount) -> Self { - match word_count { - WordCount::Words12 => bdk::keys::bip39::WordCount::Words12, - WordCount::Words18 => bdk::keys::bip39::WordCount::Words18, - WordCount::Words24 => bdk::keys::bip39::WordCount::Words24, - } - } -} -/// The method used to produce an address. -#[derive(Debug)] -pub enum Payload { - /// P2PKH address. - PubkeyHash { pubkey_hash: String }, - /// P2SH address. - ScriptHash { script_hash: String }, - /// Segwit address. - WitnessProgram { - /// The witness program version. - version: WitnessVersion, - /// The witness program. - program: Vec, - }, -} -#[derive(Debug, Clone)] -pub enum WitnessVersion { - /// Initial version of witness program. Used for P2WPKH and P2WPK outputs - V0 = 0, - /// Version of witness program used for Taproot P2TR outputs. - V1 = 1, - /// Future (unsupported) version of witness program. - V2 = 2, - /// Future (unsupported) version of witness program. - V3 = 3, - /// Future (unsupported) version of witness program. - V4 = 4, - /// Future (unsupported) version of witness program. - V5 = 5, - /// Future (unsupported) version of witness program. - V6 = 6, - /// Future (unsupported) version of witness program. - V7 = 7, - /// Future (unsupported) version of witness program. - V8 = 8, - /// Future (unsupported) version of witness program. - V9 = 9, - /// Future (unsupported) version of witness program. - V10 = 10, - /// Future (unsupported) version of witness program. - V11 = 11, - /// Future (unsupported) version of witness program. - V12 = 12, - /// Future (unsupported) version of witness program. - V13 = 13, - /// Future (unsupported) version of witness program. - V14 = 14, - /// Future (unsupported) version of witness program. - V15 = 15, - /// Future (unsupported) version of witness program. - V16 = 16, -} -impl From for WitnessVersion { - fn from(value: bdk::bitcoin::address::WitnessVersion) -> Self { - match value { - bdk::bitcoin::address::WitnessVersion::V0 => WitnessVersion::V0, - bdk::bitcoin::address::WitnessVersion::V1 => WitnessVersion::V1, - bdk::bitcoin::address::WitnessVersion::V2 => WitnessVersion::V2, - bdk::bitcoin::address::WitnessVersion::V3 => WitnessVersion::V3, - bdk::bitcoin::address::WitnessVersion::V4 => WitnessVersion::V4, - bdk::bitcoin::address::WitnessVersion::V5 => WitnessVersion::V5, - bdk::bitcoin::address::WitnessVersion::V6 => WitnessVersion::V6, - bdk::bitcoin::address::WitnessVersion::V7 => WitnessVersion::V7, - bdk::bitcoin::address::WitnessVersion::V8 => WitnessVersion::V8, - bdk::bitcoin::address::WitnessVersion::V9 => WitnessVersion::V9, - bdk::bitcoin::address::WitnessVersion::V10 => WitnessVersion::V10, - bdk::bitcoin::address::WitnessVersion::V11 => WitnessVersion::V11, - bdk::bitcoin::address::WitnessVersion::V12 => WitnessVersion::V12, - bdk::bitcoin::address::WitnessVersion::V13 => WitnessVersion::V13, - bdk::bitcoin::address::WitnessVersion::V14 => WitnessVersion::V14, - bdk::bitcoin::address::WitnessVersion::V15 => WitnessVersion::V15, - bdk::bitcoin::address::WitnessVersion::V16 => WitnessVersion::V16, - } - } -} -pub enum ChangeSpendPolicy { - ChangeAllowed, - OnlyChange, - ChangeForbidden, -} -impl From for bdk::wallet::tx_builder::ChangeSpendPolicy { - fn from(value: ChangeSpendPolicy) -> Self { - match value { - ChangeSpendPolicy::ChangeAllowed => { - bdk::wallet::tx_builder::ChangeSpendPolicy::ChangeAllowed - } - ChangeSpendPolicy::OnlyChange => bdk::wallet::tx_builder::ChangeSpendPolicy::OnlyChange, - ChangeSpendPolicy::ChangeForbidden => { - bdk::wallet::tx_builder::ChangeSpendPolicy::ChangeForbidden - } - } - } -} -pub struct BdkAddress { - pub ptr: RustOpaque, -} -impl From for BdkAddress { - fn from(value: bdk::bitcoin::Address) -> Self { - Self { - ptr: RustOpaque::new(value), - } - } -} -impl From<&BdkAddress> for bdk::bitcoin::Address { - fn from(value: &BdkAddress) -> Self { - (*value.ptr).clone() - } -} -impl BdkAddress { - pub fn from_string(address: String, network: Network) -> Result { - match bdk::bitcoin::Address::from_str(address.as_str()) { - Ok(e) => match e.require_network(network.into()) { - Ok(e) => Ok(e.into()), - Err(e) => Err(e.into()), - }, - Err(e) => Err(e.into()), - } - } - - pub fn from_script(script: BdkScriptBuf, network: Network) -> Result { - bdk::bitcoin::Address::from_script( - >::into(script).as_script(), - network.into(), - ) - .map(|a| a.into()) - .map_err(|e| e.into()) - } - #[frb(sync)] - pub fn payload(&self) -> Payload { - match <&BdkAddress as Into>::into(self).payload { - bdk::bitcoin::address::Payload::PubkeyHash(pubkey_hash) => Payload::PubkeyHash { - pubkey_hash: pubkey_hash.to_string(), - }, - bdk::bitcoin::address::Payload::ScriptHash(script_hash) => Payload::ScriptHash { - script_hash: script_hash.to_string(), - }, - bdk::bitcoin::address::Payload::WitnessProgram(e) => Payload::WitnessProgram { - version: e.version().into(), - program: e.program().as_bytes().to_vec(), - }, - _ => unreachable!(), - } - } - - #[frb(sync)] - pub fn to_qr_uri(&self) -> String { - self.ptr.to_qr_uri() - } - - #[frb(sync)] - pub fn network(&self) -> Network { - self.ptr.network.into() - } - #[frb(sync)] - pub fn script(ptr: BdkAddress) -> BdkScriptBuf { - ptr.ptr.script_pubkey().into() - } - - #[frb(sync)] - pub fn is_valid_for_network(&self, network: Network) -> bool { - if let Ok(unchecked_address) = self - .ptr - .to_string() - .parse::>() - { - unchecked_address.is_valid_for_network(network.into()) - } else { - false - } - } - #[frb(sync)] - pub fn as_string(&self) -> String { - self.ptr.to_string() - } -} -#[derive(Debug)] -pub enum Variant { - Bech32, - Bech32m, -} -impl From for Variant { - fn from(value: bdk::bitcoin::bech32::Variant) -> Self { - match value { - bdk::bitcoin::bech32::Variant::Bech32 => Variant::Bech32, - bdk::bitcoin::bech32::Variant::Bech32m => Variant::Bech32m, - } - } -} -#[derive(Debug, Clone)] -pub enum LockTime { - Blocks(u32), - Seconds(u32), -} - -impl TryFrom for bdk::bitcoin::blockdata::locktime::absolute::LockTime { - type Error = BdkError; - - fn try_from(value: LockTime) -> Result { - match value { - LockTime::Blocks(e) => Ok( - bdk::bitcoin::blockdata::locktime::absolute::LockTime::Blocks( - bdk::bitcoin::blockdata::locktime::absolute::Height::from_consensus(e) - .map_err(|e| BdkError::InvalidLockTime(e.to_string()))?, - ), - ), - LockTime::Seconds(e) => Ok( - bdk::bitcoin::blockdata::locktime::absolute::LockTime::Seconds( - bdk::bitcoin::blockdata::locktime::absolute::Time::from_consensus(e) - .map_err(|e| BdkError::InvalidLockTime(e.to_string()))?, - ), - ), - } - } -} - -impl From for LockTime { - fn from(value: bdk::bitcoin::blockdata::locktime::absolute::LockTime) -> Self { - match value { - bdk::bitcoin::blockdata::locktime::absolute::LockTime::Blocks(e) => { - LockTime::Blocks(e.to_consensus_u32()) - } - bdk::bitcoin::blockdata::locktime::absolute::LockTime::Seconds(e) => { - LockTime::Seconds(e.to_consensus_u32()) - } - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct BdkTransaction { - pub s: String, -} -impl BdkTransaction { - pub fn new( - version: i32, - lock_time: LockTime, - input: Vec, - output: Vec, - ) -> Result { - let mut inputs: Vec = vec![]; - for e in input.iter() { - inputs.push(e.try_into()?); - } - let output = output - .into_iter() - .map(|e| <&TxOut as Into>::into(&e)) - .collect(); - - (bdk::bitcoin::Transaction { - version, - lock_time: lock_time.try_into()?, - input: inputs, - output, - }) - .try_into() - } - pub fn from_bytes(transaction_bytes: Vec) -> Result { - let mut decoder = Cursor::new(transaction_bytes); - let tx: bdk::bitcoin::transaction::Transaction = - bdk::bitcoin::transaction::Transaction::consensus_decode(&mut decoder)?; - tx.try_into() - } - ///Computes the txid. For non-segwit transactions this will be identical to the output of wtxid(), - /// but for segwit transactions, this will give the correct txid (not including witnesses) while wtxid will also hash witnesses. - pub fn txid(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.txid().to_string()) - } - ///Returns the regular byte-wise consensus-serialized size of this transaction. - pub fn weight(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.weight().to_wu()) - } - ///Returns the regular byte-wise consensus-serialized size of this transaction. - pub fn size(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.size() as u64) - } - ///Returns the “virtual size†(vsize) of this transaction. - /// - // Will be ceil(weight / 4.0). Note this implements the virtual size as per BIP141, which is different to what is implemented in Bitcoin Core. - // The computation should be the same for any remotely sane transaction, and a standardness-rule-correct version is available in the policy module. - pub fn vsize(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.vsize() as u64) - } - ///Encodes an object into a vector. - pub fn serialize(&self) -> Result, BdkError> { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| serialize(&e)) - } - ///Is this a coin base transaction? - pub fn is_coin_base(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.is_coin_base()) - } - ///Returns true if the transaction itself opted in to be BIP-125-replaceable (RBF). - /// This does not cover the case where a transaction becomes replaceable due to ancestors being RBF. - pub fn is_explicitly_rbf(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.is_explicitly_rbf()) - } - ///Returns true if this transactions nLockTime is enabled (BIP-65 ). - pub fn is_lock_time_enabled(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.is_lock_time_enabled()) - } - ///The protocol version, is currently expected to be 1 or 2 (BIP 68). - pub fn version(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.version) - } - ///Block height or timestamp. Transaction cannot be included in a block until this height/time. - pub fn lock_time(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.lock_time.into()) - } - ///List of transaction inputs. - pub fn input(&self) -> Result, BdkError> { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.input.iter().map(|x| x.into()).collect()) - } - ///List of transaction outputs. - pub fn output(&self) -> Result, BdkError> { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.output.iter().map(|x| x.into()).collect()) - } -} -impl TryFrom for BdkTransaction { - type Error = BdkError; - fn try_from(tx: bdk::bitcoin::Transaction) -> Result { - Ok(BdkTransaction { - s: serde_json::to_string(&tx) - .map_err(|e| BdkError::InvalidTransaction(e.to_string()))?, - }) - } -} -impl TryFrom<&BdkTransaction> for bdk::bitcoin::Transaction { - type Error = BdkError; - fn try_from(tx: &BdkTransaction) -> Result { - serde_json::from_str(&tx.s).map_err(|e| BdkError::InvalidTransaction(e.to_string())) - } -} -///Configuration type for a SqliteDatabase database -pub struct SqliteDbConfiguration { - ///Main directory of the db - pub path: String, -} -///Configuration type for a sled Tree database -pub struct SledDbConfiguration { - ///Main directory of the db - pub path: String, - ///Name of the database tree, a separated namespace for the data - pub tree_name: String, -} -/// Type that can contain any of the database configurations defined by the library -/// This allows storing a single configuration that can be loaded into an DatabaseConfig -/// instance. Wallets that plan to offer users the ability to switch blockchain backend at runtime -/// will find this particularly useful. -pub enum DatabaseConfig { - Memory, - ///Simple key-value embedded database based on sled - Sqlite { - config: SqliteDbConfiguration, - }, - ///Sqlite embedded database using rusqlite - Sled { - config: SledDbConfiguration, - }, -} -impl From for AnyDatabaseConfig { - fn from(config: DatabaseConfig) -> Self { - match config { - DatabaseConfig::Memory => AnyDatabaseConfig::Memory(()), - DatabaseConfig::Sqlite { config } => { - AnyDatabaseConfig::Sqlite(bdk::database::any::SqliteDbConfiguration { - path: config.path, - }) - } - DatabaseConfig::Sled { config } => { - AnyDatabaseConfig::Sled(bdk::database::any::SledDbConfiguration { - path: config.path, - tree_name: config.tree_name, - }) - } - } - } -} - -#[derive(Debug, Clone)] -///Types of keychains -pub enum KeychainKind { - ExternalChain, - ///Internal, usually used for change outputs - InternalChain, -} -impl From for KeychainKind { - fn from(e: bdk::KeychainKind) -> Self { - match e { - bdk::KeychainKind::External => KeychainKind::ExternalChain, - bdk::KeychainKind::Internal => KeychainKind::InternalChain, - } - } -} -impl From for bdk::KeychainKind { - fn from(kind: KeychainKind) -> Self { - match kind { - KeychainKind::ExternalChain => bdk::KeychainKind::External, - KeychainKind::InternalChain => bdk::KeychainKind::Internal, - } - } -} -///Unspent outputs of this wallet -pub struct LocalUtxo { - pub outpoint: OutPoint, - pub txout: TxOut, - pub keychain: KeychainKind, - pub is_spent: bool, -} -impl From for LocalUtxo { - fn from(local_utxo: bdk::LocalUtxo) -> Self { - LocalUtxo { - outpoint: OutPoint { - txid: local_utxo.outpoint.txid.to_string(), - vout: local_utxo.outpoint.vout, - }, - txout: TxOut { - value: local_utxo.txout.value, - script_pubkey: BdkScriptBuf { - bytes: local_utxo.txout.script_pubkey.into_bytes(), - }, - }, - keychain: local_utxo.keychain.into(), - is_spent: local_utxo.is_spent, - } - } -} -impl TryFrom for bdk::LocalUtxo { - type Error = BdkError; - - fn try_from(value: LocalUtxo) -> Result { - Ok(Self { - outpoint: (&value.outpoint).try_into()?, - txout: value.txout.into(), - keychain: value.keychain.into(), - is_spent: value.is_spent, - }) - } -} -/// Options for a software signer -/// -/// Adjust the behavior of our software signers and the way a transaction is finalized -#[derive(Debug, Clone, Default)] -pub struct SignOptions { - /// Whether the signer should trust the `witness_utxo`, if the `non_witness_utxo` hasn't been - /// provided - /// - /// Defaults to `false` to mitigate the "SegWit bug" which should trick the wallet into - /// paying a fee larger than expected. - /// - /// Some wallets, especially if relatively old, might not provide the `non_witness_utxo` for - /// SegWit transactions in the PSBT they generate: in those cases setting this to `true` - /// should correctly produce a signature, at the expense of an increased trust in the creator - /// of the PSBT. - /// - /// For more details see: - pub trust_witness_utxo: bool, - - /// Whether the wallet should assume a specific height has been reached when trying to finalize - /// a transaction - /// - /// The wallet will only "use" a timelock to satisfy the spending policy of an input if the - /// timelock height has already been reached. This option allows overriding the "current height" to let the - /// wallet use timelocks in the future to spend a coin. - pub assume_height: Option, - - /// Whether the signer should use the `sighash_type` set in the PSBT when signing, no matter - /// what its value is - /// - /// Defaults to `false` which will only allow signing using `SIGHASH_ALL`. - pub allow_all_sighashes: bool, - - /// Whether to remove partial signatures from the PSBT inputs while finalizing PSBT. - /// - /// Defaults to `true` which will remove partial signatures during finalization. - pub remove_partial_sigs: bool, - - /// Whether to try finalizing the PSBT after the inputs are signed. - /// - /// Defaults to `true` which will try finalizing PSBT after inputs are signed. - pub try_finalize: bool, - - // Specifies which Taproot script-spend leaves we should sign for. This option is - // ignored if we're signing a non-taproot PSBT. - // - // Defaults to All, i.e., the wallet will sign all the leaves it has a key for. - // TODO pub tap_leaves_options: TapLeavesOptions, - /// Whether we should try to sign a taproot transaction with the taproot internal key - /// or not. This option is ignored if we're signing a non-taproot PSBT. - /// - /// Defaults to `true`, i.e., we always try to sign with the taproot internal key. - pub sign_with_tap_internal_key: bool, - - /// Whether we should grind ECDSA signature to ensure signing with low r - /// or not. - /// Defaults to `true`, i.e., we always grind ECDSA signature to sign with low r. - pub allow_grinding: bool, -} -impl From for bdk::SignOptions { - fn from(sign_options: SignOptions) -> Self { - bdk::SignOptions { - trust_witness_utxo: sign_options.trust_witness_utxo, - assume_height: sign_options.assume_height, - allow_all_sighashes: sign_options.allow_all_sighashes, - remove_partial_sigs: sign_options.remove_partial_sigs, - try_finalize: sign_options.try_finalize, - tap_leaves_options: Default::default(), - sign_with_tap_internal_key: sign_options.sign_with_tap_internal_key, - allow_grinding: sign_options.allow_grinding, - } - } -} -#[derive(Copy, Clone)] -pub struct FeeRate { - pub sat_per_vb: f32, -} -impl From for bdk::FeeRate { - fn from(value: FeeRate) -> Self { - bdk::FeeRate::from_sat_per_vb(value.sat_per_vb) - } -} -impl From for FeeRate { - fn from(value: bdk::FeeRate) -> Self { - Self { - sat_per_vb: value.as_sat_per_vb(), - } - } -} - -/// A key-value map for an input of the corresponding index in the unsigned -pub struct Input { - pub s: String, -} -impl TryFrom for bdk::bitcoin::psbt::Input { - type Error = BdkError; - fn try_from(value: Input) -> Result { - serde_json::from_str(value.s.as_str()).map_err(|e| BdkError::InvalidInput(e.to_string())) - } -} -impl TryFrom for Input { - type Error = BdkError; - - fn try_from(value: bdk::bitcoin::psbt::Input) -> Result { - Ok(Input { - s: serde_json::to_string(&value).map_err(|e| BdkError::InvalidInput(e.to_string()))?, - }) - } -} -#[derive(Debug, Clone)] -pub struct BdkPolicy { - pub ptr: RustOpaque, -} -impl BdkPolicy { - #[frb(sync)] - pub fn id(&self) -> String { - self.ptr.id.clone() - } - #[frb(sync)] - pub fn as_string(&self) -> Result { - serde_json::to_string(&*self.ptr).map_err(|e| BdkError::Generic(e.to_string())) - } - #[frb(sync)] - pub fn requires_path(&self) -> bool { - self.ptr.requires_path() - } - #[frb(sync)] - pub fn item(&self) -> SatisfiableItem { - self.ptr.item.clone().into() - } - #[frb(sync)] - pub fn satisfaction(&self) -> Satisfaction { - self.ptr.satisfaction.clone().into() - } - #[frb(sync)] - pub fn contribution(&self) -> Satisfaction { - self.ptr.contribution.clone().into() - } -} -impl From for BdkPolicy { - fn from(value: bdk::descriptor::Policy) -> Self { - BdkPolicy { - ptr: RustOpaque::new(value), - } - } -} - -#[derive(Debug, Clone)] -pub enum SatisfiableItem { - EcdsaSignature { - key: PkOrF, - }, - SchnorrSignature { - key: PkOrF, - }, - Sha256Preimage { - hash: String, - }, - Hash256Preimage { - hash: String, - }, - Ripemd160Preimage { - hash: String, - }, - Hash160Preimage { - hash: String, - }, - AbsoluteTimelock { - value: LockTime, - }, - RelativeTimelock { - value: u32, - }, - - Multisig { - keys: Vec, - - threshold: u64, - }, - - Thresh { - items: Vec, - - threshold: u64, - }, -} -impl From for SatisfiableItem { - fn from(value: bdk::descriptor::policy::SatisfiableItem) -> Self { - match value { - bdk::descriptor::policy::SatisfiableItem::EcdsaSignature(pk_or_f) => { - SatisfiableItem::EcdsaSignature { - key: pk_or_f.into(), - } - } - bdk::descriptor::policy::SatisfiableItem::SchnorrSignature(pk_or_f) => { - SatisfiableItem::SchnorrSignature { - key: pk_or_f.into(), - } - } - bdk::descriptor::policy::SatisfiableItem::Sha256Preimage { hash } => { - SatisfiableItem::Sha256Preimage { - hash: hash.to_string(), - } - } - bdk::descriptor::policy::SatisfiableItem::Hash256Preimage { hash } => { - SatisfiableItem::Hash256Preimage { - hash: hash.to_string(), - } - } - bdk::descriptor::policy::SatisfiableItem::Ripemd160Preimage { hash } => { - SatisfiableItem::Ripemd160Preimage { - hash: hash.to_string(), - } - } - bdk::descriptor::policy::SatisfiableItem::Hash160Preimage { hash } => { - SatisfiableItem::Hash160Preimage { - hash: hash.to_string(), - } - } - bdk::descriptor::policy::SatisfiableItem::AbsoluteTimelock { value } => { - SatisfiableItem::AbsoluteTimelock { - value: value.into(), - } - } - bdk::descriptor::policy::SatisfiableItem::RelativeTimelock { value } => { - SatisfiableItem::RelativeTimelock { - value: value.to_consensus_u32(), - } - } - bdk::descriptor::policy::SatisfiableItem::Multisig { keys, threshold } => { - SatisfiableItem::Multisig { - keys: keys.iter().map(|e| e.to_owned().into()).collect(), - threshold: threshold as u64, - } - } - bdk::descriptor::policy::SatisfiableItem::Thresh { items, threshold } => { - SatisfiableItem::Thresh { - items: items.iter().map(|e| e.to_owned().into()).collect(), - threshold: threshold as u64, - } - } - } - } -} - -#[derive(Debug, Clone)] -pub enum PkOrF { - Pubkey { value: String }, - XOnlyPubkey { value: String }, - Fingerprint { value: String }, -} -impl From for PkOrF { - fn from(value: bdk::descriptor::policy::PkOrF) -> Self { - match value { - bdk::descriptor::policy::PkOrF::Pubkey(public_key) => PkOrF::Pubkey { - value: public_key.to_string(), - }, - bdk::descriptor::policy::PkOrF::XOnlyPubkey(xonly_public_key) => PkOrF::XOnlyPubkey { - value: xonly_public_key.to_string(), - }, - bdk::descriptor::policy::PkOrF::Fingerprint(fingerprint) => PkOrF::Fingerprint { - value: fingerprint.to_string(), - }, - } - } -} - -#[derive(Debug, Clone)] -pub enum Satisfaction { - Partial { - n: u64, - m: u64, - items: Vec, - sorted: Option, - conditions: HashMap>, - }, - PartialComplete { - n: u64, - m: u64, - items: Vec, - sorted: Option, - conditions: HashMap, Vec>, - }, - Complete { - condition: Condition, - }, - - None { - msg: String, - }, -} -impl From for Satisfaction { - fn from(value: bdk::descriptor::policy::Satisfaction) -> Self { - match value { - bdk::descriptor::policy::Satisfaction::Partial { - n, - m, - items, - sorted, - conditions, - } => Satisfaction::Partial { - n: n as u64, - m: m as u64, - items: items.iter().map(|e| e.to_owned() as u64).collect(), - sorted, - conditions: conditions - .into_iter() - .map(|(index, conditions)| { - ( - index as u32, - conditions.into_iter().map(|e| e.into()).collect(), - ) - }) - .collect(), - }, - bdk::descriptor::policy::Satisfaction::PartialComplete { - n, - m, - items, - sorted, - conditions, - } => Satisfaction::PartialComplete { - n: n as u64, - m: m as u64, - items: items.iter().map(|e| e.to_owned() as u64).collect(), - sorted, - conditions: conditions - .into_iter() - .map(|(index, conditions)| { - ( - index.iter().map(|e| e.to_owned() as u32).collect(), - conditions.into_iter().map(|e| e.into()).collect(), // Convert each `Condition` to `YourType` - ) - }) - .collect(), - }, - bdk::descriptor::policy::Satisfaction::Complete { condition } => { - Satisfaction::Complete { - condition: condition.into(), - } - } - bdk::descriptor::policy::Satisfaction::None => Satisfaction::None { - msg: "Cannot satisfy or contribute to the policy item".to_string(), - }, - } - } -} - -#[derive(Debug, Clone)] -pub struct Condition { - pub csv: Option, - pub timelock: Option, -} -impl From for Condition { - fn from(value: bdk::descriptor::policy::Condition) -> Self { - Condition { - csv: value.csv.map(|e| e.to_consensus_u32()), - timelock: value.timelock.map(|e| e.into()), - } - } -} diff --git a/rust/src/api/wallet.rs b/rust/src/api/wallet.rs deleted file mode 100644 index dcbcf2c5..00000000 --- a/rust/src/api/wallet.rs +++ /dev/null @@ -1,329 +0,0 @@ -use crate::api::descriptor::BdkDescriptor; -use crate::api::types::{ - AddressIndex, Balance, BdkAddress, BdkScriptBuf, ChangeSpendPolicy, DatabaseConfig, Input, - KeychainKind, LocalUtxo, Network, OutPoint, PsbtSigHashType, RbfValue, ScriptAmount, - SignOptions, TransactionDetails, -}; -use std::collections::{BTreeMap, HashMap}; -use std::ops::Deref; -use std::str::FromStr; - -use crate::api::blockchain::BdkBlockchain; -use crate::api::error::BdkError; -use crate::api::psbt::BdkPsbt; -use crate::frb_generated::RustOpaque; -use bdk::bitcoin::script::PushBytesBuf; -use bdk::bitcoin::{Sequence, Txid}; -pub use bdk::blockchain::GetTx; - -use bdk::database::ConfigurableDatabase; -use flutter_rust_bridge::frb; - -use super::execute_with_lock; -use super::types::BdkPolicy; - -#[derive(Debug)] -pub struct BdkWallet { - pub ptr: RustOpaque>>, -} -impl BdkWallet { - pub fn new( - descriptor: BdkDescriptor, - change_descriptor: Option, - network: Network, - database_config: DatabaseConfig, - ) -> Result { - let database = bdk::database::AnyDatabase::from_config(&database_config.into())?; - let descriptor: String = descriptor.to_string_private(); - let change_descriptor: Option = change_descriptor.map(|d| d.to_string_private()); - - let wallet = bdk::Wallet::new( - &descriptor, - change_descriptor.as_ref(), - network.into(), - database, - )?; - Ok(BdkWallet { - ptr: RustOpaque::new(std::sync::Mutex::new(wallet)), - }) - } - - /// Get the Bitcoin network the wallet is using. - #[frb(sync)] - pub fn network(&self) -> Result { - execute_with_lock(&self.ptr, |w| w.network().into()) - } - #[frb(sync)] - pub fn is_mine(ptr: BdkWallet, script: BdkScriptBuf) -> Result { - execute_with_lock(&ptr.ptr, |w| { - w.is_mine(>::into(script).as_script()) - .map_err(|e| e.into()) - })? - } - /// Return a derived address using the external descriptor, see AddressIndex for available address index selection - /// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) - /// then the same address will always be returned for any AddressIndex. - #[frb(sync)] - pub fn get_address( - ptr: BdkWallet, - address_index: AddressIndex, - ) -> Result<(BdkAddress, u32), BdkError> { - execute_with_lock(&ptr.ptr, |w| { - w.get_address(address_index.into()) - .map(|e| (e.address.into(), e.index)) - .map_err(|e| e.into()) - })? - } - - /// Return a derived address using the internal (change) descriptor. - /// - /// If the wallet doesn't have an internal descriptor it will use the external descriptor. - /// - /// see [AddressIndex] for available address index selection strategies. If none of the keys - /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always - /// be returned for any [AddressIndex]. - #[frb(sync)] - pub fn get_internal_address( - ptr: BdkWallet, - address_index: AddressIndex, - ) -> Result<(BdkAddress, u32), BdkError> { - execute_with_lock(&ptr.ptr, |w| { - w.get_internal_address(address_index.into()) - .map(|e| (e.address.into(), e.index)) - .map_err(|e| e.into()) - })? - } - - /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates - /// on the internal database, which first needs to be Wallet.sync manually. - #[frb(sync)] - pub fn get_balance(&self) -> Result { - execute_with_lock(&self.ptr, |w| { - w.get_balance().map(|b| b.into()).map_err(|e| e.into()) - })? - } - /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. - #[frb(sync)] - pub fn list_transactions( - &self, - include_raw: bool, - ) -> Result, BdkError> { - execute_with_lock(&self.ptr, |wallet| { - let mut transaction_details = vec![]; - - // List transactions and convert them using try_into - for e in wallet.list_transactions(include_raw)?.into_iter() { - transaction_details.push(e.try_into()?); - } - - Ok(transaction_details) - })? - } - - /// Return the list of unspent outputs of this wallet. Note that this method only operates on the internal database, - /// which first needs to be Wallet.sync manually. - #[frb(sync)] - pub fn list_unspent(&self) -> Result, BdkError> { - execute_with_lock(&self.ptr, |w| { - let unspent: Vec = w.list_unspent()?; - Ok(unspent.into_iter().map(LocalUtxo::from).collect()) - })? - } - - /// Sign a transaction with all the wallet's signers. This function returns an encapsulated bool that - /// has the value true if the PSBT was finalized, or false otherwise. - /// - /// The [SignOptions] can be used to tweak the behavior of the software signers, and the way - /// the transaction is finalized at the end. Note that it can't be guaranteed that *every* - /// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined - /// in this library will. - pub fn sign( - ptr: BdkWallet, - psbt: BdkPsbt, - sign_options: Option, - ) -> Result { - let mut psbt = psbt - .ptr - .lock() - .map_err(|_| BdkError::Generic("Poison Error!".to_string()))?; - execute_with_lock(&ptr.ptr, |w| { - w.sign( - &mut psbt, - sign_options.map(SignOptions::into).unwrap_or_default(), - ) - .map_err(|e| e.into()) - })? - } - /// Sync the internal database with the blockchain. - pub fn sync(ptr: BdkWallet, blockchain: &BdkBlockchain) -> Result<(), BdkError> { - execute_with_lock(&ptr.ptr, |w| { - w.sync(blockchain.ptr.deref(), bdk::SyncOptions::default()) - .map_err(|e| e.into()) - })? - } - - ///get the corresponding PSBT Input for a LocalUtxo - pub fn get_psbt_input( - &self, - utxo: LocalUtxo, - only_witness_utxo: bool, - sighash_type: Option, - ) -> anyhow::Result { - execute_with_lock(&self.ptr, |w| { - let input = w.get_psbt_input( - utxo.try_into()?, - sighash_type.map(|e| e.into()), - only_witness_utxo, - )?; - input.try_into() - })? - } - ///Returns the descriptor used to create addresses for a particular keychain. - #[frb(sync)] - pub fn get_descriptor_for_keychain( - ptr: BdkWallet, - keychain: KeychainKind, - ) -> anyhow::Result { - execute_with_lock(&ptr.ptr, |w| { - let extended_descriptor = w.get_descriptor_for_keychain(keychain.into()); - BdkDescriptor::new(extended_descriptor.to_string(), w.network().into()) - })? - } - #[frb(sync)] - pub fn policies(ptr: BdkWallet, keychain: KeychainKind) -> Result, BdkError> { - execute_with_lock(&ptr.ptr, |w| { - w.policies(keychain.into()) - .map_err(|e| e.into()) - .map(|e| e.map(|f| f.into())) - })? - } -} - -pub fn finish_bump_fee_tx_builder( - txid: String, - fee_rate: f32, - allow_shrinking: Option, - wallet: BdkWallet, - enable_rbf: bool, - n_sequence: Option, -) -> anyhow::Result<(BdkPsbt, TransactionDetails), BdkError> { - let txid = Txid::from_str(txid.as_str()).map_err(|e| BdkError::PsbtParse(e.to_string()))?; - execute_with_lock(&wallet.ptr, |w| { - let mut tx_builder = w.build_fee_bump(txid)?; - tx_builder.fee_rate(bdk::FeeRate::from_sat_per_vb(fee_rate)); - if let Some(allow_shrinking) = &allow_shrinking { - let address = allow_shrinking.ptr.clone(); - let script = address.script_pubkey(); - tx_builder.allow_shrinking(script)?; - } - if let Some(n_sequence) = n_sequence { - tx_builder.enable_rbf_with_sequence(Sequence(n_sequence)); - } - if enable_rbf { - tx_builder.enable_rbf(); - } - return match tx_builder.finish() { - Ok(e) => Ok((e.0.into(), TransactionDetails::try_from(e.1)?)), - Err(e) => Err(e.into()), - }; - })? -} - -pub fn tx_builder_finish( - wallet: BdkWallet, - recipients: Vec, - utxos: Vec, - foreign_utxo: Option<(OutPoint, Input, usize)>, - un_spendable: Vec, - change_policy: ChangeSpendPolicy, - manually_selected_only: bool, - fee_rate: Option, - fee_absolute: Option, - drain_wallet: bool, - drain_to: Option, - rbf: Option, - internal_policy_path: Option>>, - external_policy_path: Option>>, - data: Vec, -) -> anyhow::Result<(BdkPsbt, TransactionDetails), BdkError> { - execute_with_lock(&wallet.ptr, |w| { - let mut tx_builder = w.build_tx(); - if let Some(path) = internal_policy_path { - tx_builder.policy_path( - path.into_iter() - .map(|(key, value)| (key, value.into_iter().map(|x| x as usize).collect())) - .collect::>>(), - bdk::KeychainKind::Internal, - ); - } - if let Some(path) = external_policy_path { - tx_builder.policy_path( - path.into_iter() - .map(|(key, value)| (key, value.into_iter().map(|x| x as usize).collect())) - .collect::>>(), - bdk::KeychainKind::External, - ); - } - for e in recipients { - tx_builder.add_recipient(e.script.into(), e.amount); - } - tx_builder.change_policy(change_policy.into()); - - if !utxos.is_empty() { - let bdk_utxos = utxos - .iter() - .map(|e| bdk::bitcoin::OutPoint::try_from(e)) - .collect::, BdkError>>()?; - tx_builder - .add_utxos(bdk_utxos.as_slice()) - .map_err(|e| >::into(e))?; - } - if !un_spendable.is_empty() { - let bdk_unspendable = un_spendable - .iter() - .map(|e| bdk::bitcoin::OutPoint::try_from(e)) - .collect::, BdkError>>()?; - tx_builder.unspendable(bdk_unspendable); - } - if manually_selected_only { - tx_builder.manually_selected_only(); - } - if let Some(sat_per_vb) = fee_rate { - tx_builder.fee_rate(bdk::FeeRate::from_sat_per_vb(sat_per_vb)); - } - if let Some(fee_amount) = fee_absolute { - tx_builder.fee_absolute(fee_amount); - } - if drain_wallet { - tx_builder.drain_wallet(); - } - if let Some(script_) = drain_to { - tx_builder.drain_to(script_.into()); - } - if let Some(utxo) = foreign_utxo { - let foreign_utxo: bdk::bitcoin::psbt::Input = utxo.1.try_into()?; - tx_builder.add_foreign_utxo((&utxo.0).try_into()?, foreign_utxo, utxo.2)?; - } - if let Some(rbf) = &rbf { - match rbf { - RbfValue::RbfDefault => { - tx_builder.enable_rbf(); - } - RbfValue::Value(nsequence) => { - tx_builder.enable_rbf_with_sequence(Sequence(nsequence.to_owned())); - } - } - } - if !data.is_empty() { - let push_bytes = PushBytesBuf::try_from(data.clone()).map_err(|_| { - BdkError::Generic("Failed to convert data to PushBytes".to_string()) - })?; - tx_builder.add_data(&push_bytes); - } - - return match tx_builder.finish() { - Ok(e) => Ok((e.0.into(), TransactionDetails::try_from(&e.1)?)), - Err(e) => Err(e.into()), - }; - })? -} diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs deleted file mode 100644 index e823f8d2..00000000 --- a/rust/src/frb_generated.io.rs +++ /dev/null @@ -1,4856 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// Section: imports - -use super::*; -use crate::*; -use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; -use flutter_rust_bridge::{Handler, IntoIntoDart}; - -// Section: boilerplate - -flutter_rust_bridge::frb_generated_boilerplate_io!(); - -// Section: dart2rust - -impl CstDecode>> - for *mut wire_cst_list_record_string_list_prim_u_32_strict -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> std::collections::HashMap> { - let vec: Vec<(String, Vec)> = self.cst_decode(); - vec.into_iter().collect() - } -} -impl CstDecode, Vec>> - for *mut wire_cst_list_record_list_prim_u_32_strict_list_condition -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> std::collections::HashMap, Vec> { - let vec: Vec<(Vec, Vec)> = self.cst_decode(); - vec.into_iter().collect() - } -} -impl CstDecode>> - for *mut wire_cst_list_record_u_32_list_condition -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> std::collections::HashMap> { - let vec: Vec<(u32, Vec)> = self.cst_decode(); - vec.into_iter().collect() - } -} -impl CstDecode> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode>>> for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode( - self, - ) -> RustOpaqueNom>> { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode>> - for usize -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode( - self, - ) -> RustOpaqueNom> { - unsafe { decode_rust_opaque_nom(self as _) } - } -} -impl CstDecode for *mut wire_cst_list_prim_u_8_strict { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> String { - let vec: Vec = self.cst_decode(); - String::from_utf8(vec).unwrap() - } -} -impl CstDecode for wire_cst_address_error { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::AddressError { - match self.tag { - 0 => { - let ans = unsafe { self.kind.Base58 }; - crate::api::error::AddressError::Base58(ans.field0.cst_decode()) - } - 1 => { - let ans = unsafe { self.kind.Bech32 }; - crate::api::error::AddressError::Bech32(ans.field0.cst_decode()) - } - 2 => crate::api::error::AddressError::EmptyBech32Payload, - 3 => { - let ans = unsafe { self.kind.InvalidBech32Variant }; - crate::api::error::AddressError::InvalidBech32Variant { - expected: ans.expected.cst_decode(), - found: ans.found.cst_decode(), - } - } - 4 => { - let ans = unsafe { self.kind.InvalidWitnessVersion }; - crate::api::error::AddressError::InvalidWitnessVersion(ans.field0.cst_decode()) - } - 5 => { - let ans = unsafe { self.kind.UnparsableWitnessVersion }; - crate::api::error::AddressError::UnparsableWitnessVersion(ans.field0.cst_decode()) - } - 6 => crate::api::error::AddressError::MalformedWitnessVersion, - 7 => { - let ans = unsafe { self.kind.InvalidWitnessProgramLength }; - crate::api::error::AddressError::InvalidWitnessProgramLength( - ans.field0.cst_decode(), - ) - } - 8 => { - let ans = unsafe { self.kind.InvalidSegwitV0ProgramLength }; - crate::api::error::AddressError::InvalidSegwitV0ProgramLength( - ans.field0.cst_decode(), - ) - } - 9 => crate::api::error::AddressError::UncompressedPubkey, - 10 => crate::api::error::AddressError::ExcessiveScriptSize, - 11 => crate::api::error::AddressError::UnrecognizedScript, - 12 => { - let ans = unsafe { self.kind.UnknownAddressType }; - crate::api::error::AddressError::UnknownAddressType(ans.field0.cst_decode()) - } - 13 => { - let ans = unsafe { self.kind.NetworkValidation }; - crate::api::error::AddressError::NetworkValidation { - network_required: ans.network_required.cst_decode(), - network_found: ans.network_found.cst_decode(), - address: ans.address.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_address_index { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::AddressIndex { - match self.tag { - 0 => crate::api::types::AddressIndex::Increase, - 1 => crate::api::types::AddressIndex::LastUnused, - 2 => { - let ans = unsafe { self.kind.Peek }; - crate::api::types::AddressIndex::Peek { - index: ans.index.cst_decode(), - } - } - 3 => { - let ans = unsafe { self.kind.Reset }; - crate::api::types::AddressIndex::Reset { - index: ans.index.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_auth { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::Auth { - match self.tag { - 0 => crate::api::blockchain::Auth::None, - 1 => { - let ans = unsafe { self.kind.UserPass }; - crate::api::blockchain::Auth::UserPass { - username: ans.username.cst_decode(), - password: ans.password.cst_decode(), - } - } - 2 => { - let ans = unsafe { self.kind.Cookie }; - crate::api::blockchain::Auth::Cookie { - file: ans.file.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_balance { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Balance { - crate::api::types::Balance { - immature: self.immature.cst_decode(), - trusted_pending: self.trusted_pending.cst_decode(), - untrusted_pending: self.untrusted_pending.cst_decode(), - confirmed: self.confirmed.cst_decode(), - spendable: self.spendable.cst_decode(), - total: self.total.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_address { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkAddress { - crate::api::types::BdkAddress { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_blockchain { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::BdkBlockchain { - crate::api::blockchain::BdkBlockchain { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_derivation_path { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDerivationPath { - crate::api::key::BdkDerivationPath { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_descriptor { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::descriptor::BdkDescriptor { - crate::api::descriptor::BdkDescriptor { - extended_descriptor: self.extended_descriptor.cst_decode(), - key_map: self.key_map.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_descriptor_public_key { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDescriptorPublicKey { - crate::api::key::BdkDescriptorPublicKey { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_descriptor_secret_key { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDescriptorSecretKey { - crate::api::key::BdkDescriptorSecretKey { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_error { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::BdkError { - match self.tag { - 0 => { - let ans = unsafe { self.kind.Hex }; - crate::api::error::BdkError::Hex(ans.field0.cst_decode()) - } - 1 => { - let ans = unsafe { self.kind.Consensus }; - crate::api::error::BdkError::Consensus(ans.field0.cst_decode()) - } - 2 => { - let ans = unsafe { self.kind.VerifyTransaction }; - crate::api::error::BdkError::VerifyTransaction(ans.field0.cst_decode()) - } - 3 => { - let ans = unsafe { self.kind.Address }; - crate::api::error::BdkError::Address(ans.field0.cst_decode()) - } - 4 => { - let ans = unsafe { self.kind.Descriptor }; - crate::api::error::BdkError::Descriptor(ans.field0.cst_decode()) - } - 5 => { - let ans = unsafe { self.kind.InvalidU32Bytes }; - crate::api::error::BdkError::InvalidU32Bytes(ans.field0.cst_decode()) - } - 6 => { - let ans = unsafe { self.kind.Generic }; - crate::api::error::BdkError::Generic(ans.field0.cst_decode()) - } - 7 => crate::api::error::BdkError::ScriptDoesntHaveAddressForm, - 8 => crate::api::error::BdkError::NoRecipients, - 9 => crate::api::error::BdkError::NoUtxosSelected, - 10 => { - let ans = unsafe { self.kind.OutputBelowDustLimit }; - crate::api::error::BdkError::OutputBelowDustLimit(ans.field0.cst_decode()) - } - 11 => { - let ans = unsafe { self.kind.InsufficientFunds }; - crate::api::error::BdkError::InsufficientFunds { - needed: ans.needed.cst_decode(), - available: ans.available.cst_decode(), - } - } - 12 => crate::api::error::BdkError::BnBTotalTriesExceeded, - 13 => crate::api::error::BdkError::BnBNoExactMatch, - 14 => crate::api::error::BdkError::UnknownUtxo, - 15 => crate::api::error::BdkError::TransactionNotFound, - 16 => crate::api::error::BdkError::TransactionConfirmed, - 17 => crate::api::error::BdkError::IrreplaceableTransaction, - 18 => { - let ans = unsafe { self.kind.FeeRateTooLow }; - crate::api::error::BdkError::FeeRateTooLow { - needed: ans.needed.cst_decode(), - } - } - 19 => { - let ans = unsafe { self.kind.FeeTooLow }; - crate::api::error::BdkError::FeeTooLow { - needed: ans.needed.cst_decode(), - } - } - 20 => crate::api::error::BdkError::FeeRateUnavailable, - 21 => { - let ans = unsafe { self.kind.MissingKeyOrigin }; - crate::api::error::BdkError::MissingKeyOrigin(ans.field0.cst_decode()) - } - 22 => { - let ans = unsafe { self.kind.Key }; - crate::api::error::BdkError::Key(ans.field0.cst_decode()) - } - 23 => crate::api::error::BdkError::ChecksumMismatch, - 24 => { - let ans = unsafe { self.kind.SpendingPolicyRequired }; - crate::api::error::BdkError::SpendingPolicyRequired(ans.field0.cst_decode()) - } - 25 => { - let ans = unsafe { self.kind.InvalidPolicyPathError }; - crate::api::error::BdkError::InvalidPolicyPathError(ans.field0.cst_decode()) - } - 26 => { - let ans = unsafe { self.kind.Signer }; - crate::api::error::BdkError::Signer(ans.field0.cst_decode()) - } - 27 => { - let ans = unsafe { self.kind.InvalidNetwork }; - crate::api::error::BdkError::InvalidNetwork { - requested: ans.requested.cst_decode(), - found: ans.found.cst_decode(), - } - } - 28 => { - let ans = unsafe { self.kind.InvalidOutpoint }; - crate::api::error::BdkError::InvalidOutpoint(ans.field0.cst_decode()) - } - 29 => { - let ans = unsafe { self.kind.Encode }; - crate::api::error::BdkError::Encode(ans.field0.cst_decode()) - } - 30 => { - let ans = unsafe { self.kind.Miniscript }; - crate::api::error::BdkError::Miniscript(ans.field0.cst_decode()) - } - 31 => { - let ans = unsafe { self.kind.MiniscriptPsbt }; - crate::api::error::BdkError::MiniscriptPsbt(ans.field0.cst_decode()) - } - 32 => { - let ans = unsafe { self.kind.Bip32 }; - crate::api::error::BdkError::Bip32(ans.field0.cst_decode()) - } - 33 => { - let ans = unsafe { self.kind.Bip39 }; - crate::api::error::BdkError::Bip39(ans.field0.cst_decode()) - } - 34 => { - let ans = unsafe { self.kind.Secp256k1 }; - crate::api::error::BdkError::Secp256k1(ans.field0.cst_decode()) - } - 35 => { - let ans = unsafe { self.kind.Json }; - crate::api::error::BdkError::Json(ans.field0.cst_decode()) - } - 36 => { - let ans = unsafe { self.kind.Psbt }; - crate::api::error::BdkError::Psbt(ans.field0.cst_decode()) - } - 37 => { - let ans = unsafe { self.kind.PsbtParse }; - crate::api::error::BdkError::PsbtParse(ans.field0.cst_decode()) - } - 38 => { - let ans = unsafe { self.kind.MissingCachedScripts }; - crate::api::error::BdkError::MissingCachedScripts( - ans.field0.cst_decode(), - ans.field1.cst_decode(), - ) - } - 39 => { - let ans = unsafe { self.kind.Electrum }; - crate::api::error::BdkError::Electrum(ans.field0.cst_decode()) - } - 40 => { - let ans = unsafe { self.kind.Esplora }; - crate::api::error::BdkError::Esplora(ans.field0.cst_decode()) - } - 41 => { - let ans = unsafe { self.kind.Sled }; - crate::api::error::BdkError::Sled(ans.field0.cst_decode()) - } - 42 => { - let ans = unsafe { self.kind.Rpc }; - crate::api::error::BdkError::Rpc(ans.field0.cst_decode()) - } - 43 => { - let ans = unsafe { self.kind.Rusqlite }; - crate::api::error::BdkError::Rusqlite(ans.field0.cst_decode()) - } - 44 => { - let ans = unsafe { self.kind.InvalidInput }; - crate::api::error::BdkError::InvalidInput(ans.field0.cst_decode()) - } - 45 => { - let ans = unsafe { self.kind.InvalidLockTime }; - crate::api::error::BdkError::InvalidLockTime(ans.field0.cst_decode()) - } - 46 => { - let ans = unsafe { self.kind.InvalidTransaction }; - crate::api::error::BdkError::InvalidTransaction(ans.field0.cst_decode()) - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_bdk_mnemonic { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkMnemonic { - crate::api::key::BdkMnemonic { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_policy { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkPolicy { - crate::api::types::BdkPolicy { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_psbt { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::psbt::BdkPsbt { - crate::api::psbt::BdkPsbt { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_script_buf { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkScriptBuf { - crate::api::types::BdkScriptBuf { - bytes: self.bytes.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_transaction { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkTransaction { - crate::api::types::BdkTransaction { - s: self.s.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_wallet { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::wallet::BdkWallet { - crate::api::wallet::BdkWallet { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_block_time { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BlockTime { - crate::api::types::BlockTime { - height: self.height.cst_decode(), - timestamp: self.timestamp.cst_decode(), - } - } -} -impl CstDecode for wire_cst_blockchain_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::BlockchainConfig { - match self.tag { - 0 => { - let ans = unsafe { self.kind.Electrum }; - crate::api::blockchain::BlockchainConfig::Electrum { - config: ans.config.cst_decode(), - } - } - 1 => { - let ans = unsafe { self.kind.Esplora }; - crate::api::blockchain::BlockchainConfig::Esplora { - config: ans.config.cst_decode(), - } - } - 2 => { - let ans = unsafe { self.kind.Rpc }; - crate::api::blockchain::BlockchainConfig::Rpc { - config: ans.config.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for *mut wire_cst_address_error { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::AddressError { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_address_index { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::AddressIndex { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_address { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkAddress { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_blockchain { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::BdkBlockchain { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_derivation_path { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDerivationPath { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_descriptor { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::descriptor::BdkDescriptor { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode - for *mut wire_cst_bdk_descriptor_public_key -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDescriptorPublicKey { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode - for *mut wire_cst_bdk_descriptor_secret_key -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDescriptorSecretKey { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_mnemonic { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkMnemonic { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_policy { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkPolicy { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_psbt { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::psbt::BdkPsbt { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_script_buf { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkScriptBuf { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_transaction { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkTransaction { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_bdk_wallet { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::wallet::BdkWallet { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_block_time { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BlockTime { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_blockchain_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::BlockchainConfig { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut bool { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> bool { - unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } - } -} -impl CstDecode for *mut wire_cst_condition { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Condition { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_consensus_error { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::ConsensusError { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_database_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::DatabaseConfig { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_descriptor_error { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::DescriptorError { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_electrum_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::ElectrumConfig { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_esplora_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::EsploraConfig { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut f32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> f32 { - unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } - } -} -impl CstDecode for *mut wire_cst_fee_rate { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::FeeRate { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_hex_error { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::HexError { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_local_utxo { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::LocalUtxo { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_lock_time { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::LockTime { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_out_point { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::OutPoint { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_pk_or_f { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::PkOrF { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_psbt_sig_hash_type { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::PsbtSigHashType { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_rbf_value { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::RbfValue { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode<(crate::api::types::OutPoint, crate::api::types::Input, usize)> - for *mut wire_cst_record_out_point_input_usize -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (crate::api::types::OutPoint, crate::api::types::Input, usize) { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::<(crate::api::types::OutPoint, crate::api::types::Input, usize)>::cst_decode( - *wrap, - ) - .into() - } -} -impl CstDecode for *mut wire_cst_rpc_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::RpcConfig { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_rpc_sync_params { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::RpcSyncParams { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_sign_options { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SignOptions { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_sled_db_configuration { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SledDbConfiguration { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_sqlite_db_configuration { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SqliteDbConfiguration { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut u32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u32 { - unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } - } -} -impl CstDecode for *mut u64 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u64 { - unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } - } -} -impl CstDecode for *mut u8 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u8 { - unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } - } -} -impl CstDecode for wire_cst_condition { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Condition { - crate::api::types::Condition { - csv: self.csv.cst_decode(), - timelock: self.timelock.cst_decode(), - } - } -} -impl CstDecode for wire_cst_consensus_error { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::ConsensusError { - match self.tag { - 0 => { - let ans = unsafe { self.kind.Io }; - crate::api::error::ConsensusError::Io(ans.field0.cst_decode()) - } - 1 => { - let ans = unsafe { self.kind.OversizedVectorAllocation }; - crate::api::error::ConsensusError::OversizedVectorAllocation { - requested: ans.requested.cst_decode(), - max: ans.max.cst_decode(), - } - } - 2 => { - let ans = unsafe { self.kind.InvalidChecksum }; - crate::api::error::ConsensusError::InvalidChecksum { - expected: ans.expected.cst_decode(), - actual: ans.actual.cst_decode(), - } - } - 3 => crate::api::error::ConsensusError::NonMinimalVarInt, - 4 => { - let ans = unsafe { self.kind.ParseFailed }; - crate::api::error::ConsensusError::ParseFailed(ans.field0.cst_decode()) - } - 5 => { - let ans = unsafe { self.kind.UnsupportedSegwitFlag }; - crate::api::error::ConsensusError::UnsupportedSegwitFlag(ans.field0.cst_decode()) - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_database_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::DatabaseConfig { - match self.tag { - 0 => crate::api::types::DatabaseConfig::Memory, - 1 => { - let ans = unsafe { self.kind.Sqlite }; - crate::api::types::DatabaseConfig::Sqlite { - config: ans.config.cst_decode(), - } - } - 2 => { - let ans = unsafe { self.kind.Sled }; - crate::api::types::DatabaseConfig::Sled { - config: ans.config.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_descriptor_error { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::DescriptorError { - match self.tag { - 0 => crate::api::error::DescriptorError::InvalidHdKeyPath, - 1 => crate::api::error::DescriptorError::InvalidDescriptorChecksum, - 2 => crate::api::error::DescriptorError::HardenedDerivationXpub, - 3 => crate::api::error::DescriptorError::MultiPath, - 4 => { - let ans = unsafe { self.kind.Key }; - crate::api::error::DescriptorError::Key(ans.field0.cst_decode()) - } - 5 => { - let ans = unsafe { self.kind.Policy }; - crate::api::error::DescriptorError::Policy(ans.field0.cst_decode()) - } - 6 => { - let ans = unsafe { self.kind.InvalidDescriptorCharacter }; - crate::api::error::DescriptorError::InvalidDescriptorCharacter( - ans.field0.cst_decode(), - ) - } - 7 => { - let ans = unsafe { self.kind.Bip32 }; - crate::api::error::DescriptorError::Bip32(ans.field0.cst_decode()) - } - 8 => { - let ans = unsafe { self.kind.Base58 }; - crate::api::error::DescriptorError::Base58(ans.field0.cst_decode()) - } - 9 => { - let ans = unsafe { self.kind.Pk }; - crate::api::error::DescriptorError::Pk(ans.field0.cst_decode()) - } - 10 => { - let ans = unsafe { self.kind.Miniscript }; - crate::api::error::DescriptorError::Miniscript(ans.field0.cst_decode()) - } - 11 => { - let ans = unsafe { self.kind.Hex }; - crate::api::error::DescriptorError::Hex(ans.field0.cst_decode()) - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_electrum_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::ElectrumConfig { - crate::api::blockchain::ElectrumConfig { - url: self.url.cst_decode(), - socks5: self.socks5.cst_decode(), - retry: self.retry.cst_decode(), - timeout: self.timeout.cst_decode(), - stop_gap: self.stop_gap.cst_decode(), - validate_domain: self.validate_domain.cst_decode(), - } - } -} -impl CstDecode for wire_cst_esplora_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::EsploraConfig { - crate::api::blockchain::EsploraConfig { - base_url: self.base_url.cst_decode(), - proxy: self.proxy.cst_decode(), - concurrency: self.concurrency.cst_decode(), - stop_gap: self.stop_gap.cst_decode(), - timeout: self.timeout.cst_decode(), - } - } -} -impl CstDecode for wire_cst_fee_rate { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::FeeRate { - crate::api::types::FeeRate { - sat_per_vb: self.sat_per_vb.cst_decode(), - } - } -} -impl CstDecode for wire_cst_hex_error { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::HexError { - match self.tag { - 0 => { - let ans = unsafe { self.kind.InvalidChar }; - crate::api::error::HexError::InvalidChar(ans.field0.cst_decode()) - } - 1 => { - let ans = unsafe { self.kind.OddLengthString }; - crate::api::error::HexError::OddLengthString(ans.field0.cst_decode()) - } - 2 => { - let ans = unsafe { self.kind.InvalidLength }; - crate::api::error::HexError::InvalidLength( - ans.field0.cst_decode(), - ans.field1.cst_decode(), - ) - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_input { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Input { - crate::api::types::Input { - s: self.s.cst_decode(), - } - } -} -impl CstDecode> for *mut wire_cst_list_bdk_policy { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode> for *mut wire_cst_list_condition { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode>> for *mut wire_cst_list_list_prim_u_8_strict { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec> { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode> for *mut wire_cst_list_local_utxo { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode> for *mut wire_cst_list_out_point { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode> for *mut wire_cst_list_pk_or_f { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode> for *mut wire_cst_list_prim_u_32_strict { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - } - } -} -impl CstDecode> for *mut wire_cst_list_prim_u_64_strict { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - } - } -} -impl CstDecode> for *mut wire_cst_list_prim_u_8_loose { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - } - } -} -impl CstDecode> for *mut wire_cst_list_prim_u_8_strict { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - } - } -} -impl CstDecode, Vec)>> - for *mut wire_cst_list_record_list_prim_u_32_strict_list_condition -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec<(Vec, Vec)> { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode)>> for *mut wire_cst_list_record_string_list_prim_u_32_strict { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec<(String, Vec)> { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode)>> - for *mut wire_cst_list_record_u_32_list_condition -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec<(u32, Vec)> { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode> for *mut wire_cst_list_script_amount { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode> - for *mut wire_cst_list_transaction_details -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode> for *mut wire_cst_list_tx_in { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode> for *mut wire_cst_list_tx_out { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let vec = unsafe { - let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); - flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(CstDecode::cst_decode).collect() - } -} -impl CstDecode for wire_cst_local_utxo { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::LocalUtxo { - crate::api::types::LocalUtxo { - outpoint: self.outpoint.cst_decode(), - txout: self.txout.cst_decode(), - keychain: self.keychain.cst_decode(), - is_spent: self.is_spent.cst_decode(), - } - } -} -impl CstDecode for wire_cst_lock_time { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::LockTime { - match self.tag { - 0 => { - let ans = unsafe { self.kind.Blocks }; - crate::api::types::LockTime::Blocks(ans.field0.cst_decode()) - } - 1 => { - let ans = unsafe { self.kind.Seconds }; - crate::api::types::LockTime::Seconds(ans.field0.cst_decode()) - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_out_point { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::OutPoint { - crate::api::types::OutPoint { - txid: self.txid.cst_decode(), - vout: self.vout.cst_decode(), - } - } -} -impl CstDecode for wire_cst_payload { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Payload { - match self.tag { - 0 => { - let ans = unsafe { self.kind.PubkeyHash }; - crate::api::types::Payload::PubkeyHash { - pubkey_hash: ans.pubkey_hash.cst_decode(), - } - } - 1 => { - let ans = unsafe { self.kind.ScriptHash }; - crate::api::types::Payload::ScriptHash { - script_hash: ans.script_hash.cst_decode(), - } - } - 2 => { - let ans = unsafe { self.kind.WitnessProgram }; - crate::api::types::Payload::WitnessProgram { - version: ans.version.cst_decode(), - program: ans.program.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_pk_or_f { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::PkOrF { - match self.tag { - 0 => { - let ans = unsafe { self.kind.Pubkey }; - crate::api::types::PkOrF::Pubkey { - value: ans.value.cst_decode(), - } - } - 1 => { - let ans = unsafe { self.kind.XOnlyPubkey }; - crate::api::types::PkOrF::XOnlyPubkey { - value: ans.value.cst_decode(), - } - } - 2 => { - let ans = unsafe { self.kind.Fingerprint }; - crate::api::types::PkOrF::Fingerprint { - value: ans.value.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_psbt_sig_hash_type { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::PsbtSigHashType { - crate::api::types::PsbtSigHashType { - inner: self.inner.cst_decode(), - } - } -} -impl CstDecode for wire_cst_rbf_value { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::RbfValue { - match self.tag { - 0 => crate::api::types::RbfValue::RbfDefault, - 1 => { - let ans = unsafe { self.kind.Value }; - crate::api::types::RbfValue::Value(ans.field0.cst_decode()) - } - _ => unreachable!(), - } - } -} -impl CstDecode<(crate::api::types::BdkAddress, u32)> for wire_cst_record_bdk_address_u_32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (crate::api::types::BdkAddress, u32) { - (self.field0.cst_decode(), self.field1.cst_decode()) - } -} -impl - CstDecode<( - crate::api::psbt::BdkPsbt, - crate::api::types::TransactionDetails, - )> for wire_cst_record_bdk_psbt_transaction_details -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode( - self, - ) -> ( - crate::api::psbt::BdkPsbt, - crate::api::types::TransactionDetails, - ) { - (self.field0.cst_decode(), self.field1.cst_decode()) - } -} -impl CstDecode<(Vec, Vec)> - for wire_cst_record_list_prim_u_32_strict_list_condition -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (Vec, Vec) { - (self.field0.cst_decode(), self.field1.cst_decode()) - } -} -impl CstDecode<(crate::api::types::OutPoint, crate::api::types::Input, usize)> - for wire_cst_record_out_point_input_usize -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (crate::api::types::OutPoint, crate::api::types::Input, usize) { - ( - self.field0.cst_decode(), - self.field1.cst_decode(), - self.field2.cst_decode(), - ) - } -} -impl CstDecode<(String, Vec)> for wire_cst_record_string_list_prim_u_32_strict { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (String, Vec) { - (self.field0.cst_decode(), self.field1.cst_decode()) - } -} -impl CstDecode<(u32, Vec)> for wire_cst_record_u_32_list_condition { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (u32, Vec) { - (self.field0.cst_decode(), self.field1.cst_decode()) - } -} -impl CstDecode for wire_cst_rpc_config { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::RpcConfig { - crate::api::blockchain::RpcConfig { - url: self.url.cst_decode(), - auth: self.auth.cst_decode(), - network: self.network.cst_decode(), - wallet_name: self.wallet_name.cst_decode(), - sync_params: self.sync_params.cst_decode(), - } - } -} -impl CstDecode for wire_cst_rpc_sync_params { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::RpcSyncParams { - crate::api::blockchain::RpcSyncParams { - start_script_count: self.start_script_count.cst_decode(), - start_time: self.start_time.cst_decode(), - force_start_time: self.force_start_time.cst_decode(), - poll_rate_sec: self.poll_rate_sec.cst_decode(), - } - } -} -impl CstDecode for wire_cst_satisfaction { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Satisfaction { - match self.tag { - 0 => { - let ans = unsafe { self.kind.Partial }; - crate::api::types::Satisfaction::Partial { - n: ans.n.cst_decode(), - m: ans.m.cst_decode(), - items: ans.items.cst_decode(), - sorted: ans.sorted.cst_decode(), - conditions: ans.conditions.cst_decode(), - } - } - 1 => { - let ans = unsafe { self.kind.PartialComplete }; - crate::api::types::Satisfaction::PartialComplete { - n: ans.n.cst_decode(), - m: ans.m.cst_decode(), - items: ans.items.cst_decode(), - sorted: ans.sorted.cst_decode(), - conditions: ans.conditions.cst_decode(), - } - } - 2 => { - let ans = unsafe { self.kind.Complete }; - crate::api::types::Satisfaction::Complete { - condition: ans.condition.cst_decode(), - } - } - 3 => { - let ans = unsafe { self.kind.None }; - crate::api::types::Satisfaction::None { - msg: ans.msg.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_satisfiable_item { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SatisfiableItem { - match self.tag { - 0 => { - let ans = unsafe { self.kind.EcdsaSignature }; - crate::api::types::SatisfiableItem::EcdsaSignature { - key: ans.key.cst_decode(), - } - } - 1 => { - let ans = unsafe { self.kind.SchnorrSignature }; - crate::api::types::SatisfiableItem::SchnorrSignature { - key: ans.key.cst_decode(), - } - } - 2 => { - let ans = unsafe { self.kind.Sha256Preimage }; - crate::api::types::SatisfiableItem::Sha256Preimage { - hash: ans.hash.cst_decode(), - } - } - 3 => { - let ans = unsafe { self.kind.Hash256Preimage }; - crate::api::types::SatisfiableItem::Hash256Preimage { - hash: ans.hash.cst_decode(), - } - } - 4 => { - let ans = unsafe { self.kind.Ripemd160Preimage }; - crate::api::types::SatisfiableItem::Ripemd160Preimage { - hash: ans.hash.cst_decode(), - } - } - 5 => { - let ans = unsafe { self.kind.Hash160Preimage }; - crate::api::types::SatisfiableItem::Hash160Preimage { - hash: ans.hash.cst_decode(), - } - } - 6 => { - let ans = unsafe { self.kind.AbsoluteTimelock }; - crate::api::types::SatisfiableItem::AbsoluteTimelock { - value: ans.value.cst_decode(), - } - } - 7 => { - let ans = unsafe { self.kind.RelativeTimelock }; - crate::api::types::SatisfiableItem::RelativeTimelock { - value: ans.value.cst_decode(), - } - } - 8 => { - let ans = unsafe { self.kind.Multisig }; - crate::api::types::SatisfiableItem::Multisig { - keys: ans.keys.cst_decode(), - threshold: ans.threshold.cst_decode(), - } - } - 9 => { - let ans = unsafe { self.kind.Thresh }; - crate::api::types::SatisfiableItem::Thresh { - items: ans.items.cst_decode(), - threshold: ans.threshold.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_script_amount { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::ScriptAmount { - crate::api::types::ScriptAmount { - script: self.script.cst_decode(), - amount: self.amount.cst_decode(), - } - } -} -impl CstDecode for wire_cst_sign_options { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SignOptions { - crate::api::types::SignOptions { - trust_witness_utxo: self.trust_witness_utxo.cst_decode(), - assume_height: self.assume_height.cst_decode(), - allow_all_sighashes: self.allow_all_sighashes.cst_decode(), - remove_partial_sigs: self.remove_partial_sigs.cst_decode(), - try_finalize: self.try_finalize.cst_decode(), - sign_with_tap_internal_key: self.sign_with_tap_internal_key.cst_decode(), - allow_grinding: self.allow_grinding.cst_decode(), - } - } -} -impl CstDecode for wire_cst_sled_db_configuration { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SledDbConfiguration { - crate::api::types::SledDbConfiguration { - path: self.path.cst_decode(), - tree_name: self.tree_name.cst_decode(), - } - } -} -impl CstDecode for wire_cst_sqlite_db_configuration { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SqliteDbConfiguration { - crate::api::types::SqliteDbConfiguration { - path: self.path.cst_decode(), - } - } -} -impl CstDecode for wire_cst_transaction_details { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TransactionDetails { - crate::api::types::TransactionDetails { - transaction: self.transaction.cst_decode(), - txid: self.txid.cst_decode(), - received: self.received.cst_decode(), - sent: self.sent.cst_decode(), - fee: self.fee.cst_decode(), - confirmation_time: self.confirmation_time.cst_decode(), - } - } -} -impl CstDecode for wire_cst_tx_in { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TxIn { - crate::api::types::TxIn { - previous_output: self.previous_output.cst_decode(), - script_sig: self.script_sig.cst_decode(), - sequence: self.sequence.cst_decode(), - witness: self.witness.cst_decode(), - } - } -} -impl CstDecode for wire_cst_tx_out { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TxOut { - crate::api::types::TxOut { - value: self.value.cst_decode(), - script_pubkey: self.script_pubkey.cst_decode(), - } - } -} -impl CstDecode<[u8; 4]> for *mut wire_cst_list_prim_u_8_strict { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> [u8; 4] { - let vec: Vec = self.cst_decode(); - flutter_rust_bridge::for_generated::from_vec_to_array(vec) - } -} -impl NewWithNullPtr for wire_cst_address_error { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: AddressErrorKind { nil__: () }, - } - } -} -impl Default for wire_cst_address_error { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_address_index { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: AddressIndexKind { nil__: () }, - } - } -} -impl Default for wire_cst_address_index { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_auth { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: AuthKind { nil__: () }, - } - } -} -impl Default for wire_cst_auth { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_balance { - fn new_with_null_ptr() -> Self { - Self { - immature: Default::default(), - trusted_pending: Default::default(), - untrusted_pending: Default::default(), - confirmed: Default::default(), - spendable: Default::default(), - total: Default::default(), - } - } -} -impl Default for wire_cst_balance { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_address { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_bdk_address { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_blockchain { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_bdk_blockchain { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_derivation_path { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_bdk_derivation_path { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_descriptor { - fn new_with_null_ptr() -> Self { - Self { - extended_descriptor: Default::default(), - key_map: Default::default(), - } - } -} -impl Default for wire_cst_bdk_descriptor { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_descriptor_public_key { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_bdk_descriptor_public_key { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_descriptor_secret_key { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_bdk_descriptor_secret_key { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_error { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: BdkErrorKind { nil__: () }, - } - } -} -impl Default for wire_cst_bdk_error { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_mnemonic { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_bdk_mnemonic { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_policy { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_bdk_policy { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_psbt { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_bdk_psbt { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_script_buf { - fn new_with_null_ptr() -> Self { - Self { - bytes: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_bdk_script_buf { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_transaction { - fn new_with_null_ptr() -> Self { - Self { - s: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_bdk_transaction { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_bdk_wallet { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_bdk_wallet { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_block_time { - fn new_with_null_ptr() -> Self { - Self { - height: Default::default(), - timestamp: Default::default(), - } - } -} -impl Default for wire_cst_block_time { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_blockchain_config { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: BlockchainConfigKind { nil__: () }, - } - } -} -impl Default for wire_cst_blockchain_config { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_condition { - fn new_with_null_ptr() -> Self { - Self { - csv: core::ptr::null_mut(), - timelock: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_condition { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_consensus_error { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: ConsensusErrorKind { nil__: () }, - } - } -} -impl Default for wire_cst_consensus_error { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_database_config { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: DatabaseConfigKind { nil__: () }, - } - } -} -impl Default for wire_cst_database_config { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_descriptor_error { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: DescriptorErrorKind { nil__: () }, - } - } -} -impl Default for wire_cst_descriptor_error { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_electrum_config { - fn new_with_null_ptr() -> Self { - Self { - url: core::ptr::null_mut(), - socks5: core::ptr::null_mut(), - retry: Default::default(), - timeout: core::ptr::null_mut(), - stop_gap: Default::default(), - validate_domain: Default::default(), - } - } -} -impl Default for wire_cst_electrum_config { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_esplora_config { - fn new_with_null_ptr() -> Self { - Self { - base_url: core::ptr::null_mut(), - proxy: core::ptr::null_mut(), - concurrency: core::ptr::null_mut(), - stop_gap: Default::default(), - timeout: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_esplora_config { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_fee_rate { - fn new_with_null_ptr() -> Self { - Self { - sat_per_vb: Default::default(), - } - } -} -impl Default for wire_cst_fee_rate { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_hex_error { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: HexErrorKind { nil__: () }, - } - } -} -impl Default for wire_cst_hex_error { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_input { - fn new_with_null_ptr() -> Self { - Self { - s: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_input { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_local_utxo { - fn new_with_null_ptr() -> Self { - Self { - outpoint: Default::default(), - txout: Default::default(), - keychain: Default::default(), - is_spent: Default::default(), - } - } -} -impl Default for wire_cst_local_utxo { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_lock_time { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: LockTimeKind { nil__: () }, - } - } -} -impl Default for wire_cst_lock_time { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_out_point { - fn new_with_null_ptr() -> Self { - Self { - txid: core::ptr::null_mut(), - vout: Default::default(), - } - } -} -impl Default for wire_cst_out_point { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_payload { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: PayloadKind { nil__: () }, - } - } -} -impl Default for wire_cst_payload { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_pk_or_f { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: PkOrFKind { nil__: () }, - } - } -} -impl Default for wire_cst_pk_or_f { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_psbt_sig_hash_type { - fn new_with_null_ptr() -> Self { - Self { - inner: Default::default(), - } - } -} -impl Default for wire_cst_psbt_sig_hash_type { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_rbf_value { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: RbfValueKind { nil__: () }, - } - } -} -impl Default for wire_cst_rbf_value { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_record_bdk_address_u_32 { - fn new_with_null_ptr() -> Self { - Self { - field0: Default::default(), - field1: Default::default(), - } - } -} -impl Default for wire_cst_record_bdk_address_u_32 { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_record_bdk_psbt_transaction_details { - fn new_with_null_ptr() -> Self { - Self { - field0: Default::default(), - field1: Default::default(), - } - } -} -impl Default for wire_cst_record_bdk_psbt_transaction_details { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_record_list_prim_u_32_strict_list_condition { - fn new_with_null_ptr() -> Self { - Self { - field0: core::ptr::null_mut(), - field1: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_record_list_prim_u_32_strict_list_condition { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_record_out_point_input_usize { - fn new_with_null_ptr() -> Self { - Self { - field0: Default::default(), - field1: Default::default(), - field2: Default::default(), - } - } -} -impl Default for wire_cst_record_out_point_input_usize { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_record_string_list_prim_u_32_strict { - fn new_with_null_ptr() -> Self { - Self { - field0: core::ptr::null_mut(), - field1: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_record_string_list_prim_u_32_strict { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_record_u_32_list_condition { - fn new_with_null_ptr() -> Self { - Self { - field0: Default::default(), - field1: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_record_u_32_list_condition { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_rpc_config { - fn new_with_null_ptr() -> Self { - Self { - url: core::ptr::null_mut(), - auth: Default::default(), - network: Default::default(), - wallet_name: core::ptr::null_mut(), - sync_params: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_rpc_config { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_rpc_sync_params { - fn new_with_null_ptr() -> Self { - Self { - start_script_count: Default::default(), - start_time: Default::default(), - force_start_time: Default::default(), - poll_rate_sec: Default::default(), - } - } -} -impl Default for wire_cst_rpc_sync_params { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_satisfaction { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: SatisfactionKind { nil__: () }, - } - } -} -impl Default for wire_cst_satisfaction { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_satisfiable_item { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: SatisfiableItemKind { nil__: () }, - } - } -} -impl Default for wire_cst_satisfiable_item { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_script_amount { - fn new_with_null_ptr() -> Self { - Self { - script: Default::default(), - amount: Default::default(), - } - } -} -impl Default for wire_cst_script_amount { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_sign_options { - fn new_with_null_ptr() -> Self { - Self { - trust_witness_utxo: Default::default(), - assume_height: core::ptr::null_mut(), - allow_all_sighashes: Default::default(), - remove_partial_sigs: Default::default(), - try_finalize: Default::default(), - sign_with_tap_internal_key: Default::default(), - allow_grinding: Default::default(), - } - } -} -impl Default for wire_cst_sign_options { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_sled_db_configuration { - fn new_with_null_ptr() -> Self { - Self { - path: core::ptr::null_mut(), - tree_name: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_sled_db_configuration { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_sqlite_db_configuration { - fn new_with_null_ptr() -> Self { - Self { - path: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_sqlite_db_configuration { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_transaction_details { - fn new_with_null_ptr() -> Self { - Self { - transaction: core::ptr::null_mut(), - txid: core::ptr::null_mut(), - received: Default::default(), - sent: Default::default(), - fee: core::ptr::null_mut(), - confirmation_time: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_transaction_details { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_tx_in { - fn new_with_null_ptr() -> Self { - Self { - previous_output: Default::default(), - script_sig: Default::default(), - sequence: Default::default(), - witness: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_tx_in { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_tx_out { - fn new_with_null_ptr() -> Self { - Self { - value: Default::default(), - script_pubkey: Default::default(), - } - } -} -impl Default for wire_cst_tx_out { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast( - port_: i64, - ptr: *mut wire_cst_bdk_blockchain, - transaction: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__blockchain__bdk_blockchain_broadcast_impl(port_, ptr, transaction) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create( - port_: i64, - blockchain_config: *mut wire_cst_blockchain_config, -) { - wire__crate__api__blockchain__bdk_blockchain_create_impl(port_, blockchain_config) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee( - port_: i64, - that: *mut wire_cst_bdk_blockchain, - target: u64, -) { - wire__crate__api__blockchain__bdk_blockchain_estimate_fee_impl(port_, that, target) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash( - port_: i64, - that: *mut wire_cst_bdk_blockchain, - height: u32, -) { - wire__crate__api__blockchain__bdk_blockchain_get_block_hash_impl(port_, that, height) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height( - port_: i64, - that: *mut wire_cst_bdk_blockchain, -) { - wire__crate__api__blockchain__bdk_blockchain_get_height_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string( - that: *mut wire_cst_bdk_descriptor, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__descriptor__bdk_descriptor_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( - that: *mut wire_cst_bdk_descriptor, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new( - port_: i64, - descriptor: *mut wire_cst_list_prim_u_8_strict, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_impl(port_, descriptor, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip44_impl( - port_, - secret_key, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( - port_: i64, - public_key: *mut wire_cst_bdk_descriptor_public_key, - fingerprint: *mut wire_cst_list_prim_u_8_strict, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip44_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip49_impl( - port_, - secret_key, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( - port_: i64, - public_key: *mut wire_cst_bdk_descriptor_public_key, - fingerprint: *mut wire_cst_list_prim_u_8_strict, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip49_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip84_impl( - port_, - secret_key, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( - port_: i64, - public_key: *mut wire_cst_bdk_descriptor_public_key, - fingerprint: *mut wire_cst_list_prim_u_8_strict, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip84_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip86_impl( - port_, - secret_key, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( - port_: i64, - public_key: *mut wire_cst_bdk_descriptor_public_key, - fingerprint: *mut wire_cst_list_prim_u_8_strict, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip86_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private( - that: *mut wire_cst_bdk_descriptor, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__descriptor__bdk_descriptor_to_string_private_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string( - that: *mut wire_cst_bdk_derivation_path, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_derivation_path_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string( - port_: i64, - path: *mut wire_cst_list_prim_u_8_strict, -) { - wire__crate__api__key__bdk_derivation_path_from_string_impl(port_, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string( - that: *mut wire_cst_bdk_descriptor_public_key, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_descriptor_public_key_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive( - port_: i64, - ptr: *mut wire_cst_bdk_descriptor_public_key, - path: *mut wire_cst_bdk_derivation_path, -) { - wire__crate__api__key__bdk_descriptor_public_key_derive_impl(port_, ptr, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend( - port_: i64, - ptr: *mut wire_cst_bdk_descriptor_public_key, - path: *mut wire_cst_bdk_derivation_path, -) { - wire__crate__api__key__bdk_descriptor_public_key_extend_impl(port_, ptr, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string( - port_: i64, - public_key: *mut wire_cst_list_prim_u_8_strict, -) { - wire__crate__api__key__bdk_descriptor_public_key_from_string_impl(port_, public_key) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public( - ptr: *mut wire_cst_bdk_descriptor_secret_key, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_descriptor_secret_key_as_public_impl(ptr) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string( - that: *mut wire_cst_bdk_descriptor_secret_key, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_descriptor_secret_key_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create( - port_: i64, - network: i32, - mnemonic: *mut wire_cst_bdk_mnemonic, - password: *mut wire_cst_list_prim_u_8_strict, -) { - wire__crate__api__key__bdk_descriptor_secret_key_create_impl(port_, network, mnemonic, password) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive( - port_: i64, - ptr: *mut wire_cst_bdk_descriptor_secret_key, - path: *mut wire_cst_bdk_derivation_path, -) { - wire__crate__api__key__bdk_descriptor_secret_key_derive_impl(port_, ptr, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend( - port_: i64, - ptr: *mut wire_cst_bdk_descriptor_secret_key, - path: *mut wire_cst_bdk_derivation_path, -) { - wire__crate__api__key__bdk_descriptor_secret_key_extend_impl(port_, ptr, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string( - port_: i64, - secret_key: *mut wire_cst_list_prim_u_8_strict, -) { - wire__crate__api__key__bdk_descriptor_secret_key_from_string_impl(port_, secret_key) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( - that: *mut wire_cst_bdk_descriptor_secret_key, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string( - that: *mut wire_cst_bdk_mnemonic, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_mnemonic_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy( - port_: i64, - entropy: *mut wire_cst_list_prim_u_8_loose, -) { - wire__crate__api__key__bdk_mnemonic_from_entropy_impl(port_, entropy) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string( - port_: i64, - mnemonic: *mut wire_cst_list_prim_u_8_strict, -) { - wire__crate__api__key__bdk_mnemonic_from_string_impl(port_, mnemonic) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new( - port_: i64, - word_count: i32, -) { - wire__crate__api__key__bdk_mnemonic_new_impl(port_, word_count) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine( - port_: i64, - ptr: *mut wire_cst_bdk_psbt, - other: *mut wire_cst_bdk_psbt, -) { - wire__crate__api__psbt__bdk_psbt_combine_impl(port_, ptr, other) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx( - ptr: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_extract_tx_impl(ptr) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_fee_amount_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_fee_rate_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str( - port_: i64, - psbt_base64: *mut wire_cst_list_prim_u_8_strict, -) { - wire__crate__api__psbt__bdk_psbt_from_str_impl(port_, psbt_base64) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_json_serialize_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_serialize_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_txid_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string( - that: *mut wire_cst_bdk_address, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script( - port_: i64, - script: *mut wire_cst_bdk_script_buf, - network: i32, -) { - wire__crate__api__types__bdk_address_from_script_impl(port_, script, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string( - port_: i64, - address: *mut wire_cst_list_prim_u_8_strict, - network: i32, -) { - wire__crate__api__types__bdk_address_from_string_impl(port_, address, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network( - that: *mut wire_cst_bdk_address, - network: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_is_valid_for_network_impl(that, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network( - that: *mut wire_cst_bdk_address, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_network_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload( - that: *mut wire_cst_bdk_address, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_payload_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script( - ptr: *mut wire_cst_bdk_address, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_script_impl(ptr) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri( - that: *mut wire_cst_bdk_address, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_to_qr_uri_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string( - that: *mut wire_cst_bdk_policy, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_policy_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution( - that: *mut wire_cst_bdk_policy, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_policy_contribution_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id( - that: *mut wire_cst_bdk_policy, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_policy_id_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item( - that: *mut wire_cst_bdk_policy, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_policy_item_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path( - that: *mut wire_cst_bdk_policy, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_policy_requires_path_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction( - that: *mut wire_cst_bdk_policy, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_policy_satisfaction_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string( - that: *mut wire_cst_bdk_script_buf, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_script_buf_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty( -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_script_buf_empty_impl() -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex( - port_: i64, - s: *mut wire_cst_list_prim_u_8_strict, -) { - wire__crate__api__types__bdk_script_buf_from_hex_impl(port_, s) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity( - port_: i64, - capacity: usize, -) { - wire__crate__api__types__bdk_script_buf_with_capacity_impl(port_, capacity) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes( - port_: i64, - transaction_bytes: *mut wire_cst_list_prim_u_8_loose, -) { - wire__crate__api__types__bdk_transaction_from_bytes_impl(port_, transaction_bytes) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_input_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_is_coin_base_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_is_explicitly_rbf_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_is_lock_time_enabled_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_lock_time_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new( - port_: i64, - version: i32, - lock_time: *mut wire_cst_lock_time, - input: *mut wire_cst_list_tx_in, - output: *mut wire_cst_list_tx_out, -) { - wire__crate__api__types__bdk_transaction_new_impl(port_, version, lock_time, input, output) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_output_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_serialize_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_size_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_txid_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_version_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_vsize_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_weight_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address( - ptr: *mut wire_cst_bdk_wallet, - address_index: *mut wire_cst_address_index, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_get_address_impl(ptr, address_index) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance( - that: *mut wire_cst_bdk_wallet, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_get_balance_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( - ptr: *mut wire_cst_bdk_wallet, - keychain: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain_impl(ptr, keychain) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address( - ptr: *mut wire_cst_bdk_wallet, - address_index: *mut wire_cst_address_index, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_get_internal_address_impl(ptr, address_index) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input( - port_: i64, - that: *mut wire_cst_bdk_wallet, - utxo: *mut wire_cst_local_utxo, - only_witness_utxo: bool, - sighash_type: *mut wire_cst_psbt_sig_hash_type, -) { - wire__crate__api__wallet__bdk_wallet_get_psbt_input_impl( - port_, - that, - utxo, - only_witness_utxo, - sighash_type, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine( - ptr: *mut wire_cst_bdk_wallet, - script: *mut wire_cst_bdk_script_buf, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_is_mine_impl(ptr, script) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions( - that: *mut wire_cst_bdk_wallet, - include_raw: bool, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_list_transactions_impl(that, include_raw) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent( - that: *mut wire_cst_bdk_wallet, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_list_unspent_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network( - that: *mut wire_cst_bdk_wallet, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_network_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new( - port_: i64, - descriptor: *mut wire_cst_bdk_descriptor, - change_descriptor: *mut wire_cst_bdk_descriptor, - network: i32, - database_config: *mut wire_cst_database_config, -) { - wire__crate__api__wallet__bdk_wallet_new_impl( - port_, - descriptor, - change_descriptor, - network, - database_config, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies( - ptr: *mut wire_cst_bdk_wallet, - keychain: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_policies_impl(ptr, keychain) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign( - port_: i64, - ptr: *mut wire_cst_bdk_wallet, - psbt: *mut wire_cst_bdk_psbt, - sign_options: *mut wire_cst_sign_options, -) { - wire__crate__api__wallet__bdk_wallet_sign_impl(port_, ptr, psbt, sign_options) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync( - port_: i64, - ptr: *mut wire_cst_bdk_wallet, - blockchain: *mut wire_cst_bdk_blockchain, -) { - wire__crate__api__wallet__bdk_wallet_sync_impl(port_, ptr, blockchain) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder( - port_: i64, - txid: *mut wire_cst_list_prim_u_8_strict, - fee_rate: f32, - allow_shrinking: *mut wire_cst_bdk_address, - wallet: *mut wire_cst_bdk_wallet, - enable_rbf: bool, - n_sequence: *mut u32, -) { - wire__crate__api__wallet__finish_bump_fee_tx_builder_impl( - port_, - txid, - fee_rate, - allow_shrinking, - wallet, - enable_rbf, - n_sequence, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish( - port_: i64, - wallet: *mut wire_cst_bdk_wallet, - recipients: *mut wire_cst_list_script_amount, - utxos: *mut wire_cst_list_out_point, - foreign_utxo: *mut wire_cst_record_out_point_input_usize, - un_spendable: *mut wire_cst_list_out_point, - change_policy: i32, - manually_selected_only: bool, - fee_rate: *mut f32, - fee_absolute: *mut u64, - drain_wallet: bool, - drain_to: *mut wire_cst_bdk_script_buf, - rbf: *mut wire_cst_rbf_value, - internal_policy_path: *mut wire_cst_list_record_string_list_prim_u_32_strict, - external_policy_path: *mut wire_cst_list_record_string_list_prim_u_32_strict, - data: *mut wire_cst_list_prim_u_8_loose, -) { - wire__crate__api__wallet__tx_builder_finish_impl( - port_, - wallet, - recipients, - utxos, - foreign_utxo, - un_spendable, - change_policy, - manually_selected_only, - fee_rate, - fee_absolute, - drain_wallet, - drain_to, - rbf, - internal_policy_path, - external_policy_path, - data, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>>::increment_strong_count( - ptr as _, - ); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>>::decrement_strong_count( - ptr as _, - ); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_address_error( -) -> *mut wire_cst_address_error { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_address_error::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_address_index( -) -> *mut wire_cst_address_index { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_address_index::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address() -> *mut wire_cst_bdk_address -{ - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_address::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain( -) -> *mut wire_cst_bdk_blockchain { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_bdk_blockchain::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path( -) -> *mut wire_cst_bdk_derivation_path { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_bdk_derivation_path::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor( -) -> *mut wire_cst_bdk_descriptor { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_bdk_descriptor::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key( -) -> *mut wire_cst_bdk_descriptor_public_key { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_bdk_descriptor_public_key::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key( -) -> *mut wire_cst_bdk_descriptor_secret_key { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_bdk_descriptor_secret_key::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic() -> *mut wire_cst_bdk_mnemonic -{ - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_mnemonic::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy() -> *mut wire_cst_bdk_policy { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_policy::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt() -> *mut wire_cst_bdk_psbt { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_psbt::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf( -) -> *mut wire_cst_bdk_script_buf { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_bdk_script_buf::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction( -) -> *mut wire_cst_bdk_transaction { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_bdk_transaction::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet() -> *mut wire_cst_bdk_wallet { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_wallet::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_block_time() -> *mut wire_cst_block_time { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_block_time::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config( -) -> *mut wire_cst_blockchain_config { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_blockchain_config::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bool(value: bool) -> *mut bool { - flutter_rust_bridge::for_generated::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_condition() -> *mut wire_cst_condition { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_condition::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error( -) -> *mut wire_cst_consensus_error { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_consensus_error::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_database_config( -) -> *mut wire_cst_database_config { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_database_config::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error( -) -> *mut wire_cst_descriptor_error { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_descriptor_error::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config( -) -> *mut wire_cst_electrum_config { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_electrum_config::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config( -) -> *mut wire_cst_esplora_config { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_esplora_config::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_f_32(value: f32) -> *mut f32 { - flutter_rust_bridge::for_generated::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate() -> *mut wire_cst_fee_rate { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_fee_rate::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_hex_error() -> *mut wire_cst_hex_error { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_hex_error::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo() -> *mut wire_cst_local_utxo { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_local_utxo::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_lock_time() -> *mut wire_cst_lock_time { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_lock_time::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_out_point() -> *mut wire_cst_out_point { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_out_point::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f() -> *mut wire_cst_pk_or_f { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_pk_or_f::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type( -) -> *mut wire_cst_psbt_sig_hash_type { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_psbt_sig_hash_type::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value() -> *mut wire_cst_rbf_value { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_rbf_value::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize( -) -> *mut wire_cst_record_out_point_input_usize { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_record_out_point_input_usize::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config() -> *mut wire_cst_rpc_config { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_rpc_config::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params( -) -> *mut wire_cst_rpc_sync_params { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_rpc_sync_params::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_sign_options() -> *mut wire_cst_sign_options -{ - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_sign_options::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration( -) -> *mut wire_cst_sled_db_configuration { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_sled_db_configuration::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration( -) -> *mut wire_cst_sqlite_db_configuration { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_sqlite_db_configuration::new_with_null_ptr(), - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_u_32(value: u32) -> *mut u32 { - flutter_rust_bridge::for_generated::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_u_64(value: u64) -> *mut u64 { - flutter_rust_bridge::for_generated::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_u_8(value: u8) -> *mut u8 { - flutter_rust_bridge::for_generated::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_bdk_policy( - len: i32, -) -> *mut wire_cst_list_bdk_policy { - let wrap = wire_cst_list_bdk_policy { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_condition( - len: i32, -) -> *mut wire_cst_list_condition { - let wrap = wire_cst_list_condition { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict( - len: i32, -) -> *mut wire_cst_list_list_prim_u_8_strict { - let wrap = wire_cst_list_list_prim_u_8_strict { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - <*mut wire_cst_list_prim_u_8_strict>::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_local_utxo( - len: i32, -) -> *mut wire_cst_list_local_utxo { - let wrap = wire_cst_list_local_utxo { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_out_point( - len: i32, -) -> *mut wire_cst_list_out_point { - let wrap = wire_cst_list_out_point { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_pk_or_f(len: i32) -> *mut wire_cst_list_pk_or_f { - let wrap = wire_cst_list_pk_or_f { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_prim_u_32_strict( - len: i32, -) -> *mut wire_cst_list_prim_u_32_strict { - let ans = wire_cst_list_prim_u_32_strict { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_prim_u_64_strict( - len: i32, -) -> *mut wire_cst_list_prim_u_64_strict { - let ans = wire_cst_list_prim_u_64_strict { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_prim_u_8_loose( - len: i32, -) -> *mut wire_cst_list_prim_u_8_loose { - let ans = wire_cst_list_prim_u_8_loose { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_prim_u_8_strict( - len: i32, -) -> *mut wire_cst_list_prim_u_8_strict { - let ans = wire_cst_list_prim_u_8_strict { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition( - len: i32, -) -> *mut wire_cst_list_record_list_prim_u_32_strict_list_condition { - let wrap = wire_cst_list_record_list_prim_u_32_strict_list_condition { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict( - len: i32, -) -> *mut wire_cst_list_record_string_list_prim_u_32_strict { - let wrap = wire_cst_list_record_string_list_prim_u_32_strict { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition( - len: i32, -) -> *mut wire_cst_list_record_u_32_list_condition { - let wrap = wire_cst_list_record_u_32_list_condition { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_script_amount( - len: i32, -) -> *mut wire_cst_list_script_amount { - let wrap = wire_cst_list_script_amount { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_transaction_details( - len: i32, -) -> *mut wire_cst_list_transaction_details { - let wrap = wire_cst_list_transaction_details { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_tx_in(len: i32) -> *mut wire_cst_list_tx_in { - let wrap = wire_cst_list_tx_in { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_list_tx_out(len: i32) -> *mut wire_cst_list_tx_out { - let wrap = wire_cst_list_tx_out { - ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( - ::new_with_null_ptr(), - len, - ), - len, - }; - flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) -} - -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_address_error { - tag: i32, - kind: AddressErrorKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union AddressErrorKind { - Base58: wire_cst_AddressError_Base58, - Bech32: wire_cst_AddressError_Bech32, - InvalidBech32Variant: wire_cst_AddressError_InvalidBech32Variant, - InvalidWitnessVersion: wire_cst_AddressError_InvalidWitnessVersion, - UnparsableWitnessVersion: wire_cst_AddressError_UnparsableWitnessVersion, - InvalidWitnessProgramLength: wire_cst_AddressError_InvalidWitnessProgramLength, - InvalidSegwitV0ProgramLength: wire_cst_AddressError_InvalidSegwitV0ProgramLength, - UnknownAddressType: wire_cst_AddressError_UnknownAddressType, - NetworkValidation: wire_cst_AddressError_NetworkValidation, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressError_Base58 { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressError_Bech32 { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressError_InvalidBech32Variant { - expected: i32, - found: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressError_InvalidWitnessVersion { - field0: u8, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressError_UnparsableWitnessVersion { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressError_InvalidWitnessProgramLength { - field0: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressError_InvalidSegwitV0ProgramLength { - field0: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressError_UnknownAddressType { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressError_NetworkValidation { - network_required: i32, - network_found: i32, - address: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_address_index { - tag: i32, - kind: AddressIndexKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union AddressIndexKind { - Peek: wire_cst_AddressIndex_Peek, - Reset: wire_cst_AddressIndex_Reset, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressIndex_Peek { - index: u32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_AddressIndex_Reset { - index: u32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_auth { - tag: i32, - kind: AuthKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union AuthKind { - UserPass: wire_cst_Auth_UserPass, - Cookie: wire_cst_Auth_Cookie, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_Auth_UserPass { - username: *mut wire_cst_list_prim_u_8_strict, - password: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_Auth_Cookie { - file: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_balance { - immature: u64, - trusted_pending: u64, - untrusted_pending: u64, - confirmed: u64, - spendable: u64, - total: u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_address { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_blockchain { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_derivation_path { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_descriptor { - extended_descriptor: usize, - key_map: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_descriptor_public_key { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_descriptor_secret_key { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_error { - tag: i32, - kind: BdkErrorKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union BdkErrorKind { - Hex: wire_cst_BdkError_Hex, - Consensus: wire_cst_BdkError_Consensus, - VerifyTransaction: wire_cst_BdkError_VerifyTransaction, - Address: wire_cst_BdkError_Address, - Descriptor: wire_cst_BdkError_Descriptor, - InvalidU32Bytes: wire_cst_BdkError_InvalidU32Bytes, - Generic: wire_cst_BdkError_Generic, - OutputBelowDustLimit: wire_cst_BdkError_OutputBelowDustLimit, - InsufficientFunds: wire_cst_BdkError_InsufficientFunds, - FeeRateTooLow: wire_cst_BdkError_FeeRateTooLow, - FeeTooLow: wire_cst_BdkError_FeeTooLow, - MissingKeyOrigin: wire_cst_BdkError_MissingKeyOrigin, - Key: wire_cst_BdkError_Key, - SpendingPolicyRequired: wire_cst_BdkError_SpendingPolicyRequired, - InvalidPolicyPathError: wire_cst_BdkError_InvalidPolicyPathError, - Signer: wire_cst_BdkError_Signer, - InvalidNetwork: wire_cst_BdkError_InvalidNetwork, - InvalidOutpoint: wire_cst_BdkError_InvalidOutpoint, - Encode: wire_cst_BdkError_Encode, - Miniscript: wire_cst_BdkError_Miniscript, - MiniscriptPsbt: wire_cst_BdkError_MiniscriptPsbt, - Bip32: wire_cst_BdkError_Bip32, - Bip39: wire_cst_BdkError_Bip39, - Secp256k1: wire_cst_BdkError_Secp256k1, - Json: wire_cst_BdkError_Json, - Psbt: wire_cst_BdkError_Psbt, - PsbtParse: wire_cst_BdkError_PsbtParse, - MissingCachedScripts: wire_cst_BdkError_MissingCachedScripts, - Electrum: wire_cst_BdkError_Electrum, - Esplora: wire_cst_BdkError_Esplora, - Sled: wire_cst_BdkError_Sled, - Rpc: wire_cst_BdkError_Rpc, - Rusqlite: wire_cst_BdkError_Rusqlite, - InvalidInput: wire_cst_BdkError_InvalidInput, - InvalidLockTime: wire_cst_BdkError_InvalidLockTime, - InvalidTransaction: wire_cst_BdkError_InvalidTransaction, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Hex { - field0: *mut wire_cst_hex_error, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Consensus { - field0: *mut wire_cst_consensus_error, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_VerifyTransaction { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Address { - field0: *mut wire_cst_address_error, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Descriptor { - field0: *mut wire_cst_descriptor_error, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidU32Bytes { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Generic { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_OutputBelowDustLimit { - field0: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InsufficientFunds { - needed: u64, - available: u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_FeeRateTooLow { - needed: f32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_FeeTooLow { - needed: u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_MissingKeyOrigin { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Key { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_SpendingPolicyRequired { - field0: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidPolicyPathError { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Signer { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidNetwork { - requested: i32, - found: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidOutpoint { - field0: *mut wire_cst_out_point, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Encode { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Miniscript { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_MiniscriptPsbt { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Bip32 { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Bip39 { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Secp256k1 { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Json { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Psbt { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_PsbtParse { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_MissingCachedScripts { - field0: usize, - field1: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Electrum { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Esplora { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Sled { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Rpc { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Rusqlite { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidInput { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidLockTime { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidTransaction { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_mnemonic { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_policy { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_psbt { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_script_buf { - bytes: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_transaction { - s: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_bdk_wallet { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_block_time { - height: u32, - timestamp: u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_blockchain_config { - tag: i32, - kind: BlockchainConfigKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union BlockchainConfigKind { - Electrum: wire_cst_BlockchainConfig_Electrum, - Esplora: wire_cst_BlockchainConfig_Esplora, - Rpc: wire_cst_BlockchainConfig_Rpc, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BlockchainConfig_Electrum { - config: *mut wire_cst_electrum_config, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BlockchainConfig_Esplora { - config: *mut wire_cst_esplora_config, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_BlockchainConfig_Rpc { - config: *mut wire_cst_rpc_config, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_condition { - csv: *mut u32, - timelock: *mut wire_cst_lock_time, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_consensus_error { - tag: i32, - kind: ConsensusErrorKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union ConsensusErrorKind { - Io: wire_cst_ConsensusError_Io, - OversizedVectorAllocation: wire_cst_ConsensusError_OversizedVectorAllocation, - InvalidChecksum: wire_cst_ConsensusError_InvalidChecksum, - ParseFailed: wire_cst_ConsensusError_ParseFailed, - UnsupportedSegwitFlag: wire_cst_ConsensusError_UnsupportedSegwitFlag, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_ConsensusError_Io { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_ConsensusError_OversizedVectorAllocation { - requested: usize, - max: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_ConsensusError_InvalidChecksum { - expected: *mut wire_cst_list_prim_u_8_strict, - actual: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_ConsensusError_ParseFailed { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_ConsensusError_UnsupportedSegwitFlag { - field0: u8, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_database_config { - tag: i32, - kind: DatabaseConfigKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union DatabaseConfigKind { - Sqlite: wire_cst_DatabaseConfig_Sqlite, - Sled: wire_cst_DatabaseConfig_Sled, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DatabaseConfig_Sqlite { - config: *mut wire_cst_sqlite_db_configuration, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DatabaseConfig_Sled { - config: *mut wire_cst_sled_db_configuration, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_descriptor_error { - tag: i32, - kind: DescriptorErrorKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union DescriptorErrorKind { - Key: wire_cst_DescriptorError_Key, - Policy: wire_cst_DescriptorError_Policy, - InvalidDescriptorCharacter: wire_cst_DescriptorError_InvalidDescriptorCharacter, - Bip32: wire_cst_DescriptorError_Bip32, - Base58: wire_cst_DescriptorError_Base58, - Pk: wire_cst_DescriptorError_Pk, - Miniscript: wire_cst_DescriptorError_Miniscript, - Hex: wire_cst_DescriptorError_Hex, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Key { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Policy { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_InvalidDescriptorCharacter { - field0: u8, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Bip32 { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Base58 { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Pk { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Miniscript { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Hex { - field0: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_electrum_config { - url: *mut wire_cst_list_prim_u_8_strict, - socks5: *mut wire_cst_list_prim_u_8_strict, - retry: u8, - timeout: *mut u8, - stop_gap: u64, - validate_domain: bool, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_esplora_config { - base_url: *mut wire_cst_list_prim_u_8_strict, - proxy: *mut wire_cst_list_prim_u_8_strict, - concurrency: *mut u8, - stop_gap: u64, - timeout: *mut u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_fee_rate { - sat_per_vb: f32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_hex_error { - tag: i32, - kind: HexErrorKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union HexErrorKind { - InvalidChar: wire_cst_HexError_InvalidChar, - OddLengthString: wire_cst_HexError_OddLengthString, - InvalidLength: wire_cst_HexError_InvalidLength, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_HexError_InvalidChar { - field0: u8, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_HexError_OddLengthString { - field0: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_HexError_InvalidLength { - field0: usize, - field1: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_input { - s: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_bdk_policy { - ptr: *mut wire_cst_bdk_policy, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_condition { - ptr: *mut wire_cst_condition, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_list_prim_u_8_strict { - ptr: *mut *mut wire_cst_list_prim_u_8_strict, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_local_utxo { - ptr: *mut wire_cst_local_utxo, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_out_point { - ptr: *mut wire_cst_out_point, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_pk_or_f { - ptr: *mut wire_cst_pk_or_f, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_prim_u_32_strict { - ptr: *mut u32, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_prim_u_64_strict { - ptr: *mut u64, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_prim_u_8_loose { - ptr: *mut u8, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_prim_u_8_strict { - ptr: *mut u8, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_record_list_prim_u_32_strict_list_condition { - ptr: *mut wire_cst_record_list_prim_u_32_strict_list_condition, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_record_string_list_prim_u_32_strict { - ptr: *mut wire_cst_record_string_list_prim_u_32_strict, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_record_u_32_list_condition { - ptr: *mut wire_cst_record_u_32_list_condition, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_script_amount { - ptr: *mut wire_cst_script_amount, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_transaction_details { - ptr: *mut wire_cst_transaction_details, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_tx_in { - ptr: *mut wire_cst_tx_in, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_list_tx_out { - ptr: *mut wire_cst_tx_out, - len: i32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_local_utxo { - outpoint: wire_cst_out_point, - txout: wire_cst_tx_out, - keychain: i32, - is_spent: bool, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_lock_time { - tag: i32, - kind: LockTimeKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union LockTimeKind { - Blocks: wire_cst_LockTime_Blocks, - Seconds: wire_cst_LockTime_Seconds, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_LockTime_Blocks { - field0: u32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_LockTime_Seconds { - field0: u32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_out_point { - txid: *mut wire_cst_list_prim_u_8_strict, - vout: u32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_payload { - tag: i32, - kind: PayloadKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union PayloadKind { - PubkeyHash: wire_cst_Payload_PubkeyHash, - ScriptHash: wire_cst_Payload_ScriptHash, - WitnessProgram: wire_cst_Payload_WitnessProgram, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_Payload_PubkeyHash { - pubkey_hash: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_Payload_ScriptHash { - script_hash: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_Payload_WitnessProgram { - version: i32, - program: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_pk_or_f { - tag: i32, - kind: PkOrFKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union PkOrFKind { - Pubkey: wire_cst_PkOrF_Pubkey, - XOnlyPubkey: wire_cst_PkOrF_XOnlyPubkey, - Fingerprint: wire_cst_PkOrF_Fingerprint, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_PkOrF_Pubkey { - value: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_PkOrF_XOnlyPubkey { - value: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_PkOrF_Fingerprint { - value: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_psbt_sig_hash_type { - inner: u32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_rbf_value { - tag: i32, - kind: RbfValueKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union RbfValueKind { - Value: wire_cst_RbfValue_Value, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_RbfValue_Value { - field0: u32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_record_bdk_address_u_32 { - field0: wire_cst_bdk_address, - field1: u32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_record_bdk_psbt_transaction_details { - field0: wire_cst_bdk_psbt, - field1: wire_cst_transaction_details, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_record_list_prim_u_32_strict_list_condition { - field0: *mut wire_cst_list_prim_u_32_strict, - field1: *mut wire_cst_list_condition, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_record_out_point_input_usize { - field0: wire_cst_out_point, - field1: wire_cst_input, - field2: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_record_string_list_prim_u_32_strict { - field0: *mut wire_cst_list_prim_u_8_strict, - field1: *mut wire_cst_list_prim_u_32_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_record_u_32_list_condition { - field0: u32, - field1: *mut wire_cst_list_condition, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_rpc_config { - url: *mut wire_cst_list_prim_u_8_strict, - auth: wire_cst_auth, - network: i32, - wallet_name: *mut wire_cst_list_prim_u_8_strict, - sync_params: *mut wire_cst_rpc_sync_params, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_rpc_sync_params { - start_script_count: u64, - start_time: u64, - force_start_time: bool, - poll_rate_sec: u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_satisfaction { - tag: i32, - kind: SatisfactionKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union SatisfactionKind { - Partial: wire_cst_Satisfaction_Partial, - PartialComplete: wire_cst_Satisfaction_PartialComplete, - Complete: wire_cst_Satisfaction_Complete, - None: wire_cst_Satisfaction_None, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_Satisfaction_Partial { - n: u64, - m: u64, - items: *mut wire_cst_list_prim_u_64_strict, - sorted: *mut bool, - conditions: *mut wire_cst_list_record_u_32_list_condition, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_Satisfaction_PartialComplete { - n: u64, - m: u64, - items: *mut wire_cst_list_prim_u_64_strict, - sorted: *mut bool, - conditions: *mut wire_cst_list_record_list_prim_u_32_strict_list_condition, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_Satisfaction_Complete { - condition: *mut wire_cst_condition, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_Satisfaction_None { - msg: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_satisfiable_item { - tag: i32, - kind: SatisfiableItemKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union SatisfiableItemKind { - EcdsaSignature: wire_cst_SatisfiableItem_EcdsaSignature, - SchnorrSignature: wire_cst_SatisfiableItem_SchnorrSignature, - Sha256Preimage: wire_cst_SatisfiableItem_Sha256Preimage, - Hash256Preimage: wire_cst_SatisfiableItem_Hash256Preimage, - Ripemd160Preimage: wire_cst_SatisfiableItem_Ripemd160Preimage, - Hash160Preimage: wire_cst_SatisfiableItem_Hash160Preimage, - AbsoluteTimelock: wire_cst_SatisfiableItem_AbsoluteTimelock, - RelativeTimelock: wire_cst_SatisfiableItem_RelativeTimelock, - Multisig: wire_cst_SatisfiableItem_Multisig, - Thresh: wire_cst_SatisfiableItem_Thresh, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_EcdsaSignature { - key: *mut wire_cst_pk_or_f, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_SchnorrSignature { - key: *mut wire_cst_pk_or_f, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_Sha256Preimage { - hash: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_Hash256Preimage { - hash: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_Ripemd160Preimage { - hash: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_Hash160Preimage { - hash: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_AbsoluteTimelock { - value: *mut wire_cst_lock_time, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_RelativeTimelock { - value: u32, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_Multisig { - keys: *mut wire_cst_list_pk_or_f, - threshold: u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_SatisfiableItem_Thresh { - items: *mut wire_cst_list_bdk_policy, - threshold: u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_script_amount { - script: wire_cst_bdk_script_buf, - amount: u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_sign_options { - trust_witness_utxo: bool, - assume_height: *mut u32, - allow_all_sighashes: bool, - remove_partial_sigs: bool, - try_finalize: bool, - sign_with_tap_internal_key: bool, - allow_grinding: bool, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_sled_db_configuration { - path: *mut wire_cst_list_prim_u_8_strict, - tree_name: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_sqlite_db_configuration { - path: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_transaction_details { - transaction: *mut wire_cst_bdk_transaction, - txid: *mut wire_cst_list_prim_u_8_strict, - received: u64, - sent: u64, - fee: *mut u64, - confirmation_time: *mut wire_cst_block_time, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_tx_in { - previous_output: wire_cst_out_point, - script_sig: wire_cst_bdk_script_buf, - sequence: u32, - witness: *mut wire_cst_list_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_tx_out { - value: u64, - script_pubkey: wire_cst_bdk_script_buf, -} diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs deleted file mode 100644 index cfe6c5e3..00000000 --- a/rust/src/frb_generated.rs +++ /dev/null @@ -1,7124 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -#![allow( - non_camel_case_types, - unused, - non_snake_case, - clippy::needless_return, - clippy::redundant_closure_call, - clippy::redundant_closure, - clippy::useless_conversion, - clippy::unit_arg, - clippy::unused_unit, - clippy::double_parens, - clippy::let_and_return, - clippy::too_many_arguments, - clippy::match_single_binding, - clippy::clone_on_copy, - clippy::let_unit_value, - clippy::deref_addrof, - clippy::explicit_auto_deref, - clippy::borrow_deref_ref, - clippy::needless_borrow -)] - -// Section: imports - -use crate::*; -use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; -use flutter_rust_bridge::{Handler, IntoIntoDart}; - -// Section: boilerplate - -flutter_rust_bridge::frb_generated_boilerplate!( - default_stream_sink_codec = DcoCodec, - default_rust_opaque = RustOpaqueNom, - default_rust_auto_opaque = RustAutoOpaqueNom, -); -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -321771070; - -// Section: executor - -flutter_rust_bridge::frb_generated_default_handler!(); - -// Section: wire_funcs - -fn wire__crate__api__blockchain__bdk_blockchain_broadcast_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - transaction: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_broadcast", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_transaction = transaction.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::blockchain::BdkBlockchain::broadcast( - api_ptr, - &api_transaction, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__blockchain__bdk_blockchain_create_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - blockchain_config: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_create", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_blockchain_config = blockchain_config.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::blockchain::BdkBlockchain::create(api_blockchain_config)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__blockchain__bdk_blockchain_estimate_fee_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - target: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_estimate_fee", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - let api_target = target.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::blockchain::BdkBlockchain::estimate_fee(&api_that, api_target)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__blockchain__bdk_blockchain_get_block_hash_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - height: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_get_block_hash", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - let api_height = height.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::blockchain::BdkBlockchain::get_block_hash( - &api_that, api_height, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__blockchain__bdk_blockchain_get_height_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_get_height", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::blockchain::BdkBlockchain::get_height(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::descriptor::BdkDescriptor::as_string(&api_that), - )?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_max_satisfaction_weight", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::descriptor::BdkDescriptor::max_satisfaction_weight(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_new_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - descriptor: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_descriptor = descriptor.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::descriptor::BdkDescriptor::new(api_descriptor, api_network)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_new_bip44_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip44", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_secret_key = secret_key.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip44( - api_secret_key, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_new_bip44_public_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, - fingerprint: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip44_public", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_public_key = public_key.cst_decode(); - let api_fingerprint = fingerprint.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip44_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_new_bip49_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip49", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_secret_key = secret_key.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip49( - api_secret_key, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_new_bip49_public_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, - fingerprint: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip49_public", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_public_key = public_key.cst_decode(); - let api_fingerprint = fingerprint.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip49_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_new_bip84_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip84", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_secret_key = secret_key.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip84( - api_secret_key, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_new_bip84_public_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, - fingerprint: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip84_public", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_public_key = public_key.cst_decode(); - let api_fingerprint = fingerprint.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip84_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_new_bip86_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip86", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_secret_key = secret_key.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip86( - api_secret_key, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_new_bip86_public_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, - fingerprint: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip86_public", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_public_key = public_key.cst_decode(); - let api_fingerprint = fingerprint.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip86_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__descriptor__bdk_descriptor_to_string_private_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_to_string_private", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::descriptor::BdkDescriptor::to_string_private(&api_that), - )?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__key__bdk_derivation_path_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_derivation_path_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::key::BdkDerivationPath::as_string(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__key__bdk_derivation_path_from_string_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_derivation_path_from_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkDerivationPath::from_string(api_path)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_public_key_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_public_key_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::key::BdkDescriptorPublicKey::as_string(&api_that), - )?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_public_key_derive_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_public_key_derive", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorPublicKey::derive(api_ptr, api_path)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_public_key_extend_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_public_key_extend", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorPublicKey::extend(api_ptr, api_path)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_public_key_from_string_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_public_key_from_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_public_key = public_key.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorPublicKey::from_string(api_public_key)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_secret_key_as_public_impl( - ptr: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_as_public", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_ptr = ptr.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkDescriptorSecretKey::as_public(api_ptr)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_secret_key_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::key::BdkDescriptorSecretKey::as_string(&api_that), - )?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_secret_key_create_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - network: impl CstDecode, - mnemonic: impl CstDecode, - password: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_create", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_network = network.cst_decode(); - let api_mnemonic = mnemonic.cst_decode(); - let api_password = password.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkDescriptorSecretKey::create( - api_network, - api_mnemonic, - api_password, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_secret_key_derive_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_derive", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorSecretKey::derive(api_ptr, api_path)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_secret_key_extend_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_extend", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorSecretKey::extend(api_ptr, api_path)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_secret_key_from_string_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_from_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_secret_key = secret_key.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorSecretKey::from_string(api_secret_key)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_secret_bytes", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkDescriptorSecretKey::secret_bytes(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__key__bdk_mnemonic_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_mnemonic_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::key::BdkMnemonic::as_string(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__key__bdk_mnemonic_from_entropy_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - entropy: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_mnemonic_from_entropy", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_entropy = entropy.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkMnemonic::from_entropy(api_entropy)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_mnemonic_from_string_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - mnemonic: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_mnemonic_from_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_mnemonic = mnemonic.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkMnemonic::from_string(api_mnemonic)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_mnemonic_new_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - word_count: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_mnemonic_new", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_word_count = word_count.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkMnemonic::new(api_word_count)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::as_string(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_combine_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - other: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_combine", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_other = other.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::combine(api_ptr, api_other)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_extract_tx_impl( - ptr: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_extract_tx", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_ptr = ptr.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::extract_tx(api_ptr)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_fee_amount_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_fee_amount", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::fee_amount(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_fee_rate_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_fee_rate", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::fee_rate(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_from_str_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - psbt_base64: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_from_str", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_psbt_base64 = psbt_base64.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::from_str(api_psbt_base64)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_json_serialize_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_json_serialize", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::json_serialize(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_serialize_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_serialize", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::serialize(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_txid_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_txid", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::txid(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_address_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::as_string(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_address_from_script_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - script: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_from_script", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_script = script.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::types::BdkAddress::from_script(api_script, api_network)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_address_from_string_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - address: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_from_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_address = address.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::types::BdkAddress::from_string(api_address, api_network)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_address_is_valid_for_network_impl( - that: impl CstDecode, - network: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_is_valid_for_network", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - let api_network = network.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::types::BdkAddress::is_valid_for_network(&api_that, api_network), - )?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_address_network_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_network", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::network(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_address_payload_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_payload", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::payload(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_address_script_impl( - ptr: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_script", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_ptr = ptr.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::script(api_ptr))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_address_to_qr_uri_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_to_qr_uri", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::to_qr_uri(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_policy_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_policy_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkPolicy::as_string(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_policy_contribution_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_policy_contribution", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkPolicy::contribution(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_policy_id_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_policy_id", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok(crate::api::types::BdkPolicy::id(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_policy_item_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_policy_item", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok(crate::api::types::BdkPolicy::item(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_policy_requires_path_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_policy_requires_path", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkPolicy::requires_path(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_policy_satisfaction_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_policy_satisfaction", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkPolicy::satisfaction(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_script_buf_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_script_buf_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::as_string(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_script_buf_empty_impl( -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_script_buf_empty", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::empty())?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__types__bdk_script_buf_from_hex_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - s: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_script_buf_from_hex", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_s = s.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkScriptBuf::from_hex(api_s)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_script_buf_with_capacity_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - capacity: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_script_buf_with_capacity", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_capacity = capacity.cst_decode(); - move |context| { - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::types::BdkScriptBuf::with_capacity(api_capacity), - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_from_bytes_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - transaction_bytes: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_from_bytes", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_transaction_bytes = transaction_bytes.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::types::BdkTransaction::from_bytes(api_transaction_bytes)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_input_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_input", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::input(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_is_coin_base_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_is_coin_base", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::is_coin_base(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_is_explicitly_rbf_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_is_explicitly_rbf", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::types::BdkTransaction::is_explicitly_rbf(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_is_lock_time_enabled_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_is_lock_time_enabled", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::types::BdkTransaction::is_lock_time_enabled(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_lock_time_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_lock_time", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::lock_time(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_new_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - version: impl CstDecode, - lock_time: impl CstDecode, - input: impl CstDecode>, - output: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_new", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_version = version.cst_decode(); - let api_lock_time = lock_time.cst_decode(); - let api_input = input.cst_decode(); - let api_output = output.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::new( - api_version, - api_lock_time, - api_input, - api_output, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_output_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_output", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::output(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_serialize_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_serialize", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::serialize(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_size_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_size", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::size(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_txid_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_txid", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::txid(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_version_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_version", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::version(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_vsize_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_vsize", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::vsize(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__types__bdk_transaction_weight_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_weight", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::weight(&api_that)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_get_address_impl( - ptr: impl CstDecode, - address_index: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_address", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_address_index = address_index.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::wallet::BdkWallet::get_address(api_ptr, api_address_index)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_get_balance_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_balance", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::get_balance(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain_impl( - ptr: impl CstDecode, - keychain: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_descriptor_for_keychain", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_keychain = keychain.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::get_descriptor_for_keychain( - api_ptr, - api_keychain, - )?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_get_internal_address_impl( - ptr: impl CstDecode, - address_index: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_internal_address", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_address_index = address_index.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::get_internal_address( - api_ptr, - api_address_index, - )?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_get_psbt_input_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - utxo: impl CstDecode, - only_witness_utxo: impl CstDecode, - sighash_type: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_psbt_input", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - let api_utxo = utxo.cst_decode(); - let api_only_witness_utxo = only_witness_utxo.cst_decode(); - let api_sighash_type = sighash_type.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::get_psbt_input( - &api_that, - api_utxo, - api_only_witness_utxo, - api_sighash_type, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_is_mine_impl( - ptr: impl CstDecode, - script: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_is_mine", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_script = script.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::is_mine(api_ptr, api_script)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_list_transactions_impl( - that: impl CstDecode, - include_raw: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_list_transactions", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - let api_include_raw = include_raw.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::wallet::BdkWallet::list_transactions(&api_that, api_include_raw)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_list_unspent_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_list_unspent", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::list_unspent(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_network_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_network", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::network(&api_that)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_new_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - descriptor: impl CstDecode, - change_descriptor: impl CstDecode>, - network: impl CstDecode, - database_config: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_new", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_descriptor = descriptor.cst_decode(); - let api_change_descriptor = change_descriptor.cst_decode(); - let api_network = network.cst_decode(); - let api_database_config = database_config.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::new( - api_descriptor, - api_change_descriptor, - api_network, - api_database_config, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_policies_impl( - ptr: impl CstDecode, - keychain: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_policies", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_keychain = keychain.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::policies(api_ptr, api_keychain)?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_sign_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - psbt: impl CstDecode, - sign_options: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_sign", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_psbt = psbt.cst_decode(); - let api_sign_options = sign_options.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::wallet::BdkWallet::sign(api_ptr, api_psbt, api_sign_options)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__wallet__bdk_wallet_sync_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - blockchain: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_sync", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_blockchain = blockchain.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::sync(api_ptr, &api_blockchain)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__wallet__finish_bump_fee_tx_builder_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - txid: impl CstDecode, - fee_rate: impl CstDecode, - allow_shrinking: impl CstDecode>, - wallet: impl CstDecode, - enable_rbf: impl CstDecode, - n_sequence: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "finish_bump_fee_tx_builder", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_txid = txid.cst_decode(); - let api_fee_rate = fee_rate.cst_decode(); - let api_allow_shrinking = allow_shrinking.cst_decode(); - let api_wallet = wallet.cst_decode(); - let api_enable_rbf = enable_rbf.cst_decode(); - let api_n_sequence = n_sequence.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::finish_bump_fee_tx_builder( - api_txid, - api_fee_rate, - api_allow_shrinking, - api_wallet, - api_enable_rbf, - api_n_sequence, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__wallet__tx_builder_finish_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - wallet: impl CstDecode, - recipients: impl CstDecode>, - utxos: impl CstDecode>, - foreign_utxo: impl CstDecode>, - un_spendable: impl CstDecode>, - change_policy: impl CstDecode, - manually_selected_only: impl CstDecode, - fee_rate: impl CstDecode>, - fee_absolute: impl CstDecode>, - drain_wallet: impl CstDecode, - drain_to: impl CstDecode>, - rbf: impl CstDecode>, - internal_policy_path: impl CstDecode>>>, - external_policy_path: impl CstDecode>>>, - data: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "tx_builder_finish", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_wallet = wallet.cst_decode(); - let api_recipients = recipients.cst_decode(); - let api_utxos = utxos.cst_decode(); - let api_foreign_utxo = foreign_utxo.cst_decode(); - let api_un_spendable = un_spendable.cst_decode(); - let api_change_policy = change_policy.cst_decode(); - let api_manually_selected_only = manually_selected_only.cst_decode(); - let api_fee_rate = fee_rate.cst_decode(); - let api_fee_absolute = fee_absolute.cst_decode(); - let api_drain_wallet = drain_wallet.cst_decode(); - let api_drain_to = drain_to.cst_decode(); - let api_rbf = rbf.cst_decode(); - let api_internal_policy_path = internal_policy_path.cst_decode(); - let api_external_policy_path = external_policy_path.cst_decode(); - let api_data = data.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::tx_builder_finish( - api_wallet, - api_recipients, - api_utxos, - api_foreign_utxo, - api_un_spendable, - api_change_policy, - api_manually_selected_only, - api_fee_rate, - api_fee_absolute, - api_drain_wallet, - api_drain_to, - api_rbf, - api_internal_policy_path, - api_external_policy_path, - api_data, - )?; - Ok(output_ok) - })()) - } - }, - ) -} - -// Section: dart2rust - -impl CstDecode for bool { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> bool { - self - } -} -impl CstDecode for i32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::ChangeSpendPolicy { - match self { - 0 => crate::api::types::ChangeSpendPolicy::ChangeAllowed, - 1 => crate::api::types::ChangeSpendPolicy::OnlyChange, - 2 => crate::api::types::ChangeSpendPolicy::ChangeForbidden, - _ => unreachable!("Invalid variant for ChangeSpendPolicy: {}", self), - } - } -} -impl CstDecode for f32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> f32 { - self - } -} -impl CstDecode for i32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> i32 { - self - } -} -impl CstDecode for i32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::KeychainKind { - match self { - 0 => crate::api::types::KeychainKind::ExternalChain, - 1 => crate::api::types::KeychainKind::InternalChain, - _ => unreachable!("Invalid variant for KeychainKind: {}", self), - } - } -} -impl CstDecode for i32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Network { - match self { - 0 => crate::api::types::Network::Testnet, - 1 => crate::api::types::Network::Regtest, - 2 => crate::api::types::Network::Bitcoin, - 3 => crate::api::types::Network::Signet, - _ => unreachable!("Invalid variant for Network: {}", self), - } - } -} -impl CstDecode for u32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u32 { - self - } -} -impl CstDecode for u64 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u64 { - self - } -} -impl CstDecode for u8 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u8 { - self - } -} -impl CstDecode for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> usize { - self - } -} -impl CstDecode for i32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Variant { - match self { - 0 => crate::api::types::Variant::Bech32, - 1 => crate::api::types::Variant::Bech32m, - _ => unreachable!("Invalid variant for Variant: {}", self), - } - } -} -impl CstDecode for i32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::WitnessVersion { - match self { - 0 => crate::api::types::WitnessVersion::V0, - 1 => crate::api::types::WitnessVersion::V1, - 2 => crate::api::types::WitnessVersion::V2, - 3 => crate::api::types::WitnessVersion::V3, - 4 => crate::api::types::WitnessVersion::V4, - 5 => crate::api::types::WitnessVersion::V5, - 6 => crate::api::types::WitnessVersion::V6, - 7 => crate::api::types::WitnessVersion::V7, - 8 => crate::api::types::WitnessVersion::V8, - 9 => crate::api::types::WitnessVersion::V9, - 10 => crate::api::types::WitnessVersion::V10, - 11 => crate::api::types::WitnessVersion::V11, - 12 => crate::api::types::WitnessVersion::V12, - 13 => crate::api::types::WitnessVersion::V13, - 14 => crate::api::types::WitnessVersion::V14, - 15 => crate::api::types::WitnessVersion::V15, - 16 => crate::api::types::WitnessVersion::V16, - _ => unreachable!("Invalid variant for WitnessVersion: {}", self), - } - } -} -impl CstDecode for i32 { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::WordCount { - match self { - 0 => crate::api::types::WordCount::Words12, - 1 => crate::api::types::WordCount::Words18, - 2 => crate::api::types::WordCount::Words24, - _ => unreachable!("Invalid variant for WordCount: {}", self), - } - } -} -impl SseDecode for std::collections::HashMap> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = )>>::sse_decode(deserializer); - return inner.into_iter().collect(); - } -} - -impl SseDecode for std::collections::HashMap, Vec> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = - , Vec)>>::sse_decode(deserializer); - return inner.into_iter().collect(); - } -} - -impl SseDecode for std::collections::HashMap> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = )>>::sse_decode(deserializer); - return inner.into_iter().collect(); - } -} - -impl SseDecode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom>> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for RustOpaqueNom> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return unsafe { decode_rust_opaque_nom(inner) }; - } -} - -impl SseDecode for String { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = >::sse_decode(deserializer); - return String::from_utf8(inner).unwrap(); - } -} - -impl SseDecode for crate::api::error::AddressError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::Base58(var_field0); - } - 1 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::Bech32(var_field0); - } - 2 => { - return crate::api::error::AddressError::EmptyBech32Payload; - } - 3 => { - let mut var_expected = ::sse_decode(deserializer); - let mut var_found = ::sse_decode(deserializer); - return crate::api::error::AddressError::InvalidBech32Variant { - expected: var_expected, - found: var_found, - }; - } - 4 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::InvalidWitnessVersion(var_field0); - } - 5 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::UnparsableWitnessVersion(var_field0); - } - 6 => { - return crate::api::error::AddressError::MalformedWitnessVersion; - } - 7 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::InvalidWitnessProgramLength(var_field0); - } - 8 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::InvalidSegwitV0ProgramLength(var_field0); - } - 9 => { - return crate::api::error::AddressError::UncompressedPubkey; - } - 10 => { - return crate::api::error::AddressError::ExcessiveScriptSize; - } - 11 => { - return crate::api::error::AddressError::UnrecognizedScript; - } - 12 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::UnknownAddressType(var_field0); - } - 13 => { - let mut var_networkRequired = - ::sse_decode(deserializer); - let mut var_networkFound = ::sse_decode(deserializer); - let mut var_address = ::sse_decode(deserializer); - return crate::api::error::AddressError::NetworkValidation { - network_required: var_networkRequired, - network_found: var_networkFound, - address: var_address, - }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::types::AddressIndex { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - return crate::api::types::AddressIndex::Increase; - } - 1 => { - return crate::api::types::AddressIndex::LastUnused; - } - 2 => { - let mut var_index = ::sse_decode(deserializer); - return crate::api::types::AddressIndex::Peek { index: var_index }; - } - 3 => { - let mut var_index = ::sse_decode(deserializer); - return crate::api::types::AddressIndex::Reset { index: var_index }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::blockchain::Auth { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - return crate::api::blockchain::Auth::None; - } - 1 => { - let mut var_username = ::sse_decode(deserializer); - let mut var_password = ::sse_decode(deserializer); - return crate::api::blockchain::Auth::UserPass { - username: var_username, - password: var_password, - }; - } - 2 => { - let mut var_file = ::sse_decode(deserializer); - return crate::api::blockchain::Auth::Cookie { file: var_file }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::types::Balance { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_immature = ::sse_decode(deserializer); - let mut var_trustedPending = ::sse_decode(deserializer); - let mut var_untrustedPending = ::sse_decode(deserializer); - let mut var_confirmed = ::sse_decode(deserializer); - let mut var_spendable = ::sse_decode(deserializer); - let mut var_total = ::sse_decode(deserializer); - return crate::api::types::Balance { - immature: var_immature, - trusted_pending: var_trustedPending, - untrusted_pending: var_untrustedPending, - confirmed: var_confirmed, - spendable: var_spendable, - total: var_total, - }; - } -} - -impl SseDecode for crate::api::types::BdkAddress { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = >::sse_decode(deserializer); - return crate::api::types::BdkAddress { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::blockchain::BdkBlockchain { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = >::sse_decode(deserializer); - return crate::api::blockchain::BdkBlockchain { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::key::BdkDerivationPath { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = - >::sse_decode(deserializer); - return crate::api::key::BdkDerivationPath { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::descriptor::BdkDescriptor { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_extendedDescriptor = - >::sse_decode(deserializer); - let mut var_keyMap = >::sse_decode(deserializer); - return crate::api::descriptor::BdkDescriptor { - extended_descriptor: var_extendedDescriptor, - key_map: var_keyMap, - }; - } -} - -impl SseDecode for crate::api::key::BdkDescriptorPublicKey { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = >::sse_decode(deserializer); - return crate::api::key::BdkDescriptorPublicKey { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::key::BdkDescriptorSecretKey { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = >::sse_decode(deserializer); - return crate::api::key::BdkDescriptorSecretKey { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::error::BdkError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Hex(var_field0); - } - 1 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Consensus(var_field0); - } - 2 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::VerifyTransaction(var_field0); - } - 3 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Address(var_field0); - } - 4 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Descriptor(var_field0); - } - 5 => { - let mut var_field0 = >::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidU32Bytes(var_field0); - } - 6 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Generic(var_field0); - } - 7 => { - return crate::api::error::BdkError::ScriptDoesntHaveAddressForm; - } - 8 => { - return crate::api::error::BdkError::NoRecipients; - } - 9 => { - return crate::api::error::BdkError::NoUtxosSelected; - } - 10 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::OutputBelowDustLimit(var_field0); - } - 11 => { - let mut var_needed = ::sse_decode(deserializer); - let mut var_available = ::sse_decode(deserializer); - return crate::api::error::BdkError::InsufficientFunds { - needed: var_needed, - available: var_available, - }; - } - 12 => { - return crate::api::error::BdkError::BnBTotalTriesExceeded; - } - 13 => { - return crate::api::error::BdkError::BnBNoExactMatch; - } - 14 => { - return crate::api::error::BdkError::UnknownUtxo; - } - 15 => { - return crate::api::error::BdkError::TransactionNotFound; - } - 16 => { - return crate::api::error::BdkError::TransactionConfirmed; - } - 17 => { - return crate::api::error::BdkError::IrreplaceableTransaction; - } - 18 => { - let mut var_needed = ::sse_decode(deserializer); - return crate::api::error::BdkError::FeeRateTooLow { needed: var_needed }; - } - 19 => { - let mut var_needed = ::sse_decode(deserializer); - return crate::api::error::BdkError::FeeTooLow { needed: var_needed }; - } - 20 => { - return crate::api::error::BdkError::FeeRateUnavailable; - } - 21 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::MissingKeyOrigin(var_field0); - } - 22 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Key(var_field0); - } - 23 => { - return crate::api::error::BdkError::ChecksumMismatch; - } - 24 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::SpendingPolicyRequired(var_field0); - } - 25 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidPolicyPathError(var_field0); - } - 26 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Signer(var_field0); - } - 27 => { - let mut var_requested = ::sse_decode(deserializer); - let mut var_found = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidNetwork { - requested: var_requested, - found: var_found, - }; - } - 28 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidOutpoint(var_field0); - } - 29 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Encode(var_field0); - } - 30 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Miniscript(var_field0); - } - 31 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::MiniscriptPsbt(var_field0); - } - 32 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Bip32(var_field0); - } - 33 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Bip39(var_field0); - } - 34 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Secp256k1(var_field0); - } - 35 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Json(var_field0); - } - 36 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Psbt(var_field0); - } - 37 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::PsbtParse(var_field0); - } - 38 => { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = ::sse_decode(deserializer); - return crate::api::error::BdkError::MissingCachedScripts(var_field0, var_field1); - } - 39 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Electrum(var_field0); - } - 40 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Esplora(var_field0); - } - 41 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Sled(var_field0); - } - 42 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Rpc(var_field0); - } - 43 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Rusqlite(var_field0); - } - 44 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidInput(var_field0); - } - 45 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidLockTime(var_field0); - } - 46 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidTransaction(var_field0); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::key::BdkMnemonic { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = >::sse_decode(deserializer); - return crate::api::key::BdkMnemonic { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::types::BdkPolicy { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = >::sse_decode(deserializer); - return crate::api::types::BdkPolicy { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::psbt::BdkPsbt { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = , - >>::sse_decode(deserializer); - return crate::api::psbt::BdkPsbt { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::types::BdkScriptBuf { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_bytes = >::sse_decode(deserializer); - return crate::api::types::BdkScriptBuf { bytes: var_bytes }; - } -} - -impl SseDecode for crate::api::types::BdkTransaction { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_s = ::sse_decode(deserializer); - return crate::api::types::BdkTransaction { s: var_s }; - } -} - -impl SseDecode for crate::api::wallet::BdkWallet { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = - >>>::sse_decode( - deserializer, - ); - return crate::api::wallet::BdkWallet { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::types::BlockTime { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_height = ::sse_decode(deserializer); - let mut var_timestamp = ::sse_decode(deserializer); - return crate::api::types::BlockTime { - height: var_height, - timestamp: var_timestamp, - }; - } -} - -impl SseDecode for crate::api::blockchain::BlockchainConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_config = - ::sse_decode(deserializer); - return crate::api::blockchain::BlockchainConfig::Electrum { config: var_config }; - } - 1 => { - let mut var_config = - ::sse_decode(deserializer); - return crate::api::blockchain::BlockchainConfig::Esplora { config: var_config }; - } - 2 => { - let mut var_config = ::sse_decode(deserializer); - return crate::api::blockchain::BlockchainConfig::Rpc { config: var_config }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for bool { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - deserializer.cursor.read_u8().unwrap() != 0 - } -} - -impl SseDecode for crate::api::types::ChangeSpendPolicy { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return match inner { - 0 => crate::api::types::ChangeSpendPolicy::ChangeAllowed, - 1 => crate::api::types::ChangeSpendPolicy::OnlyChange, - 2 => crate::api::types::ChangeSpendPolicy::ChangeForbidden, - _ => unreachable!("Invalid variant for ChangeSpendPolicy: {}", inner), - }; - } -} - -impl SseDecode for crate::api::types::Condition { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_csv = >::sse_decode(deserializer); - let mut var_timelock = >::sse_decode(deserializer); - return crate::api::types::Condition { - csv: var_csv, - timelock: var_timelock, - }; - } -} - -impl SseDecode for crate::api::error::ConsensusError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::ConsensusError::Io(var_field0); - } - 1 => { - let mut var_requested = ::sse_decode(deserializer); - let mut var_max = ::sse_decode(deserializer); - return crate::api::error::ConsensusError::OversizedVectorAllocation { - requested: var_requested, - max: var_max, - }; - } - 2 => { - let mut var_expected = <[u8; 4]>::sse_decode(deserializer); - let mut var_actual = <[u8; 4]>::sse_decode(deserializer); - return crate::api::error::ConsensusError::InvalidChecksum { - expected: var_expected, - actual: var_actual, - }; - } - 3 => { - return crate::api::error::ConsensusError::NonMinimalVarInt; - } - 4 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::ConsensusError::ParseFailed(var_field0); - } - 5 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::ConsensusError::UnsupportedSegwitFlag(var_field0); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::types::DatabaseConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - return crate::api::types::DatabaseConfig::Memory; - } - 1 => { - let mut var_config = - ::sse_decode(deserializer); - return crate::api::types::DatabaseConfig::Sqlite { config: var_config }; - } - 2 => { - let mut var_config = - ::sse_decode(deserializer); - return crate::api::types::DatabaseConfig::Sled { config: var_config }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::error::DescriptorError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - return crate::api::error::DescriptorError::InvalidHdKeyPath; - } - 1 => { - return crate::api::error::DescriptorError::InvalidDescriptorChecksum; - } - 2 => { - return crate::api::error::DescriptorError::HardenedDerivationXpub; - } - 3 => { - return crate::api::error::DescriptorError::MultiPath; - } - 4 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Key(var_field0); - } - 5 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Policy(var_field0); - } - 6 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::InvalidDescriptorCharacter(var_field0); - } - 7 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Bip32(var_field0); - } - 8 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Base58(var_field0); - } - 9 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Pk(var_field0); - } - 10 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Miniscript(var_field0); - } - 11 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Hex(var_field0); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::blockchain::ElectrumConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_url = ::sse_decode(deserializer); - let mut var_socks5 = >::sse_decode(deserializer); - let mut var_retry = ::sse_decode(deserializer); - let mut var_timeout = >::sse_decode(deserializer); - let mut var_stopGap = ::sse_decode(deserializer); - let mut var_validateDomain = ::sse_decode(deserializer); - return crate::api::blockchain::ElectrumConfig { - url: var_url, - socks5: var_socks5, - retry: var_retry, - timeout: var_timeout, - stop_gap: var_stopGap, - validate_domain: var_validateDomain, - }; - } -} - -impl SseDecode for crate::api::blockchain::EsploraConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_baseUrl = ::sse_decode(deserializer); - let mut var_proxy = >::sse_decode(deserializer); - let mut var_concurrency = >::sse_decode(deserializer); - let mut var_stopGap = ::sse_decode(deserializer); - let mut var_timeout = >::sse_decode(deserializer); - return crate::api::blockchain::EsploraConfig { - base_url: var_baseUrl, - proxy: var_proxy, - concurrency: var_concurrency, - stop_gap: var_stopGap, - timeout: var_timeout, - }; - } -} - -impl SseDecode for f32 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - deserializer.cursor.read_f32::().unwrap() - } -} - -impl SseDecode for crate::api::types::FeeRate { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_satPerVb = ::sse_decode(deserializer); - return crate::api::types::FeeRate { - sat_per_vb: var_satPerVb, - }; - } -} - -impl SseDecode for crate::api::error::HexError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::HexError::InvalidChar(var_field0); - } - 1 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::HexError::OddLengthString(var_field0); - } - 2 => { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = ::sse_decode(deserializer); - return crate::api::error::HexError::InvalidLength(var_field0, var_field1); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for i32 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - deserializer.cursor.read_i32::().unwrap() - } -} - -impl SseDecode for crate::api::types::Input { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_s = ::sse_decode(deserializer); - return crate::api::types::Input { s: var_s }; - } -} - -impl SseDecode for crate::api::types::KeychainKind { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return match inner { - 0 => crate::api::types::KeychainKind::ExternalChain, - 1 => crate::api::types::KeychainKind::InternalChain, - _ => unreachable!("Invalid variant for KeychainKind: {}", inner), - }; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(>::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec<(Vec, Vec)> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(<(Vec, Vec)>::sse_decode( - deserializer, - )); - } - return ans_; - } -} - -impl SseDecode for Vec<(String, Vec)> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(<(String, Vec)>::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec<(u32, Vec)> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(<(u32, Vec)>::sse_decode( - deserializer, - )); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode( - deserializer, - )); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut len_ = ::sse_decode(deserializer); - let mut ans_ = vec![]; - for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); - } - return ans_; - } -} - -impl SseDecode for crate::api::types::LocalUtxo { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_outpoint = ::sse_decode(deserializer); - let mut var_txout = ::sse_decode(deserializer); - let mut var_keychain = ::sse_decode(deserializer); - let mut var_isSpent = ::sse_decode(deserializer); - return crate::api::types::LocalUtxo { - outpoint: var_outpoint, - txout: var_txout, - keychain: var_keychain, - is_spent: var_isSpent, - }; - } -} - -impl SseDecode for crate::api::types::LockTime { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::types::LockTime::Blocks(var_field0); - } - 1 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::types::LockTime::Seconds(var_field0); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::types::Network { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return match inner { - 0 => crate::api::types::Network::Testnet, - 1 => crate::api::types::Network::Regtest, - 2 => crate::api::types::Network::Bitcoin, - 3 => crate::api::types::Network::Signet, - _ => unreachable!("Invalid variant for Network: {}", inner), - }; - } -} - -impl SseDecode for Option>> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(>>::sse_decode( - deserializer, - )); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode( - deserializer, - )); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode( - deserializer, - )); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode( - deserializer, - )); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option<(crate::api::types::OutPoint, crate::api::types::Input, usize)> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(<( - crate::api::types::OutPoint, - crate::api::types::Input, - usize, - )>::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode( - deserializer, - )); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } - } -} - -impl SseDecode for crate::api::types::OutPoint { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_txid = ::sse_decode(deserializer); - let mut var_vout = ::sse_decode(deserializer); - return crate::api::types::OutPoint { - txid: var_txid, - vout: var_vout, - }; - } -} - -impl SseDecode for crate::api::types::Payload { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_pubkeyHash = ::sse_decode(deserializer); - return crate::api::types::Payload::PubkeyHash { - pubkey_hash: var_pubkeyHash, - }; - } - 1 => { - let mut var_scriptHash = ::sse_decode(deserializer); - return crate::api::types::Payload::ScriptHash { - script_hash: var_scriptHash, - }; - } - 2 => { - let mut var_version = ::sse_decode(deserializer); - let mut var_program = >::sse_decode(deserializer); - return crate::api::types::Payload::WitnessProgram { - version: var_version, - program: var_program, - }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::types::PkOrF { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_value = ::sse_decode(deserializer); - return crate::api::types::PkOrF::Pubkey { value: var_value }; - } - 1 => { - let mut var_value = ::sse_decode(deserializer); - return crate::api::types::PkOrF::XOnlyPubkey { value: var_value }; - } - 2 => { - let mut var_value = ::sse_decode(deserializer); - return crate::api::types::PkOrF::Fingerprint { value: var_value }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::types::PsbtSigHashType { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_inner = ::sse_decode(deserializer); - return crate::api::types::PsbtSigHashType { inner: var_inner }; - } -} - -impl SseDecode for crate::api::types::RbfValue { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - return crate::api::types::RbfValue::RbfDefault; - } - 1 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::types::RbfValue::Value(var_field0); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for (crate::api::types::BdkAddress, u32) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = ::sse_decode(deserializer); - return (var_field0, var_field1); - } -} - -impl SseDecode - for ( - crate::api::psbt::BdkPsbt, - crate::api::types::TransactionDetails, - ) -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = ::sse_decode(deserializer); - return (var_field0, var_field1); - } -} - -impl SseDecode for (Vec, Vec) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_field0 = >::sse_decode(deserializer); - let mut var_field1 = >::sse_decode(deserializer); - return (var_field0, var_field1); - } -} - -impl SseDecode for (crate::api::types::OutPoint, crate::api::types::Input, usize) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = ::sse_decode(deserializer); - let mut var_field2 = ::sse_decode(deserializer); - return (var_field0, var_field1, var_field2); - } -} - -impl SseDecode for (String, Vec) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = >::sse_decode(deserializer); - return (var_field0, var_field1); - } -} - -impl SseDecode for (u32, Vec) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = >::sse_decode(deserializer); - return (var_field0, var_field1); - } -} - -impl SseDecode for crate::api::blockchain::RpcConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_url = ::sse_decode(deserializer); - let mut var_auth = ::sse_decode(deserializer); - let mut var_network = ::sse_decode(deserializer); - let mut var_walletName = ::sse_decode(deserializer); - let mut var_syncParams = - >::sse_decode(deserializer); - return crate::api::blockchain::RpcConfig { - url: var_url, - auth: var_auth, - network: var_network, - wallet_name: var_walletName, - sync_params: var_syncParams, - }; - } -} - -impl SseDecode for crate::api::blockchain::RpcSyncParams { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_startScriptCount = ::sse_decode(deserializer); - let mut var_startTime = ::sse_decode(deserializer); - let mut var_forceStartTime = ::sse_decode(deserializer); - let mut var_pollRateSec = ::sse_decode(deserializer); - return crate::api::blockchain::RpcSyncParams { - start_script_count: var_startScriptCount, - start_time: var_startTime, - force_start_time: var_forceStartTime, - poll_rate_sec: var_pollRateSec, - }; - } -} - -impl SseDecode for crate::api::types::Satisfaction { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_n = ::sse_decode(deserializer); - let mut var_m = ::sse_decode(deserializer); - let mut var_items = >::sse_decode(deserializer); - let mut var_sorted = >::sse_decode(deserializer); - let mut var_conditions = , - >>::sse_decode(deserializer); - return crate::api::types::Satisfaction::Partial { - n: var_n, - m: var_m, - items: var_items, - sorted: var_sorted, - conditions: var_conditions, - }; - } - 1 => { - let mut var_n = ::sse_decode(deserializer); - let mut var_m = ::sse_decode(deserializer); - let mut var_items = >::sse_decode(deserializer); - let mut var_sorted = >::sse_decode(deserializer); - let mut var_conditions = , - Vec, - >>::sse_decode(deserializer); - return crate::api::types::Satisfaction::PartialComplete { - n: var_n, - m: var_m, - items: var_items, - sorted: var_sorted, - conditions: var_conditions, - }; - } - 2 => { - let mut var_condition = ::sse_decode(deserializer); - return crate::api::types::Satisfaction::Complete { - condition: var_condition, - }; - } - 3 => { - let mut var_msg = ::sse_decode(deserializer); - return crate::api::types::Satisfaction::None { msg: var_msg }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::types::SatisfiableItem { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut tag_ = ::sse_decode(deserializer); - match tag_ { - 0 => { - let mut var_key = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::EcdsaSignature { key: var_key }; - } - 1 => { - let mut var_key = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::SchnorrSignature { key: var_key }; - } - 2 => { - let mut var_hash = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::Sha256Preimage { hash: var_hash }; - } - 3 => { - let mut var_hash = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::Hash256Preimage { hash: var_hash }; - } - 4 => { - let mut var_hash = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::Ripemd160Preimage { hash: var_hash }; - } - 5 => { - let mut var_hash = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::Hash160Preimage { hash: var_hash }; - } - 6 => { - let mut var_value = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::AbsoluteTimelock { value: var_value }; - } - 7 => { - let mut var_value = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::RelativeTimelock { value: var_value }; - } - 8 => { - let mut var_keys = >::sse_decode(deserializer); - let mut var_threshold = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::Multisig { - keys: var_keys, - threshold: var_threshold, - }; - } - 9 => { - let mut var_items = >::sse_decode(deserializer); - let mut var_threshold = ::sse_decode(deserializer); - return crate::api::types::SatisfiableItem::Thresh { - items: var_items, - threshold: var_threshold, - }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::api::types::ScriptAmount { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_script = ::sse_decode(deserializer); - let mut var_amount = ::sse_decode(deserializer); - return crate::api::types::ScriptAmount { - script: var_script, - amount: var_amount, - }; - } -} - -impl SseDecode for crate::api::types::SignOptions { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_trustWitnessUtxo = ::sse_decode(deserializer); - let mut var_assumeHeight = >::sse_decode(deserializer); - let mut var_allowAllSighashes = ::sse_decode(deserializer); - let mut var_removePartialSigs = ::sse_decode(deserializer); - let mut var_tryFinalize = ::sse_decode(deserializer); - let mut var_signWithTapInternalKey = ::sse_decode(deserializer); - let mut var_allowGrinding = ::sse_decode(deserializer); - return crate::api::types::SignOptions { - trust_witness_utxo: var_trustWitnessUtxo, - assume_height: var_assumeHeight, - allow_all_sighashes: var_allowAllSighashes, - remove_partial_sigs: var_removePartialSigs, - try_finalize: var_tryFinalize, - sign_with_tap_internal_key: var_signWithTapInternalKey, - allow_grinding: var_allowGrinding, - }; - } -} - -impl SseDecode for crate::api::types::SledDbConfiguration { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_path = ::sse_decode(deserializer); - let mut var_treeName = ::sse_decode(deserializer); - return crate::api::types::SledDbConfiguration { - path: var_path, - tree_name: var_treeName, - }; - } -} - -impl SseDecode for crate::api::types::SqliteDbConfiguration { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_path = ::sse_decode(deserializer); - return crate::api::types::SqliteDbConfiguration { path: var_path }; - } -} - -impl SseDecode for crate::api::types::TransactionDetails { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_transaction = - >::sse_decode(deserializer); - let mut var_txid = ::sse_decode(deserializer); - let mut var_received = ::sse_decode(deserializer); - let mut var_sent = ::sse_decode(deserializer); - let mut var_fee = >::sse_decode(deserializer); - let mut var_confirmationTime = - >::sse_decode(deserializer); - return crate::api::types::TransactionDetails { - transaction: var_transaction, - txid: var_txid, - received: var_received, - sent: var_sent, - fee: var_fee, - confirmation_time: var_confirmationTime, - }; - } -} - -impl SseDecode for crate::api::types::TxIn { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_previousOutput = ::sse_decode(deserializer); - let mut var_scriptSig = ::sse_decode(deserializer); - let mut var_sequence = ::sse_decode(deserializer); - let mut var_witness = >>::sse_decode(deserializer); - return crate::api::types::TxIn { - previous_output: var_previousOutput, - script_sig: var_scriptSig, - sequence: var_sequence, - witness: var_witness, - }; - } -} - -impl SseDecode for crate::api::types::TxOut { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_value = ::sse_decode(deserializer); - let mut var_scriptPubkey = ::sse_decode(deserializer); - return crate::api::types::TxOut { - value: var_value, - script_pubkey: var_scriptPubkey, - }; - } -} - -impl SseDecode for u32 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - deserializer.cursor.read_u32::().unwrap() - } -} - -impl SseDecode for u64 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - deserializer.cursor.read_u64::().unwrap() - } -} - -impl SseDecode for u8 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - deserializer.cursor.read_u8().unwrap() - } -} - -impl SseDecode for [u8; 4] { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = >::sse_decode(deserializer); - return flutter_rust_bridge::for_generated::from_vec_to_array(inner); - } -} - -impl SseDecode for () { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {} -} - -impl SseDecode for usize { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - deserializer.cursor.read_u64::().unwrap() as _ - } -} - -impl SseDecode for crate::api::types::Variant { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return match inner { - 0 => crate::api::types::Variant::Bech32, - 1 => crate::api::types::Variant::Bech32m, - _ => unreachable!("Invalid variant for Variant: {}", inner), - }; - } -} - -impl SseDecode for crate::api::types::WitnessVersion { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return match inner { - 0 => crate::api::types::WitnessVersion::V0, - 1 => crate::api::types::WitnessVersion::V1, - 2 => crate::api::types::WitnessVersion::V2, - 3 => crate::api::types::WitnessVersion::V3, - 4 => crate::api::types::WitnessVersion::V4, - 5 => crate::api::types::WitnessVersion::V5, - 6 => crate::api::types::WitnessVersion::V6, - 7 => crate::api::types::WitnessVersion::V7, - 8 => crate::api::types::WitnessVersion::V8, - 9 => crate::api::types::WitnessVersion::V9, - 10 => crate::api::types::WitnessVersion::V10, - 11 => crate::api::types::WitnessVersion::V11, - 12 => crate::api::types::WitnessVersion::V12, - 13 => crate::api::types::WitnessVersion::V13, - 14 => crate::api::types::WitnessVersion::V14, - 15 => crate::api::types::WitnessVersion::V15, - 16 => crate::api::types::WitnessVersion::V16, - _ => unreachable!("Invalid variant for WitnessVersion: {}", inner), - }; - } -} - -impl SseDecode for crate::api::types::WordCount { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut inner = ::sse_decode(deserializer); - return match inner { - 0 => crate::api::types::WordCount::Words12, - 1 => crate::api::types::WordCount::Words18, - 2 => crate::api::types::WordCount::Words24, - _ => unreachable!("Invalid variant for WordCount: {}", inner), - }; - } -} - -fn pde_ffi_dispatcher_primary_impl( - func_id: i32, - port: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len: i32, - data_len: i32, -) { - // Codec=Pde (Serialization + dispatch), see doc to use other codecs - match func_id { - _ => unreachable!(), - } -} - -fn pde_ffi_dispatcher_sync_impl( - func_id: i32, - ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len: i32, - data_len: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - // Codec=Pde (Serialization + dispatch), see doc to use other codecs - match func_id { - _ => unreachable!(), - } -} - -// Section: rust2dart - -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::error::AddressError { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::error::AddressError::Base58(field0) => { - [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::AddressError::Bech32(field0) => { - [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::AddressError::EmptyBech32Payload => [2.into_dart()].into_dart(), - crate::api::error::AddressError::InvalidBech32Variant { expected, found } => [ - 3.into_dart(), - expected.into_into_dart().into_dart(), - found.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::AddressError::InvalidWitnessVersion(field0) => { - [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::AddressError::UnparsableWitnessVersion(field0) => { - [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::AddressError::MalformedWitnessVersion => [6.into_dart()].into_dart(), - crate::api::error::AddressError::InvalidWitnessProgramLength(field0) => { - [7.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::AddressError::InvalidSegwitV0ProgramLength(field0) => { - [8.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::AddressError::UncompressedPubkey => [9.into_dart()].into_dart(), - crate::api::error::AddressError::ExcessiveScriptSize => [10.into_dart()].into_dart(), - crate::api::error::AddressError::UnrecognizedScript => [11.into_dart()].into_dart(), - crate::api::error::AddressError::UnknownAddressType(field0) => { - [12.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::AddressError::NetworkValidation { - network_required, - network_found, - address, - } => [ - 13.into_dart(), - network_required.into_into_dart().into_dart(), - network_found.into_into_dart().into_dart(), - address.into_into_dart().into_dart(), - ] - .into_dart(), - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::error::AddressError -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::error::AddressError -{ - fn into_into_dart(self) -> crate::api::error::AddressError { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::AddressIndex { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::AddressIndex::Increase => [0.into_dart()].into_dart(), - crate::api::types::AddressIndex::LastUnused => [1.into_dart()].into_dart(), - crate::api::types::AddressIndex::Peek { index } => { - [2.into_dart(), index.into_into_dart().into_dart()].into_dart() - } - crate::api::types::AddressIndex::Reset { index } => { - [3.into_dart(), index.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::AddressIndex -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::AddressIndex -{ - fn into_into_dart(self) -> crate::api::types::AddressIndex { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::Auth { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::blockchain::Auth::None => [0.into_dart()].into_dart(), - crate::api::blockchain::Auth::UserPass { username, password } => [ - 1.into_dart(), - username.into_into_dart().into_dart(), - password.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::blockchain::Auth::Cookie { file } => { - [2.into_dart(), file.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::blockchain::Auth {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::Auth -{ - fn into_into_dart(self) -> crate::api::blockchain::Auth { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Balance { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.immature.into_into_dart().into_dart(), - self.trusted_pending.into_into_dart().into_dart(), - self.untrusted_pending.into_into_dart().into_dart(), - self.confirmed.into_into_dart().into_dart(), - self.spendable.into_into_dart().into_dart(), - self.total.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Balance {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Balance { - fn into_into_dart(self) -> crate::api::types::Balance { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::BdkAddress { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::BdkAddress {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::BdkAddress -{ - fn into_into_dart(self) -> crate::api::types::BdkAddress { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::BdkBlockchain { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::BdkBlockchain -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::BdkBlockchain -{ - fn into_into_dart(self) -> crate::api::blockchain::BdkBlockchain { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::BdkDerivationPath { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::key::BdkDerivationPath -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::BdkDerivationPath -{ - fn into_into_dart(self) -> crate::api::key::BdkDerivationPath { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::descriptor::BdkDescriptor { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.extended_descriptor.into_into_dart().into_dart(), - self.key_map.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::descriptor::BdkDescriptor -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::descriptor::BdkDescriptor -{ - fn into_into_dart(self) -> crate::api::descriptor::BdkDescriptor { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::BdkDescriptorPublicKey { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::key::BdkDescriptorPublicKey -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::BdkDescriptorPublicKey -{ - fn into_into_dart(self) -> crate::api::key::BdkDescriptorPublicKey { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::BdkDescriptorSecretKey { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::key::BdkDescriptorSecretKey -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::BdkDescriptorSecretKey -{ - fn into_into_dart(self) -> crate::api::key::BdkDescriptorSecretKey { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::error::BdkError { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::error::BdkError::Hex(field0) => { - [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Consensus(field0) => { - [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::VerifyTransaction(field0) => { - [2.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Address(field0) => { - [3.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Descriptor(field0) => { - [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidU32Bytes(field0) => { - [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Generic(field0) => { - [6.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::ScriptDoesntHaveAddressForm => [7.into_dart()].into_dart(), - crate::api::error::BdkError::NoRecipients => [8.into_dart()].into_dart(), - crate::api::error::BdkError::NoUtxosSelected => [9.into_dart()].into_dart(), - crate::api::error::BdkError::OutputBelowDustLimit(field0) => { - [10.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InsufficientFunds { needed, available } => [ - 11.into_dart(), - needed.into_into_dart().into_dart(), - available.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::BdkError::BnBTotalTriesExceeded => [12.into_dart()].into_dart(), - crate::api::error::BdkError::BnBNoExactMatch => [13.into_dart()].into_dart(), - crate::api::error::BdkError::UnknownUtxo => [14.into_dart()].into_dart(), - crate::api::error::BdkError::TransactionNotFound => [15.into_dart()].into_dart(), - crate::api::error::BdkError::TransactionConfirmed => [16.into_dart()].into_dart(), - crate::api::error::BdkError::IrreplaceableTransaction => [17.into_dart()].into_dart(), - crate::api::error::BdkError::FeeRateTooLow { needed } => { - [18.into_dart(), needed.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::FeeTooLow { needed } => { - [19.into_dart(), needed.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::FeeRateUnavailable => [20.into_dart()].into_dart(), - crate::api::error::BdkError::MissingKeyOrigin(field0) => { - [21.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Key(field0) => { - [22.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::ChecksumMismatch => [23.into_dart()].into_dart(), - crate::api::error::BdkError::SpendingPolicyRequired(field0) => { - [24.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidPolicyPathError(field0) => { - [25.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Signer(field0) => { - [26.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidNetwork { requested, found } => [ - 27.into_dart(), - requested.into_into_dart().into_dart(), - found.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::BdkError::InvalidOutpoint(field0) => { - [28.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Encode(field0) => { - [29.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Miniscript(field0) => { - [30.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::MiniscriptPsbt(field0) => { - [31.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Bip32(field0) => { - [32.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Bip39(field0) => { - [33.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Secp256k1(field0) => { - [34.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Json(field0) => { - [35.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Psbt(field0) => { - [36.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::PsbtParse(field0) => { - [37.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::MissingCachedScripts(field0, field1) => [ - 38.into_dart(), - field0.into_into_dart().into_dart(), - field1.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::BdkError::Electrum(field0) => { - [39.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Esplora(field0) => { - [40.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Sled(field0) => { - [41.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Rpc(field0) => { - [42.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Rusqlite(field0) => { - [43.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidInput(field0) => { - [44.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidLockTime(field0) => { - [45.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidTransaction(field0) => { - [46.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::error::BdkError {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::error::BdkError -{ - fn into_into_dart(self) -> crate::api::error::BdkError { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::BdkMnemonic { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::key::BdkMnemonic {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::BdkMnemonic -{ - fn into_into_dart(self) -> crate::api::key::BdkMnemonic { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::BdkPolicy { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::BdkPolicy {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::BdkPolicy -{ - fn into_into_dart(self) -> crate::api::types::BdkPolicy { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::psbt::BdkPsbt { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::psbt::BdkPsbt {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::psbt::BdkPsbt { - fn into_into_dart(self) -> crate::api::psbt::BdkPsbt { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::BdkScriptBuf { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.bytes.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::BdkScriptBuf -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::BdkScriptBuf -{ - fn into_into_dart(self) -> crate::api::types::BdkScriptBuf { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::BdkTransaction { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.s.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::BdkTransaction -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::BdkTransaction -{ - fn into_into_dart(self) -> crate::api::types::BdkTransaction { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::wallet::BdkWallet { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::wallet::BdkWallet {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::wallet::BdkWallet -{ - fn into_into_dart(self) -> crate::api::wallet::BdkWallet { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::BlockTime { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.height.into_into_dart().into_dart(), - self.timestamp.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::BlockTime {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::BlockTime -{ - fn into_into_dart(self) -> crate::api::types::BlockTime { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::BlockchainConfig { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::blockchain::BlockchainConfig::Electrum { config } => { - [0.into_dart(), config.into_into_dart().into_dart()].into_dart() - } - crate::api::blockchain::BlockchainConfig::Esplora { config } => { - [1.into_dart(), config.into_into_dart().into_dart()].into_dart() - } - crate::api::blockchain::BlockchainConfig::Rpc { config } => { - [2.into_dart(), config.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::BlockchainConfig -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::BlockchainConfig -{ - fn into_into_dart(self) -> crate::api::blockchain::BlockchainConfig { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::ChangeSpendPolicy { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - Self::ChangeAllowed => 0.into_dart(), - Self::OnlyChange => 1.into_dart(), - Self::ChangeForbidden => 2.into_dart(), - _ => unreachable!(), - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::ChangeSpendPolicy -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::ChangeSpendPolicy -{ - fn into_into_dart(self) -> crate::api::types::ChangeSpendPolicy { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Condition { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.csv.into_into_dart().into_dart(), - self.timelock.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Condition {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::Condition -{ - fn into_into_dart(self) -> crate::api::types::Condition { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::error::ConsensusError { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::error::ConsensusError::Io(field0) => { - [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::ConsensusError::OversizedVectorAllocation { requested, max } => [ - 1.into_dart(), - requested.into_into_dart().into_dart(), - max.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::ConsensusError::InvalidChecksum { expected, actual } => [ - 2.into_dart(), - expected.into_into_dart().into_dart(), - actual.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::ConsensusError::NonMinimalVarInt => [3.into_dart()].into_dart(), - crate::api::error::ConsensusError::ParseFailed(field0) => { - [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::ConsensusError::UnsupportedSegwitFlag(field0) => { - [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::error::ConsensusError -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::error::ConsensusError -{ - fn into_into_dart(self) -> crate::api::error::ConsensusError { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::DatabaseConfig { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::DatabaseConfig::Memory => [0.into_dart()].into_dart(), - crate::api::types::DatabaseConfig::Sqlite { config } => { - [1.into_dart(), config.into_into_dart().into_dart()].into_dart() - } - crate::api::types::DatabaseConfig::Sled { config } => { - [2.into_dart(), config.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::DatabaseConfig -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::DatabaseConfig -{ - fn into_into_dart(self) -> crate::api::types::DatabaseConfig { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::error::DescriptorError { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::error::DescriptorError::InvalidHdKeyPath => [0.into_dart()].into_dart(), - crate::api::error::DescriptorError::InvalidDescriptorChecksum => { - [1.into_dart()].into_dart() - } - crate::api::error::DescriptorError::HardenedDerivationXpub => { - [2.into_dart()].into_dart() - } - crate::api::error::DescriptorError::MultiPath => [3.into_dart()].into_dart(), - crate::api::error::DescriptorError::Key(field0) => { - [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::DescriptorError::Policy(field0) => { - [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::DescriptorError::InvalidDescriptorCharacter(field0) => { - [6.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::DescriptorError::Bip32(field0) => { - [7.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::DescriptorError::Base58(field0) => { - [8.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::DescriptorError::Pk(field0) => { - [9.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::DescriptorError::Miniscript(field0) => { - [10.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::DescriptorError::Hex(field0) => { - [11.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::error::DescriptorError -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::error::DescriptorError -{ - fn into_into_dart(self) -> crate::api::error::DescriptorError { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::ElectrumConfig { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.url.into_into_dart().into_dart(), - self.socks5.into_into_dart().into_dart(), - self.retry.into_into_dart().into_dart(), - self.timeout.into_into_dart().into_dart(), - self.stop_gap.into_into_dart().into_dart(), - self.validate_domain.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::ElectrumConfig -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::ElectrumConfig -{ - fn into_into_dart(self) -> crate::api::blockchain::ElectrumConfig { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::EsploraConfig { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.base_url.into_into_dart().into_dart(), - self.proxy.into_into_dart().into_dart(), - self.concurrency.into_into_dart().into_dart(), - self.stop_gap.into_into_dart().into_dart(), - self.timeout.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::EsploraConfig -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::EsploraConfig -{ - fn into_into_dart(self) -> crate::api::blockchain::EsploraConfig { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::FeeRate { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.sat_per_vb.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::FeeRate {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::types::FeeRate { - fn into_into_dart(self) -> crate::api::types::FeeRate { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::error::HexError { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::error::HexError::InvalidChar(field0) => { - [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::HexError::OddLengthString(field0) => { - [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::HexError::InvalidLength(field0, field1) => [ - 2.into_dart(), - field0.into_into_dart().into_dart(), - field1.into_into_dart().into_dart(), - ] - .into_dart(), - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::error::HexError {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::error::HexError -{ - fn into_into_dart(self) -> crate::api::error::HexError { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Input { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.s.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Input {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Input { - fn into_into_dart(self) -> crate::api::types::Input { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::KeychainKind { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - Self::ExternalChain => 0.into_dart(), - Self::InternalChain => 1.into_dart(), - _ => unreachable!(), - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::KeychainKind -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::KeychainKind -{ - fn into_into_dart(self) -> crate::api::types::KeychainKind { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::LocalUtxo { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.outpoint.into_into_dart().into_dart(), - self.txout.into_into_dart().into_dart(), - self.keychain.into_into_dart().into_dart(), - self.is_spent.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::LocalUtxo {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::LocalUtxo -{ - fn into_into_dart(self) -> crate::api::types::LocalUtxo { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::LockTime { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::LockTime::Blocks(field0) => { - [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::types::LockTime::Seconds(field0) => { - [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::LockTime {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::LockTime -{ - fn into_into_dart(self) -> crate::api::types::LockTime { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Network { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - Self::Testnet => 0.into_dart(), - Self::Regtest => 1.into_dart(), - Self::Bitcoin => 2.into_dart(), - Self::Signet => 3.into_dart(), - _ => unreachable!(), - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Network {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Network { - fn into_into_dart(self) -> crate::api::types::Network { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::OutPoint { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.txid.into_into_dart().into_dart(), - self.vout.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::OutPoint {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::OutPoint -{ - fn into_into_dart(self) -> crate::api::types::OutPoint { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Payload { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::Payload::PubkeyHash { pubkey_hash } => { - [0.into_dart(), pubkey_hash.into_into_dart().into_dart()].into_dart() - } - crate::api::types::Payload::ScriptHash { script_hash } => { - [1.into_dart(), script_hash.into_into_dart().into_dart()].into_dart() - } - crate::api::types::Payload::WitnessProgram { version, program } => [ - 2.into_dart(), - version.into_into_dart().into_dart(), - program.into_into_dart().into_dart(), - ] - .into_dart(), - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Payload {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Payload { - fn into_into_dart(self) -> crate::api::types::Payload { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::PkOrF { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::PkOrF::Pubkey { value } => { - [0.into_dart(), value.into_into_dart().into_dart()].into_dart() - } - crate::api::types::PkOrF::XOnlyPubkey { value } => { - [1.into_dart(), value.into_into_dart().into_dart()].into_dart() - } - crate::api::types::PkOrF::Fingerprint { value } => { - [2.into_dart(), value.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::PkOrF {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::types::PkOrF { - fn into_into_dart(self) -> crate::api::types::PkOrF { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::PsbtSigHashType { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.inner.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::PsbtSigHashType -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::PsbtSigHashType -{ - fn into_into_dart(self) -> crate::api::types::PsbtSigHashType { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::RbfValue { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::RbfValue::RbfDefault => [0.into_dart()].into_dart(), - crate::api::types::RbfValue::Value(field0) => { - [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::RbfValue {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::RbfValue -{ - fn into_into_dart(self) -> crate::api::types::RbfValue { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::RpcConfig { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.url.into_into_dart().into_dart(), - self.auth.into_into_dart().into_dart(), - self.network.into_into_dart().into_dart(), - self.wallet_name.into_into_dart().into_dart(), - self.sync_params.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::RpcConfig -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::RpcConfig -{ - fn into_into_dart(self) -> crate::api::blockchain::RpcConfig { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::RpcSyncParams { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.start_script_count.into_into_dart().into_dart(), - self.start_time.into_into_dart().into_dart(), - self.force_start_time.into_into_dart().into_dart(), - self.poll_rate_sec.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::RpcSyncParams -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::RpcSyncParams -{ - fn into_into_dart(self) -> crate::api::blockchain::RpcSyncParams { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Satisfaction { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::Satisfaction::Partial { - n, - m, - items, - sorted, - conditions, - } => [ - 0.into_dart(), - n.into_into_dart().into_dart(), - m.into_into_dart().into_dart(), - items.into_into_dart().into_dart(), - sorted.into_into_dart().into_dart(), - conditions.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::types::Satisfaction::PartialComplete { - n, - m, - items, - sorted, - conditions, - } => [ - 1.into_dart(), - n.into_into_dart().into_dart(), - m.into_into_dart().into_dart(), - items.into_into_dart().into_dart(), - sorted.into_into_dart().into_dart(), - conditions.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::types::Satisfaction::Complete { condition } => { - [2.into_dart(), condition.into_into_dart().into_dart()].into_dart() - } - crate::api::types::Satisfaction::None { msg } => { - [3.into_dart(), msg.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::Satisfaction -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::Satisfaction -{ - fn into_into_dart(self) -> crate::api::types::Satisfaction { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::SatisfiableItem { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::SatisfiableItem::EcdsaSignature { key } => { - [0.into_dart(), key.into_into_dart().into_dart()].into_dart() - } - crate::api::types::SatisfiableItem::SchnorrSignature { key } => { - [1.into_dart(), key.into_into_dart().into_dart()].into_dart() - } - crate::api::types::SatisfiableItem::Sha256Preimage { hash } => { - [2.into_dart(), hash.into_into_dart().into_dart()].into_dart() - } - crate::api::types::SatisfiableItem::Hash256Preimage { hash } => { - [3.into_dart(), hash.into_into_dart().into_dart()].into_dart() - } - crate::api::types::SatisfiableItem::Ripemd160Preimage { hash } => { - [4.into_dart(), hash.into_into_dart().into_dart()].into_dart() - } - crate::api::types::SatisfiableItem::Hash160Preimage { hash } => { - [5.into_dart(), hash.into_into_dart().into_dart()].into_dart() - } - crate::api::types::SatisfiableItem::AbsoluteTimelock { value } => { - [6.into_dart(), value.into_into_dart().into_dart()].into_dart() - } - crate::api::types::SatisfiableItem::RelativeTimelock { value } => { - [7.into_dart(), value.into_into_dart().into_dart()].into_dart() - } - crate::api::types::SatisfiableItem::Multisig { keys, threshold } => [ - 8.into_dart(), - keys.into_into_dart().into_dart(), - threshold.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::types::SatisfiableItem::Thresh { items, threshold } => [ - 9.into_dart(), - items.into_into_dart().into_dart(), - threshold.into_into_dart().into_dart(), - ] - .into_dart(), - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::SatisfiableItem -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::SatisfiableItem -{ - fn into_into_dart(self) -> crate::api::types::SatisfiableItem { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::ScriptAmount { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.script.into_into_dart().into_dart(), - self.amount.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::ScriptAmount -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::ScriptAmount -{ - fn into_into_dart(self) -> crate::api::types::ScriptAmount { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::SignOptions { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.trust_witness_utxo.into_into_dart().into_dart(), - self.assume_height.into_into_dart().into_dart(), - self.allow_all_sighashes.into_into_dart().into_dart(), - self.remove_partial_sigs.into_into_dart().into_dart(), - self.try_finalize.into_into_dart().into_dart(), - self.sign_with_tap_internal_key.into_into_dart().into_dart(), - self.allow_grinding.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::SignOptions -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::SignOptions -{ - fn into_into_dart(self) -> crate::api::types::SignOptions { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::SledDbConfiguration { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.path.into_into_dart().into_dart(), - self.tree_name.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::SledDbConfiguration -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::SledDbConfiguration -{ - fn into_into_dart(self) -> crate::api::types::SledDbConfiguration { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::SqliteDbConfiguration { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.path.into_into_dart().into_dart()].into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::SqliteDbConfiguration -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::SqliteDbConfiguration -{ - fn into_into_dart(self) -> crate::api::types::SqliteDbConfiguration { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::TransactionDetails { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.transaction.into_into_dart().into_dart(), - self.txid.into_into_dart().into_dart(), - self.received.into_into_dart().into_dart(), - self.sent.into_into_dart().into_dart(), - self.fee.into_into_dart().into_dart(), - self.confirmation_time.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::TransactionDetails -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::TransactionDetails -{ - fn into_into_dart(self) -> crate::api::types::TransactionDetails { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::TxIn { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.previous_output.into_into_dart().into_dart(), - self.script_sig.into_into_dart().into_dart(), - self.sequence.into_into_dart().into_dart(), - self.witness.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::TxIn {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::types::TxIn { - fn into_into_dart(self) -> crate::api::types::TxIn { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::TxOut { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.value.into_into_dart().into_dart(), - self.script_pubkey.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::TxOut {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::types::TxOut { - fn into_into_dart(self) -> crate::api::types::TxOut { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Variant { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - Self::Bech32 => 0.into_dart(), - Self::Bech32m => 1.into_dart(), - _ => unreachable!(), - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Variant {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Variant { - fn into_into_dart(self) -> crate::api::types::Variant { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::WitnessVersion { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - Self::V0 => 0.into_dart(), - Self::V1 => 1.into_dart(), - Self::V2 => 2.into_dart(), - Self::V3 => 3.into_dart(), - Self::V4 => 4.into_dart(), - Self::V5 => 5.into_dart(), - Self::V6 => 6.into_dart(), - Self::V7 => 7.into_dart(), - Self::V8 => 8.into_dart(), - Self::V9 => 9.into_dart(), - Self::V10 => 10.into_dart(), - Self::V11 => 11.into_dart(), - Self::V12 => 12.into_dart(), - Self::V13 => 13.into_dart(), - Self::V14 => 14.into_dart(), - Self::V15 => 15.into_dart(), - Self::V16 => 16.into_dart(), - _ => unreachable!(), - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::WitnessVersion -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::WitnessVersion -{ - fn into_into_dart(self) -> crate::api::types::WitnessVersion { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::WordCount { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - Self::Words12 => 0.into_dart(), - Self::Words18 => 1.into_dart(), - Self::Words24 => 2.into_dart(), - _ => unreachable!(), - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::WordCount {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::WordCount -{ - fn into_into_dart(self) -> crate::api::types::WordCount { - self - } -} - -impl SseEncode for std::collections::HashMap> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - )>>::sse_encode(self.into_iter().collect(), serializer); - } -} - -impl SseEncode for std::collections::HashMap, Vec> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - , Vec)>>::sse_encode( - self.into_iter().collect(), - serializer, - ); - } -} - -impl SseEncode for std::collections::HashMap> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - )>>::sse_encode( - self.into_iter().collect(), - serializer, - ); - } -} - -impl SseEncode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom>> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for RustOpaqueNom> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode for String { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.into_bytes(), serializer); - } -} - -impl SseEncode for crate::api::error::AddressError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::error::AddressError::Base58(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::AddressError::Bech32(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::AddressError::EmptyBech32Payload => { - ::sse_encode(2, serializer); - } - crate::api::error::AddressError::InvalidBech32Variant { expected, found } => { - ::sse_encode(3, serializer); - ::sse_encode(expected, serializer); - ::sse_encode(found, serializer); - } - crate::api::error::AddressError::InvalidWitnessVersion(field0) => { - ::sse_encode(4, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::AddressError::UnparsableWitnessVersion(field0) => { - ::sse_encode(5, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::AddressError::MalformedWitnessVersion => { - ::sse_encode(6, serializer); - } - crate::api::error::AddressError::InvalidWitnessProgramLength(field0) => { - ::sse_encode(7, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::AddressError::InvalidSegwitV0ProgramLength(field0) => { - ::sse_encode(8, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::AddressError::UncompressedPubkey => { - ::sse_encode(9, serializer); - } - crate::api::error::AddressError::ExcessiveScriptSize => { - ::sse_encode(10, serializer); - } - crate::api::error::AddressError::UnrecognizedScript => { - ::sse_encode(11, serializer); - } - crate::api::error::AddressError::UnknownAddressType(field0) => { - ::sse_encode(12, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::AddressError::NetworkValidation { - network_required, - network_found, - address, - } => { - ::sse_encode(13, serializer); - ::sse_encode(network_required, serializer); - ::sse_encode(network_found, serializer); - ::sse_encode(address, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::types::AddressIndex { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::AddressIndex::Increase => { - ::sse_encode(0, serializer); - } - crate::api::types::AddressIndex::LastUnused => { - ::sse_encode(1, serializer); - } - crate::api::types::AddressIndex::Peek { index } => { - ::sse_encode(2, serializer); - ::sse_encode(index, serializer); - } - crate::api::types::AddressIndex::Reset { index } => { - ::sse_encode(3, serializer); - ::sse_encode(index, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::blockchain::Auth { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::blockchain::Auth::None => { - ::sse_encode(0, serializer); - } - crate::api::blockchain::Auth::UserPass { username, password } => { - ::sse_encode(1, serializer); - ::sse_encode(username, serializer); - ::sse_encode(password, serializer); - } - crate::api::blockchain::Auth::Cookie { file } => { - ::sse_encode(2, serializer); - ::sse_encode(file, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::types::Balance { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.immature, serializer); - ::sse_encode(self.trusted_pending, serializer); - ::sse_encode(self.untrusted_pending, serializer); - ::sse_encode(self.confirmed, serializer); - ::sse_encode(self.spendable, serializer); - ::sse_encode(self.total, serializer); - } -} - -impl SseEncode for crate::api::types::BdkAddress { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.ptr, serializer); - } -} - -impl SseEncode for crate::api::blockchain::BdkBlockchain { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.ptr, serializer); - } -} - -impl SseEncode for crate::api::key::BdkDerivationPath { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.ptr, serializer); - } -} - -impl SseEncode for crate::api::descriptor::BdkDescriptor { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode( - self.extended_descriptor, - serializer, - ); - >::sse_encode(self.key_map, serializer); - } -} - -impl SseEncode for crate::api::key::BdkDescriptorPublicKey { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.ptr, serializer); - } -} - -impl SseEncode for crate::api::key::BdkDescriptorSecretKey { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.ptr, serializer); - } -} - -impl SseEncode for crate::api::error::BdkError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::error::BdkError::Hex(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Consensus(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::VerifyTransaction(field0) => { - ::sse_encode(2, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Address(field0) => { - ::sse_encode(3, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Descriptor(field0) => { - ::sse_encode(4, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidU32Bytes(field0) => { - ::sse_encode(5, serializer); - >::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Generic(field0) => { - ::sse_encode(6, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::ScriptDoesntHaveAddressForm => { - ::sse_encode(7, serializer); - } - crate::api::error::BdkError::NoRecipients => { - ::sse_encode(8, serializer); - } - crate::api::error::BdkError::NoUtxosSelected => { - ::sse_encode(9, serializer); - } - crate::api::error::BdkError::OutputBelowDustLimit(field0) => { - ::sse_encode(10, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InsufficientFunds { needed, available } => { - ::sse_encode(11, serializer); - ::sse_encode(needed, serializer); - ::sse_encode(available, serializer); - } - crate::api::error::BdkError::BnBTotalTriesExceeded => { - ::sse_encode(12, serializer); - } - crate::api::error::BdkError::BnBNoExactMatch => { - ::sse_encode(13, serializer); - } - crate::api::error::BdkError::UnknownUtxo => { - ::sse_encode(14, serializer); - } - crate::api::error::BdkError::TransactionNotFound => { - ::sse_encode(15, serializer); - } - crate::api::error::BdkError::TransactionConfirmed => { - ::sse_encode(16, serializer); - } - crate::api::error::BdkError::IrreplaceableTransaction => { - ::sse_encode(17, serializer); - } - crate::api::error::BdkError::FeeRateTooLow { needed } => { - ::sse_encode(18, serializer); - ::sse_encode(needed, serializer); - } - crate::api::error::BdkError::FeeTooLow { needed } => { - ::sse_encode(19, serializer); - ::sse_encode(needed, serializer); - } - crate::api::error::BdkError::FeeRateUnavailable => { - ::sse_encode(20, serializer); - } - crate::api::error::BdkError::MissingKeyOrigin(field0) => { - ::sse_encode(21, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Key(field0) => { - ::sse_encode(22, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::ChecksumMismatch => { - ::sse_encode(23, serializer); - } - crate::api::error::BdkError::SpendingPolicyRequired(field0) => { - ::sse_encode(24, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidPolicyPathError(field0) => { - ::sse_encode(25, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Signer(field0) => { - ::sse_encode(26, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidNetwork { requested, found } => { - ::sse_encode(27, serializer); - ::sse_encode(requested, serializer); - ::sse_encode(found, serializer); - } - crate::api::error::BdkError::InvalidOutpoint(field0) => { - ::sse_encode(28, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Encode(field0) => { - ::sse_encode(29, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Miniscript(field0) => { - ::sse_encode(30, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::MiniscriptPsbt(field0) => { - ::sse_encode(31, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Bip32(field0) => { - ::sse_encode(32, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Bip39(field0) => { - ::sse_encode(33, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Secp256k1(field0) => { - ::sse_encode(34, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Json(field0) => { - ::sse_encode(35, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Psbt(field0) => { - ::sse_encode(36, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::PsbtParse(field0) => { - ::sse_encode(37, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::MissingCachedScripts(field0, field1) => { - ::sse_encode(38, serializer); - ::sse_encode(field0, serializer); - ::sse_encode(field1, serializer); - } - crate::api::error::BdkError::Electrum(field0) => { - ::sse_encode(39, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Esplora(field0) => { - ::sse_encode(40, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Sled(field0) => { - ::sse_encode(41, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Rpc(field0) => { - ::sse_encode(42, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Rusqlite(field0) => { - ::sse_encode(43, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidInput(field0) => { - ::sse_encode(44, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidLockTime(field0) => { - ::sse_encode(45, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidTransaction(field0) => { - ::sse_encode(46, serializer); - ::sse_encode(field0, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::key::BdkMnemonic { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.ptr, serializer); - } -} - -impl SseEncode for crate::api::types::BdkPolicy { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.ptr, serializer); - } -} - -impl SseEncode for crate::api::psbt::BdkPsbt { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >>::sse_encode(self.ptr, serializer); - } -} - -impl SseEncode for crate::api::types::BdkScriptBuf { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.bytes, serializer); - } -} - -impl SseEncode for crate::api::types::BdkTransaction { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.s, serializer); - } -} - -impl SseEncode for crate::api::wallet::BdkWallet { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >>>::sse_encode( - self.ptr, serializer, - ); - } -} - -impl SseEncode for crate::api::types::BlockTime { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.height, serializer); - ::sse_encode(self.timestamp, serializer); - } -} - -impl SseEncode for crate::api::blockchain::BlockchainConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::blockchain::BlockchainConfig::Electrum { config } => { - ::sse_encode(0, serializer); - ::sse_encode(config, serializer); - } - crate::api::blockchain::BlockchainConfig::Esplora { config } => { - ::sse_encode(1, serializer); - ::sse_encode(config, serializer); - } - crate::api::blockchain::BlockchainConfig::Rpc { config } => { - ::sse_encode(2, serializer); - ::sse_encode(config, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for bool { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - serializer.cursor.write_u8(self as _).unwrap(); - } -} - -impl SseEncode for crate::api::types::ChangeSpendPolicy { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode( - match self { - crate::api::types::ChangeSpendPolicy::ChangeAllowed => 0, - crate::api::types::ChangeSpendPolicy::OnlyChange => 1, - crate::api::types::ChangeSpendPolicy::ChangeForbidden => 2, - _ => { - unimplemented!(""); - } - }, - serializer, - ); - } -} - -impl SseEncode for crate::api::types::Condition { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.csv, serializer); - >::sse_encode(self.timelock, serializer); - } -} - -impl SseEncode for crate::api::error::ConsensusError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::error::ConsensusError::Io(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::ConsensusError::OversizedVectorAllocation { requested, max } => { - ::sse_encode(1, serializer); - ::sse_encode(requested, serializer); - ::sse_encode(max, serializer); - } - crate::api::error::ConsensusError::InvalidChecksum { expected, actual } => { - ::sse_encode(2, serializer); - <[u8; 4]>::sse_encode(expected, serializer); - <[u8; 4]>::sse_encode(actual, serializer); - } - crate::api::error::ConsensusError::NonMinimalVarInt => { - ::sse_encode(3, serializer); - } - crate::api::error::ConsensusError::ParseFailed(field0) => { - ::sse_encode(4, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::ConsensusError::UnsupportedSegwitFlag(field0) => { - ::sse_encode(5, serializer); - ::sse_encode(field0, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::types::DatabaseConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::DatabaseConfig::Memory => { - ::sse_encode(0, serializer); - } - crate::api::types::DatabaseConfig::Sqlite { config } => { - ::sse_encode(1, serializer); - ::sse_encode(config, serializer); - } - crate::api::types::DatabaseConfig::Sled { config } => { - ::sse_encode(2, serializer); - ::sse_encode(config, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::error::DescriptorError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::error::DescriptorError::InvalidHdKeyPath => { - ::sse_encode(0, serializer); - } - crate::api::error::DescriptorError::InvalidDescriptorChecksum => { - ::sse_encode(1, serializer); - } - crate::api::error::DescriptorError::HardenedDerivationXpub => { - ::sse_encode(2, serializer); - } - crate::api::error::DescriptorError::MultiPath => { - ::sse_encode(3, serializer); - } - crate::api::error::DescriptorError::Key(field0) => { - ::sse_encode(4, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Policy(field0) => { - ::sse_encode(5, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::InvalidDescriptorCharacter(field0) => { - ::sse_encode(6, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Bip32(field0) => { - ::sse_encode(7, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Base58(field0) => { - ::sse_encode(8, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Pk(field0) => { - ::sse_encode(9, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Miniscript(field0) => { - ::sse_encode(10, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Hex(field0) => { - ::sse_encode(11, serializer); - ::sse_encode(field0, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::blockchain::ElectrumConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.url, serializer); - >::sse_encode(self.socks5, serializer); - ::sse_encode(self.retry, serializer); - >::sse_encode(self.timeout, serializer); - ::sse_encode(self.stop_gap, serializer); - ::sse_encode(self.validate_domain, serializer); - } -} - -impl SseEncode for crate::api::blockchain::EsploraConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.base_url, serializer); - >::sse_encode(self.proxy, serializer); - >::sse_encode(self.concurrency, serializer); - ::sse_encode(self.stop_gap, serializer); - >::sse_encode(self.timeout, serializer); - } -} - -impl SseEncode for f32 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - serializer.cursor.write_f32::(self).unwrap(); - } -} - -impl SseEncode for crate::api::types::FeeRate { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.sat_per_vb, serializer); - } -} - -impl SseEncode for crate::api::error::HexError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::error::HexError::InvalidChar(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::HexError::OddLengthString(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::HexError::InvalidLength(field0, field1) => { - ::sse_encode(2, serializer); - ::sse_encode(field0, serializer); - ::sse_encode(field1, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for i32 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - serializer.cursor.write_i32::(self).unwrap(); - } -} - -impl SseEncode for crate::api::types::Input { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.s, serializer); - } -} - -impl SseEncode for crate::api::types::KeychainKind { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode( - match self { - crate::api::types::KeychainKind::ExternalChain => 0, - crate::api::types::KeychainKind::InternalChain => 1, - _ => { - unimplemented!(""); - } - }, - serializer, - ); - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - >::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec<(Vec, Vec)> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - <(Vec, Vec)>::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec<(String, Vec)> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - <(String, Vec)>::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec<(u32, Vec)> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - <(u32, Vec)>::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for Vec { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.len() as _, serializer); - for item in self { - ::sse_encode(item, serializer); - } - } -} - -impl SseEncode for crate::api::types::LocalUtxo { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.outpoint, serializer); - ::sse_encode(self.txout, serializer); - ::sse_encode(self.keychain, serializer); - ::sse_encode(self.is_spent, serializer); - } -} - -impl SseEncode for crate::api::types::LockTime { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::LockTime::Blocks(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); - } - crate::api::types::LockTime::Seconds(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::types::Network { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode( - match self { - crate::api::types::Network::Testnet => 0, - crate::api::types::Network::Regtest => 1, - crate::api::types::Network::Bitcoin => 2, - crate::api::types::Network::Signet => 3, - _ => { - unimplemented!(""); - } - }, - serializer, - ); - } -} - -impl SseEncode for Option>> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - >>::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option<(crate::api::types::OutPoint, crate::api::types::Input, usize)> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - <(crate::api::types::OutPoint, crate::api::types::Input, usize)>::sse_encode( - value, serializer, - ); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for Option { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - ::sse_encode(value, serializer); - } - } -} - -impl SseEncode for crate::api::types::OutPoint { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.txid, serializer); - ::sse_encode(self.vout, serializer); - } -} - -impl SseEncode for crate::api::types::Payload { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::Payload::PubkeyHash { pubkey_hash } => { - ::sse_encode(0, serializer); - ::sse_encode(pubkey_hash, serializer); - } - crate::api::types::Payload::ScriptHash { script_hash } => { - ::sse_encode(1, serializer); - ::sse_encode(script_hash, serializer); - } - crate::api::types::Payload::WitnessProgram { version, program } => { - ::sse_encode(2, serializer); - ::sse_encode(version, serializer); - >::sse_encode(program, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::types::PkOrF { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::PkOrF::Pubkey { value } => { - ::sse_encode(0, serializer); - ::sse_encode(value, serializer); - } - crate::api::types::PkOrF::XOnlyPubkey { value } => { - ::sse_encode(1, serializer); - ::sse_encode(value, serializer); - } - crate::api::types::PkOrF::Fingerprint { value } => { - ::sse_encode(2, serializer); - ::sse_encode(value, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::types::PsbtSigHashType { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.inner, serializer); - } -} - -impl SseEncode for crate::api::types::RbfValue { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::RbfValue::RbfDefault => { - ::sse_encode(0, serializer); - } - crate::api::types::RbfValue::Value(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for (crate::api::types::BdkAddress, u32) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.0, serializer); - ::sse_encode(self.1, serializer); - } -} - -impl SseEncode - for ( - crate::api::psbt::BdkPsbt, - crate::api::types::TransactionDetails, - ) -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.0, serializer); - ::sse_encode(self.1, serializer); - } -} - -impl SseEncode for (Vec, Vec) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.0, serializer); - >::sse_encode(self.1, serializer); - } -} - -impl SseEncode for (crate::api::types::OutPoint, crate::api::types::Input, usize) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.0, serializer); - ::sse_encode(self.1, serializer); - ::sse_encode(self.2, serializer); - } -} - -impl SseEncode for (String, Vec) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.0, serializer); - >::sse_encode(self.1, serializer); - } -} - -impl SseEncode for (u32, Vec) { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.0, serializer); - >::sse_encode(self.1, serializer); - } -} - -impl SseEncode for crate::api::blockchain::RpcConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.url, serializer); - ::sse_encode(self.auth, serializer); - ::sse_encode(self.network, serializer); - ::sse_encode(self.wallet_name, serializer); - >::sse_encode(self.sync_params, serializer); - } -} - -impl SseEncode for crate::api::blockchain::RpcSyncParams { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.start_script_count, serializer); - ::sse_encode(self.start_time, serializer); - ::sse_encode(self.force_start_time, serializer); - ::sse_encode(self.poll_rate_sec, serializer); - } -} - -impl SseEncode for crate::api::types::Satisfaction { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::Satisfaction::Partial { - n, - m, - items, - sorted, - conditions, - } => { - ::sse_encode(0, serializer); - ::sse_encode(n, serializer); - ::sse_encode(m, serializer); - >::sse_encode(items, serializer); - >::sse_encode(sorted, serializer); - >>::sse_encode( - conditions, serializer, - ); - } - crate::api::types::Satisfaction::PartialComplete { - n, - m, - items, - sorted, - conditions, - } => { - ::sse_encode(1, serializer); - ::sse_encode(n, serializer); - ::sse_encode(m, serializer); - >::sse_encode(items, serializer); - >::sse_encode(sorted, serializer); - , Vec>>::sse_encode(conditions, serializer); - } - crate::api::types::Satisfaction::Complete { condition } => { - ::sse_encode(2, serializer); - ::sse_encode(condition, serializer); - } - crate::api::types::Satisfaction::None { msg } => { - ::sse_encode(3, serializer); - ::sse_encode(msg, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::types::SatisfiableItem { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::SatisfiableItem::EcdsaSignature { key } => { - ::sse_encode(0, serializer); - ::sse_encode(key, serializer); - } - crate::api::types::SatisfiableItem::SchnorrSignature { key } => { - ::sse_encode(1, serializer); - ::sse_encode(key, serializer); - } - crate::api::types::SatisfiableItem::Sha256Preimage { hash } => { - ::sse_encode(2, serializer); - ::sse_encode(hash, serializer); - } - crate::api::types::SatisfiableItem::Hash256Preimage { hash } => { - ::sse_encode(3, serializer); - ::sse_encode(hash, serializer); - } - crate::api::types::SatisfiableItem::Ripemd160Preimage { hash } => { - ::sse_encode(4, serializer); - ::sse_encode(hash, serializer); - } - crate::api::types::SatisfiableItem::Hash160Preimage { hash } => { - ::sse_encode(5, serializer); - ::sse_encode(hash, serializer); - } - crate::api::types::SatisfiableItem::AbsoluteTimelock { value } => { - ::sse_encode(6, serializer); - ::sse_encode(value, serializer); - } - crate::api::types::SatisfiableItem::RelativeTimelock { value } => { - ::sse_encode(7, serializer); - ::sse_encode(value, serializer); - } - crate::api::types::SatisfiableItem::Multisig { keys, threshold } => { - ::sse_encode(8, serializer); - >::sse_encode(keys, serializer); - ::sse_encode(threshold, serializer); - } - crate::api::types::SatisfiableItem::Thresh { items, threshold } => { - ::sse_encode(9, serializer); - >::sse_encode(items, serializer); - ::sse_encode(threshold, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::api::types::ScriptAmount { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.script, serializer); - ::sse_encode(self.amount, serializer); - } -} - -impl SseEncode for crate::api::types::SignOptions { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.trust_witness_utxo, serializer); - >::sse_encode(self.assume_height, serializer); - ::sse_encode(self.allow_all_sighashes, serializer); - ::sse_encode(self.remove_partial_sigs, serializer); - ::sse_encode(self.try_finalize, serializer); - ::sse_encode(self.sign_with_tap_internal_key, serializer); - ::sse_encode(self.allow_grinding, serializer); - } -} - -impl SseEncode for crate::api::types::SledDbConfiguration { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.path, serializer); - ::sse_encode(self.tree_name, serializer); - } -} - -impl SseEncode for crate::api::types::SqliteDbConfiguration { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.path, serializer); - } -} - -impl SseEncode for crate::api::types::TransactionDetails { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.transaction, serializer); - ::sse_encode(self.txid, serializer); - ::sse_encode(self.received, serializer); - ::sse_encode(self.sent, serializer); - >::sse_encode(self.fee, serializer); - >::sse_encode(self.confirmation_time, serializer); - } -} - -impl SseEncode for crate::api::types::TxIn { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.previous_output, serializer); - ::sse_encode(self.script_sig, serializer); - ::sse_encode(self.sequence, serializer); - >>::sse_encode(self.witness, serializer); - } -} - -impl SseEncode for crate::api::types::TxOut { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.value, serializer); - ::sse_encode(self.script_pubkey, serializer); - } -} - -impl SseEncode for u32 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - serializer.cursor.write_u32::(self).unwrap(); - } -} - -impl SseEncode for u64 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - serializer.cursor.write_u64::(self).unwrap(); - } -} - -impl SseEncode for u8 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - serializer.cursor.write_u8(self).unwrap(); - } -} - -impl SseEncode for [u8; 4] { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode( - { - let boxed: Box<[_]> = Box::new(self); - boxed.into_vec() - }, - serializer, - ); - } -} - -impl SseEncode for () { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {} -} - -impl SseEncode for usize { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - serializer - .cursor - .write_u64::(self as _) - .unwrap(); - } -} - -impl SseEncode for crate::api::types::Variant { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode( - match self { - crate::api::types::Variant::Bech32 => 0, - crate::api::types::Variant::Bech32m => 1, - _ => { - unimplemented!(""); - } - }, - serializer, - ); - } -} - -impl SseEncode for crate::api::types::WitnessVersion { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode( - match self { - crate::api::types::WitnessVersion::V0 => 0, - crate::api::types::WitnessVersion::V1 => 1, - crate::api::types::WitnessVersion::V2 => 2, - crate::api::types::WitnessVersion::V3 => 3, - crate::api::types::WitnessVersion::V4 => 4, - crate::api::types::WitnessVersion::V5 => 5, - crate::api::types::WitnessVersion::V6 => 6, - crate::api::types::WitnessVersion::V7 => 7, - crate::api::types::WitnessVersion::V8 => 8, - crate::api::types::WitnessVersion::V9 => 9, - crate::api::types::WitnessVersion::V10 => 10, - crate::api::types::WitnessVersion::V11 => 11, - crate::api::types::WitnessVersion::V12 => 12, - crate::api::types::WitnessVersion::V13 => 13, - crate::api::types::WitnessVersion::V14 => 14, - crate::api::types::WitnessVersion::V15 => 15, - crate::api::types::WitnessVersion::V16 => 16, - _ => { - unimplemented!(""); - } - }, - serializer, - ); - } -} - -impl SseEncode for crate::api::types::WordCount { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode( - match self { - crate::api::types::WordCount::Words12 => 0, - crate::api::types::WordCount::Words18 => 1, - crate::api::types::WordCount::Words24 => 2, - _ => { - unimplemented!(""); - } - }, - serializer, - ); - } -} - -#[cfg(not(target_family = "wasm"))] -#[path = "frb_generated.io.rs"] -mod io; -#[cfg(not(target_family = "wasm"))] -pub use io::*; diff --git a/rust/src/lib.rs b/rust/src/lib.rs deleted file mode 100644 index a9eca924..00000000 --- a/rust/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -mod frb_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ -/* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ -extern crate core; - -pub mod api; diff --git a/test/bdk_flutter_test.dart b/test/bdk_flutter_test.dart deleted file mode 100644 index 029bc3be..00000000 --- a/test/bdk_flutter_test.dart +++ /dev/null @@ -1,345 +0,0 @@ -import 'dart:convert'; - -import 'package:bdk_flutter/bdk_flutter.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; -import 'package:mockito/mockito.dart'; - -import 'bdk_flutter_test.mocks.dart'; - -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec
()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -@GenerateNiceMocks([MockSpec()]) -void main() { - final mockWallet = MockWallet(); - final mockBlockchain = MockBlockchain(); - final mockDerivationPath = MockDerivationPath(); - final mockAddress = MockAddress(); - final mockScript = MockScriptBuf(); - group('Blockchain', () { - test('verify getHeight', () async { - when(mockBlockchain.getHeight()).thenAnswer((_) async => 2396450); - final res = await mockBlockchain.getHeight(); - expect(res, 2396450); - }); - test('verify getHash', () async { - when(mockBlockchain.getBlockHash(height: any)).thenAnswer((_) async => - "0000000000004c01f2723acaa5e87467ebd2768cc5eadcf1ea0d0c4f1731efce"); - final res = await mockBlockchain.getBlockHash(height: 2396450); - expect(res, - "0000000000004c01f2723acaa5e87467ebd2768cc5eadcf1ea0d0c4f1731efce"); - }); - }); - group('FeeRate', () { - test('Should return a double when called', () async { - when(mockBlockchain.getHeight()).thenAnswer((_) async => 2396450); - final res = await mockBlockchain.getHeight(); - expect(res, 2396450); - }); - test('verify getHash', () async { - when(mockBlockchain.getBlockHash(height: any)).thenAnswer((_) async => - "0000000000004c01f2723acaa5e87467ebd2768cc5eadcf1ea0d0c4f1731efce"); - final res = await mockBlockchain.getBlockHash(height: 2396450); - expect(res, - "0000000000004c01f2723acaa5e87467ebd2768cc5eadcf1ea0d0c4f1731efce"); - }); - }); - group('Wallet', () { - test('Should return valid AddressInfo Object', () async { - final res = mockWallet.getAddress(addressIndex: AddressIndex.increase()); - expect(res, isA()); - }); - - test('Should return valid Balance object', () async { - final res = mockWallet.getBalance(); - expect(res, isA()); - }); - test('Should return Network enum', () async { - final res = mockWallet.network(); - expect(res, isA()); - }); - test('Should return list of LocalUtxo object', () async { - final res = mockWallet.listUnspent(); - expect(res, isA>()); - }); - test('Should return a Input object', () async { - final res = await mockWallet.getPsbtInput( - utxo: MockLocalUtxo(), onlyWitnessUtxo: true); - expect(res, isA()); - }); - test('Should return a Descriptor object', () async { - final res = await mockWallet.getDescriptorForKeychain( - keychain: KeychainKind.externalChain); - expect(res, isA()); - }); - test('Should return an empty list of TransactionDetails', () async { - when(mockWallet.listTransactions(includeRaw: any)) - .thenAnswer((e) => List.empty()); - final res = mockWallet.listTransactions(includeRaw: true); - expect(res, isA>()); - expect(res, List.empty()); - }); - test('verify function call order', () async { - await mockWallet.sync(blockchain: mockBlockchain); - mockWallet.listTransactions(includeRaw: true); - verifyInOrder([ - await mockWallet.sync(blockchain: mockBlockchain), - mockWallet.listTransactions(includeRaw: true) - ]); - }); - }); - group('DescriptorSecret', () { - final mockSDescriptorSecret = MockDescriptorSecretKey(); - - test('verify asPublic()', () async { - final res = mockSDescriptorSecret.toPublic(); - expect(res, isA()); - }); - test('verify asString', () async { - final res = mockSDescriptorSecret.asString(); - expect(res, isA()); - }); - }); - group('DescriptorPublic', () { - final mockSDescriptorPublic = MockDescriptorPublicKey(); - test('verify derive()', () async { - final res = await mockSDescriptorPublic.derive(path: mockDerivationPath); - expect(res, isA()); - }); - test('verify extend()', () async { - final res = await mockSDescriptorPublic.extend(path: mockDerivationPath); - expect(res, isA()); - }); - test('verify asString', () async { - final res = mockSDescriptorPublic.asString(); - expect(res, isA()); - }); - }); - group('Tx Builder', () { - final mockTxBuilder = MockTxBuilder(); - test('Should return a TxBuilderException when funds are insufficient', - () async { - try { - when(mockTxBuilder.finish(mockWallet)) - .thenThrow(InsufficientFundsException()); - await mockTxBuilder.finish(mockWallet); - } catch (error) { - expect(error, isA()); - } - }); - test('Should return a TxBuilderException when no recipients are added', - () async { - try { - when(mockTxBuilder.finish(mockWallet)) - .thenThrow(NoRecipientsException()); - await mockTxBuilder.finish(mockWallet); - } catch (error) { - expect(error, isA()); - } - }); - test('Verify addData() Exception', () async { - try { - when(mockTxBuilder.addData(data: List.empty())) - .thenThrow(InvalidByteException(message: "List must not be empty")); - mockTxBuilder.addData(data: []); - } catch (error) { - expect(error, isA()); - } - }); - test('Verify unSpendable()', () async { - final res = mockTxBuilder.addUnSpendable(OutPoint( - txid: - "efc5d0e6ad6611f22b05d3c1fc8888c3552e8929a4231f2944447e4426f52056", - vout: 1)); - expect(res, isNot(mockTxBuilder)); - }); - test('Verify addForeignUtxo()', () async { - const inputInternal = { - "non_witness_utxo": { - "version": 1, - "lock_time": 2433744, - "input": [ - { - "previous_output": - "8eca3ac01866105f79a1a6b87ec968565bb5ccc9cb1c5cf5b13491bafca24f0d:1", - "script_sig": - "483045022100f1bb7ab927473c78111b11cb3f134bc6d1782b4d9b9b664924682b83dc67763b02203bcdc8c9291d17098d11af7ed8a9aa54e795423f60c042546da059b9d912f3c001210238149dc7894a6790ba82c2584e09e5ed0e896dea4afb2de089ea02d017ff0682", - "sequence": 4294967294, - "witness": [] - } - ], - "output": [ - { - "value": 3356, - "script_pubkey": - "76a91400df17234b8e0f60afe1c8f9ae2e91c23cd07c3088ac" - }, - { - "value": 1500, - "script_pubkey": - "76a9149f9a7abd600c0caa03983a77c8c3df8e062cb2fa88ac" - } - ] - }, - "witness_utxo": null, - "partial_sigs": {}, - "sighash_type": null, - "redeem_script": null, - "witness_script": null, - "bip32_derivation": [ - [ - "030da577f40a6de2e0a55d3c5c72da44c77e6f820f09e1b7bbcc6a557bf392b5a4", - ["d91e6add", "m/44'/1'/0'/0/146"] - ] - ], - "final_script_sig": null, - "final_script_witness": null, - "ripemd160_preimages": {}, - "sha256_preimages": {}, - "hash160_preimages": {}, - "hash256_preimages": {}, - "tap_key_sig": null, - "tap_script_sigs": [], - "tap_scripts": [], - "tap_key_origins": [], - "tap_internal_key": null, - "tap_merkle_root": null, - "proprietary": [], - "unknown": [] - }; - final input = Input(s: json.encode(inputInternal)); - final outPoint = OutPoint( - txid: - 'b3b72ce9c7aa09b9c868c214e88c002a28aac9a62fd3971eff6de83c418f4db3', - vout: 0); - when(mockAddress.scriptPubkey()).thenAnswer((_) => mockScript); - when(mockTxBuilder.addRecipient(mockScript, any)) - .thenReturn(mockTxBuilder); - when(mockTxBuilder.addForeignUtxo(input, outPoint, BigInt.zero)) - .thenReturn(mockTxBuilder); - when(mockTxBuilder.finish(mockWallet)).thenAnswer((_) async => - Future.value( - (MockPartiallySignedTransaction(), MockTransactionDetails()))); - final script = mockAddress.scriptPubkey(); - final txBuilder = mockTxBuilder - .addRecipient(script, BigInt.from(1200)) - .addForeignUtxo(input, outPoint, BigInt.zero); - final res = await txBuilder.finish(mockWallet); - expect(res, isA<(PartiallySignedTransaction, TransactionDetails)>()); - }); - test('Create a proper psbt transaction ', () async { - const psbtBase64 = "cHNidP8BAHEBAAAAAfU6uDG8hNUox2Qw1nodiir" - "QhnLkDCYpTYfnY4+lUgjFAAAAAAD+////Ag5EAAAAAAAAFgAUxYD3fd+pId3hWxeuvuWmiUlS+1PoAwAAAAAAABYAFP+dpWfmLzDqhlT6HV+9R774474TxqQkAAABAN4" - "BAAAAAAEBViD1JkR+REQpHyOkKYkuVcOIiPzB0wUr8hFmrebQxe8AAAAAAP7///8ClEgAAAAAAAAWABTwV07KrKa1zWpwKzW+ve93pbQ4R+gDAAAAAAAAFgAU/52lZ+YvMOqGVPodX71Hv" - "vjjvhMCRzBEAiAa6a72jEfDuiyaNtlBYAxsc2oSruDWF2vuNQ3rJSshggIgLtJ/YuB8FmhjrPvTC9r2w9gpdfUNLuxw/C7oqo95cEIBIQM9XzutA2SgZFHjPDAATuWwHg19TTkb/NKZD/" - "hfN7fWP8akJAABAR+USAAAAAAAABYAFPBXTsqsprXNanArNb6973eltDhHIgYCHrxaLpnD4ed01bFHcixnAicv15oKiiVHrcVmxUWBW54Y2R5q3VQAAIABAACAAAAAgAEAAABbAAAAACICAqS" - "F0mhBBlgMe9OyICKlkhGHZfPjA0Q03I559ccj9x6oGNkeat1UAACAAQAAgAAAAIABAAAAXAAAAAAA"; - final psbt = await PartiallySignedTransaction.fromString(psbtBase64); - when(mockAddress.scriptPubkey()).thenAnswer((_) => MockScriptBuf()); - when(mockTxBuilder.addRecipient(mockScript, any)) - .thenReturn(mockTxBuilder); - - when(mockAddress.scriptPubkey()).thenAnswer((_) => mockScript); - when(mockTxBuilder.finish(mockWallet)).thenAnswer( - (_) async => Future.value((psbt, MockTransactionDetails()))); - final script = mockAddress.scriptPubkey(); - final txBuilder = mockTxBuilder.addRecipient(script, BigInt.from(1200)); - final res = await txBuilder.finish(mockWallet); - expect(res.$1, psbt); - }); - }); - group('Bump Fee Tx Builder', () { - final mockBumpFeeTxBuilder = MockBumpFeeTxBuilder(); - test('Should return a TxBuilderException when txid is invalid', () async { - try { - when(mockBumpFeeTxBuilder.finish(mockWallet)) - .thenThrow(TransactionNotFoundException()); - await mockBumpFeeTxBuilder.finish(mockWallet); - } catch (error) { - expect(error, isA()); - } - }); - }); - group('Address', () { - test('verify network()', () { - final res = mockAddress.network(); - expect(res, isA()); - }); - test('verify payload()', () { - final res = mockAddress.network(); - expect(res, isA()); - }); - test('verify scriptPubKey()', () { - final res = mockAddress.scriptPubkey(); - expect(res, isA()); - }); - }); - group('Script', () { - test('verify create', () { - final res = mockScript; - expect(res, isA()); - }); - }); - group('Transaction', () { - final mockTx = MockTransaction(); - test('verify serialize', () async { - final res = await mockTx.serialize(); - expect(res, isA>()); - }); - test('verify txid', () async { - final res = await mockTx.txid(); - expect(res, isA()); - }); - test('verify weight', () async { - final res = await mockTx.weight(); - expect(res, isA()); - }); - test('verify size', () async { - final res = await mockTx.size(); - expect(res, isA()); - }); - test('verify vsize', () async { - final res = await mockTx.vsize(); - expect(res, isA()); - }); - test('verify isCoinbase', () async { - final res = await mockTx.isCoinBase(); - expect(res, isA()); - }); - test('verify isExplicitlyRbf', () async { - final res = await mockTx.isExplicitlyRbf(); - expect(res, isA()); - }); - test('verify isLockTimeEnabled', () async { - final res = await mockTx.isLockTimeEnabled(); - expect(res, isA()); - }); - test('verify version', () async { - final res = await mockTx.version(); - expect(res, isA()); - }); - test('verify lockTime', () async { - final res = await mockTx.lockTime(); - expect(res, isA()); - }); - test('verify input', () async { - final res = await mockTx.input(); - expect(res, isA>()); - }); - test('verify output', () async { - final res = await mockTx.output(); - expect(res, isA>()); - }); - }); -} diff --git a/test/bdk_flutter_test.mocks.dart b/test/bdk_flutter_test.mocks.dart deleted file mode 100644 index 86e43303..00000000 --- a/test/bdk_flutter_test.mocks.dart +++ /dev/null @@ -1,2243 +0,0 @@ -// Mocks generated by Mockito 5.4.4 from annotations -// in bdk_flutter/test/bdk_flutter_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; -import 'dart:typed_data' as _i7; - -import 'package:bdk_flutter/src/generated/api/types.dart' as _i4; -import 'package:bdk_flutter/src/generated/lib.dart' as _i2; -import 'package:bdk_flutter/src/root.dart' as _i3; -import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i6; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class - -class _FakeMutexWalletAnyDatabase_0 extends _i1.SmartFake - implements _i2.MutexWalletAnyDatabase { - _FakeMutexWalletAnyDatabase_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAddressInfo_1 extends _i1.SmartFake implements _i3.AddressInfo { - _FakeAddressInfo_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { - _FakeBalance_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDescriptor_3 extends _i1.SmartFake implements _i3.Descriptor { - _FakeDescriptor_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeInput_4 extends _i1.SmartFake implements _i4.Input { - _FakeInput_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAnyBlockchain_5 extends _i1.SmartFake implements _i2.AnyBlockchain { - _FakeAnyBlockchain_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeFeeRate_6 extends _i1.SmartFake implements _i4.FeeRate { - _FakeFeeRate_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDescriptorSecretKey_7 extends _i1.SmartFake - implements _i2.DescriptorSecretKey { - _FakeDescriptorSecretKey_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDescriptorSecretKey_8 extends _i1.SmartFake - implements _i3.DescriptorSecretKey { - _FakeDescriptorSecretKey_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDescriptorPublicKey_9 extends _i1.SmartFake - implements _i3.DescriptorPublicKey { - _FakeDescriptorPublicKey_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDescriptorPublicKey_10 extends _i1.SmartFake - implements _i2.DescriptorPublicKey { - _FakeDescriptorPublicKey_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeMutexPartiallySignedTransaction_11 extends _i1.SmartFake - implements _i2.MutexPartiallySignedTransaction { - _FakeMutexPartiallySignedTransaction_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeTransaction_12 extends _i1.SmartFake implements _i3.Transaction { - _FakeTransaction_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakePartiallySignedTransaction_13 extends _i1.SmartFake - implements _i3.PartiallySignedTransaction { - _FakePartiallySignedTransaction_13( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeTxBuilder_14 extends _i1.SmartFake implements _i3.TxBuilder { - _FakeTxBuilder_14( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeTransactionDetails_15 extends _i1.SmartFake - implements _i3.TransactionDetails { - _FakeTransactionDetails_15( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeBumpFeeTxBuilder_16 extends _i1.SmartFake - implements _i3.BumpFeeTxBuilder { - _FakeBumpFeeTxBuilder_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAddress_17 extends _i1.SmartFake implements _i2.Address { - _FakeAddress_17( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeScriptBuf_18 extends _i1.SmartFake implements _i3.ScriptBuf { - _FakeScriptBuf_18( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDerivationPath_19 extends _i1.SmartFake - implements _i2.DerivationPath { - _FakeDerivationPath_19( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeOutPoint_20 extends _i1.SmartFake implements _i4.OutPoint { - _FakeOutPoint_20( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeTxOut_21 extends _i1.SmartFake implements _i4.TxOut { - _FakeTxOut_21( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [Wallet]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockWallet extends _i1.Mock implements _i3.Wallet { - @override - _i2.MutexWalletAnyDatabase get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeMutexWalletAnyDatabase_0( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeMutexWalletAnyDatabase_0( - this, - Invocation.getter(#ptr), - ), - ) as _i2.MutexWalletAnyDatabase); - - @override - _i3.AddressInfo getAddress({ - required _i4.AddressIndex? addressIndex, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #getAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - returnValue: _FakeAddressInfo_1( - this, - Invocation.method( - #getAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - ), - returnValueForMissingStub: _FakeAddressInfo_1( - this, - Invocation.method( - #getAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - ), - ) as _i3.AddressInfo); - - @override - _i4.Balance getBalance({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #getBalance, - [], - {#hint: hint}, - ), - returnValue: _FakeBalance_2( - this, - Invocation.method( - #getBalance, - [], - {#hint: hint}, - ), - ), - returnValueForMissingStub: _FakeBalance_2( - this, - Invocation.method( - #getBalance, - [], - {#hint: hint}, - ), - ), - ) as _i4.Balance); - - @override - _i5.Future<_i3.Descriptor> getDescriptorForKeychain({ - required _i4.KeychainKind? keychain, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #getDescriptorForKeychain, - [], - { - #keychain: keychain, - #hint: hint, - }, - ), - returnValue: _i5.Future<_i3.Descriptor>.value(_FakeDescriptor_3( - this, - Invocation.method( - #getDescriptorForKeychain, - [], - { - #keychain: keychain, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: - _i5.Future<_i3.Descriptor>.value(_FakeDescriptor_3( - this, - Invocation.method( - #getDescriptorForKeychain, - [], - { - #keychain: keychain, - #hint: hint, - }, - ), - )), - ) as _i5.Future<_i3.Descriptor>); - - @override - _i3.AddressInfo getInternalAddress({ - required _i4.AddressIndex? addressIndex, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #getInternalAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - returnValue: _FakeAddressInfo_1( - this, - Invocation.method( - #getInternalAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - ), - returnValueForMissingStub: _FakeAddressInfo_1( - this, - Invocation.method( - #getInternalAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - ), - ) as _i3.AddressInfo); - - @override - _i5.Future<_i4.Input> getPsbtInput({ - required _i4.LocalUtxo? utxo, - required bool? onlyWitnessUtxo, - _i4.PsbtSigHashType? sighashType, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #getPsbtInput, - [], - { - #utxo: utxo, - #onlyWitnessUtxo: onlyWitnessUtxo, - #sighashType: sighashType, - #hint: hint, - }, - ), - returnValue: _i5.Future<_i4.Input>.value(_FakeInput_4( - this, - Invocation.method( - #getPsbtInput, - [], - { - #utxo: utxo, - #onlyWitnessUtxo: onlyWitnessUtxo, - #sighashType: sighashType, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: _i5.Future<_i4.Input>.value(_FakeInput_4( - this, - Invocation.method( - #getPsbtInput, - [], - { - #utxo: utxo, - #onlyWitnessUtxo: onlyWitnessUtxo, - #sighashType: sighashType, - #hint: hint, - }, - ), - )), - ) as _i5.Future<_i4.Input>); - - @override - bool isMine({required _i3.ScriptBuf? script}) => (super.noSuchMethod( - Invocation.method( - #isMine, - [], - {#script: script}, - ), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - List<_i3.TransactionDetails> listTransactions({ - required bool? includeRaw, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #listTransactions, - [], - { - #includeRaw: includeRaw, - #hint: hint, - }, - ), - returnValue: <_i3.TransactionDetails>[], - returnValueForMissingStub: <_i3.TransactionDetails>[], - ) as List<_i3.TransactionDetails>); - - @override - List<_i4.LocalUtxo> listUnspent({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #listUnspent, - [], - {#hint: hint}, - ), - returnValue: <_i4.LocalUtxo>[], - returnValueForMissingStub: <_i4.LocalUtxo>[], - ) as List<_i4.LocalUtxo>); - - @override - _i4.Network network({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #network, - [], - {#hint: hint}, - ), - returnValue: _i4.Network.testnet, - returnValueForMissingStub: _i4.Network.testnet, - ) as _i4.Network); - - @override - _i5.Future sign({ - required _i3.PartiallySignedTransaction? psbt, - _i4.SignOptions? signOptions, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #sign, - [], - { - #psbt: psbt, - #signOptions: signOptions, - #hint: hint, - }, - ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future sync({ - required _i3.Blockchain? blockchain, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #sync, - [], - { - #blockchain: blockchain, - #hint: hint, - }, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i3.Policy? policies(_i4.KeychainKind? keychain) => (super.noSuchMethod( - Invocation.method( - #policies, - [keychain], - ), - returnValueForMissingStub: null, - ) as _i3.Policy?); -} - -/// A class which mocks [Transaction]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockTransaction extends _i1.Mock implements _i3.Transaction { - @override - String get s => (super.noSuchMethod( - Invocation.getter(#s), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#s), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.getter(#s), - ), - ) as String); - - @override - _i5.Future> input() => (super.noSuchMethod( - Invocation.method( - #input, - [], - ), - returnValue: _i5.Future>.value(<_i4.TxIn>[]), - returnValueForMissingStub: - _i5.Future>.value(<_i4.TxIn>[]), - ) as _i5.Future>); - - @override - _i5.Future isCoinBase() => (super.noSuchMethod( - Invocation.method( - #isCoinBase, - [], - ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future isExplicitlyRbf() => (super.noSuchMethod( - Invocation.method( - #isExplicitlyRbf, - [], - ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future isLockTimeEnabled() => (super.noSuchMethod( - Invocation.method( - #isLockTimeEnabled, - [], - ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future<_i4.LockTime> lockTime() => (super.noSuchMethod( - Invocation.method( - #lockTime, - [], - ), - returnValue: - _i5.Future<_i4.LockTime>.value(_i6.dummyValue<_i4.LockTime>( - this, - Invocation.method( - #lockTime, - [], - ), - )), - returnValueForMissingStub: - _i5.Future<_i4.LockTime>.value(_i6.dummyValue<_i4.LockTime>( - this, - Invocation.method( - #lockTime, - [], - ), - )), - ) as _i5.Future<_i4.LockTime>); - - @override - _i5.Future> output() => (super.noSuchMethod( - Invocation.method( - #output, - [], - ), - returnValue: _i5.Future>.value(<_i4.TxOut>[]), - returnValueForMissingStub: - _i5.Future>.value(<_i4.TxOut>[]), - ) as _i5.Future>); - - @override - _i5.Future<_i7.Uint8List> serialize() => (super.noSuchMethod( - Invocation.method( - #serialize, - [], - ), - returnValue: _i5.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - returnValueForMissingStub: - _i5.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - ) as _i5.Future<_i7.Uint8List>); - - @override - _i5.Future size() => (super.noSuchMethod( - Invocation.method( - #size, - [], - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #size, - [], - ), - )), - returnValueForMissingStub: - _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #size, - [], - ), - )), - ) as _i5.Future); - - @override - _i5.Future txid() => (super.noSuchMethod( - Invocation.method( - #txid, - [], - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #txid, - [], - ), - )), - returnValueForMissingStub: - _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #txid, - [], - ), - )), - ) as _i5.Future); - - @override - _i5.Future version() => (super.noSuchMethod( - Invocation.method( - #version, - [], - ), - returnValue: _i5.Future.value(0), - returnValueForMissingStub: _i5.Future.value(0), - ) as _i5.Future); - - @override - _i5.Future vsize() => (super.noSuchMethod( - Invocation.method( - #vsize, - [], - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #vsize, - [], - ), - )), - returnValueForMissingStub: - _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #vsize, - [], - ), - )), - ) as _i5.Future); - - @override - _i5.Future weight() => (super.noSuchMethod( - Invocation.method( - #weight, - [], - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #weight, - [], - ), - )), - returnValueForMissingStub: - _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #weight, - [], - ), - )), - ) as _i5.Future); -} - -/// A class which mocks [Blockchain]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockBlockchain extends _i1.Mock implements _i3.Blockchain { - @override - _i2.AnyBlockchain get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeAnyBlockchain_5( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeAnyBlockchain_5( - this, - Invocation.getter(#ptr), - ), - ) as _i2.AnyBlockchain); - - @override - _i5.Future<_i4.FeeRate> estimateFee({ - required BigInt? target, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #estimateFee, - [], - { - #target: target, - #hint: hint, - }, - ), - returnValue: _i5.Future<_i4.FeeRate>.value(_FakeFeeRate_6( - this, - Invocation.method( - #estimateFee, - [], - { - #target: target, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: _i5.Future<_i4.FeeRate>.value(_FakeFeeRate_6( - this, - Invocation.method( - #estimateFee, - [], - { - #target: target, - #hint: hint, - }, - ), - )), - ) as _i5.Future<_i4.FeeRate>); - - @override - _i5.Future broadcast({ - required _i3.Transaction? transaction, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #broadcast, - [], - { - #transaction: transaction, - #hint: hint, - }, - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #broadcast, - [], - { - #transaction: transaction, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: - _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #broadcast, - [], - { - #transaction: transaction, - #hint: hint, - }, - ), - )), - ) as _i5.Future); - - @override - _i5.Future getBlockHash({ - required int? height, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #getBlockHash, - [], - { - #height: height, - #hint: hint, - }, - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #getBlockHash, - [], - { - #height: height, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: - _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #getBlockHash, - [], - { - #height: height, - #hint: hint, - }, - ), - )), - ) as _i5.Future); - - @override - _i5.Future getHeight({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #getHeight, - [], - {#hint: hint}, - ), - returnValue: _i5.Future.value(0), - returnValueForMissingStub: _i5.Future.value(0), - ) as _i5.Future); -} - -/// A class which mocks [DescriptorSecretKey]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockDescriptorSecretKey extends _i1.Mock - implements _i3.DescriptorSecretKey { - @override - _i2.DescriptorSecretKey get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeDescriptorSecretKey_7( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeDescriptorSecretKey_7( - this, - Invocation.getter(#ptr), - ), - ) as _i2.DescriptorSecretKey); - - @override - _i5.Future<_i3.DescriptorSecretKey> derive(_i3.DerivationPath? path) => - (super.noSuchMethod( - Invocation.method( - #derive, - [path], - ), - returnValue: _i5.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( - this, - Invocation.method( - #derive, - [path], - ), - )), - returnValueForMissingStub: _i5.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( - this, - Invocation.method( - #derive, - [path], - ), - )), - ) as _i5.Future<_i3.DescriptorSecretKey>); - - @override - _i5.Future<_i3.DescriptorSecretKey> extend(_i3.DerivationPath? path) => - (super.noSuchMethod( - Invocation.method( - #extend, - [path], - ), - returnValue: _i5.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( - this, - Invocation.method( - #extend, - [path], - ), - )), - returnValueForMissingStub: _i5.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( - this, - Invocation.method( - #extend, - [path], - ), - )), - ) as _i5.Future<_i3.DescriptorSecretKey>); - - @override - _i3.DescriptorPublicKey toPublic() => (super.noSuchMethod( - Invocation.method( - #toPublic, - [], - ), - returnValue: _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #toPublic, - [], - ), - ), - returnValueForMissingStub: _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #toPublic, - [], - ), - ), - ) as _i3.DescriptorPublicKey); - - @override - _i7.Uint8List secretBytes({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #secretBytes, - [], - {#hint: hint}, - ), - returnValue: _i7.Uint8List(0), - returnValueForMissingStub: _i7.Uint8List(0), - ) as _i7.Uint8List); - - @override - String asString() => (super.noSuchMethod( - Invocation.method( - #asString, - [], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - ) as String); -} - -/// A class which mocks [DescriptorPublicKey]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockDescriptorPublicKey extends _i1.Mock - implements _i3.DescriptorPublicKey { - @override - _i2.DescriptorPublicKey get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeDescriptorPublicKey_10( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeDescriptorPublicKey_10( - this, - Invocation.getter(#ptr), - ), - ) as _i2.DescriptorPublicKey); - - @override - _i5.Future<_i3.DescriptorPublicKey> derive({ - required _i3.DerivationPath? path, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #derive, - [], - { - #path: path, - #hint: hint, - }, - ), - returnValue: _i5.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #derive, - [], - { - #path: path, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: _i5.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #derive, - [], - { - #path: path, - #hint: hint, - }, - ), - )), - ) as _i5.Future<_i3.DescriptorPublicKey>); - - @override - _i5.Future<_i3.DescriptorPublicKey> extend({ - required _i3.DerivationPath? path, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #extend, - [], - { - #path: path, - #hint: hint, - }, - ), - returnValue: _i5.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #extend, - [], - { - #path: path, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: _i5.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #extend, - [], - { - #path: path, - #hint: hint, - }, - ), - )), - ) as _i5.Future<_i3.DescriptorPublicKey>); - - @override - String asString() => (super.noSuchMethod( - Invocation.method( - #asString, - [], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - ) as String); -} - -/// A class which mocks [PartiallySignedTransaction]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPartiallySignedTransaction extends _i1.Mock - implements _i3.PartiallySignedTransaction { - @override - _i2.MutexPartiallySignedTransaction get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeMutexPartiallySignedTransaction_11( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeMutexPartiallySignedTransaction_11( - this, - Invocation.getter(#ptr), - ), - ) as _i2.MutexPartiallySignedTransaction); - - @override - String jsonSerialize({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #jsonSerialize, - [], - {#hint: hint}, - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #jsonSerialize, - [], - {#hint: hint}, - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #jsonSerialize, - [], - {#hint: hint}, - ), - ), - ) as String); - - @override - _i7.Uint8List serialize({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #serialize, - [], - {#hint: hint}, - ), - returnValue: _i7.Uint8List(0), - returnValueForMissingStub: _i7.Uint8List(0), - ) as _i7.Uint8List); - - @override - _i3.Transaction extractTx() => (super.noSuchMethod( - Invocation.method( - #extractTx, - [], - ), - returnValue: _FakeTransaction_12( - this, - Invocation.method( - #extractTx, - [], - ), - ), - returnValueForMissingStub: _FakeTransaction_12( - this, - Invocation.method( - #extractTx, - [], - ), - ), - ) as _i3.Transaction); - - @override - _i5.Future<_i3.PartiallySignedTransaction> combine( - _i3.PartiallySignedTransaction? other) => - (super.noSuchMethod( - Invocation.method( - #combine, - [other], - ), - returnValue: _i5.Future<_i3.PartiallySignedTransaction>.value( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #combine, - [other], - ), - )), - returnValueForMissingStub: - _i5.Future<_i3.PartiallySignedTransaction>.value( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #combine, - [other], - ), - )), - ) as _i5.Future<_i3.PartiallySignedTransaction>); - - @override - String txid({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #txid, - [], - {#hint: hint}, - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #txid, - [], - {#hint: hint}, - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #txid, - [], - {#hint: hint}, - ), - ), - ) as String); - - @override - String asString() => (super.noSuchMethod( - Invocation.method( - #asString, - [], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - ) as String); -} - -/// A class which mocks [TxBuilder]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { - @override - _i3.TxBuilder addData({required List? data}) => (super.noSuchMethod( - Invocation.method( - #addData, - [], - {#data: data}, - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #addData, - [], - {#data: data}, - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #addData, - [], - {#data: data}, - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder addRecipient( - _i3.ScriptBuf? script, - BigInt? amount, - ) => - (super.noSuchMethod( - Invocation.method( - #addRecipient, - [ - script, - amount, - ], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #addRecipient, - [ - script, - amount, - ], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #addRecipient, - [ - script, - amount, - ], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder unSpendable(List<_i4.OutPoint>? outpoints) => - (super.noSuchMethod( - Invocation.method( - #unSpendable, - [outpoints], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #unSpendable, - [outpoints], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #unSpendable, - [outpoints], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder addUtxo(_i4.OutPoint? outpoint) => (super.noSuchMethod( - Invocation.method( - #addUtxo, - [outpoint], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #addUtxo, - [outpoint], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #addUtxo, - [outpoint], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder addUtxos(List<_i4.OutPoint>? outpoints) => (super.noSuchMethod( - Invocation.method( - #addUtxos, - [outpoints], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #addUtxos, - [outpoints], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #addUtxos, - [outpoints], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder addForeignUtxo( - _i4.Input? psbtInput, - _i4.OutPoint? outPoint, - BigInt? satisfactionWeight, - ) => - (super.noSuchMethod( - Invocation.method( - #addForeignUtxo, - [ - psbtInput, - outPoint, - satisfactionWeight, - ], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #addForeignUtxo, - [ - psbtInput, - outPoint, - satisfactionWeight, - ], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #addForeignUtxo, - [ - psbtInput, - outPoint, - satisfactionWeight, - ], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder doNotSpendChange() => (super.noSuchMethod( - Invocation.method( - #doNotSpendChange, - [], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #doNotSpendChange, - [], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #doNotSpendChange, - [], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder drainWallet() => (super.noSuchMethod( - Invocation.method( - #drainWallet, - [], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #drainWallet, - [], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #drainWallet, - [], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder drainTo(_i3.ScriptBuf? script) => (super.noSuchMethod( - Invocation.method( - #drainTo, - [script], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #drainTo, - [script], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #drainTo, - [script], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder enableRbfWithSequence(int? nSequence) => (super.noSuchMethod( - Invocation.method( - #enableRbfWithSequence, - [nSequence], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #enableRbfWithSequence, - [nSequence], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #enableRbfWithSequence, - [nSequence], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder enableRbf() => (super.noSuchMethod( - Invocation.method( - #enableRbf, - [], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #enableRbf, - [], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #enableRbf, - [], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder feeAbsolute(BigInt? feeAmount) => (super.noSuchMethod( - Invocation.method( - #feeAbsolute, - [feeAmount], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #feeAbsolute, - [feeAmount], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #feeAbsolute, - [feeAmount], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder feeRate(double? satPerVbyte) => (super.noSuchMethod( - Invocation.method( - #feeRate, - [satPerVbyte], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #feeRate, - [satPerVbyte], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #feeRate, - [satPerVbyte], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder setRecipients(List<(_i3.ScriptBuf, BigInt)>? recipients) => - (super.noSuchMethod( - Invocation.method( - #setRecipients, - [recipients], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #setRecipients, - [recipients], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #setRecipients, - [recipients], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder manuallySelectedOnly() => (super.noSuchMethod( - Invocation.method( - #manuallySelectedOnly, - [], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #manuallySelectedOnly, - [], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #manuallySelectedOnly, - [], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder addUnSpendable(_i4.OutPoint? unSpendable) => - (super.noSuchMethod( - Invocation.method( - #addUnSpendable, - [unSpendable], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #addUnSpendable, - [unSpendable], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #addUnSpendable, - [unSpendable], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder policyPath( - _i4.KeychainKind? keychain, - Map? path, - ) => - (super.noSuchMethod( - Invocation.method( - #policyPath, - [ - keychain, - path, - ], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #policyPath, - [ - keychain, - path, - ], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #policyPath, - [ - keychain, - path, - ], - ), - ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder onlySpendChange() => (super.noSuchMethod( - Invocation.method( - #onlySpendChange, - [], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #onlySpendChange, - [], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #onlySpendChange, - [], - ), - ), - ) as _i3.TxBuilder); - - @override - _i5.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( - _i3.Wallet? wallet) => - (super.noSuchMethod( - Invocation.method( - #finish, - [wallet], - ), - returnValue: _i5.Future< - (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - returnValueForMissingStub: _i5.Future< - (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - ) as _i5 - .Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)>); -} - -/// A class which mocks [BumpFeeTxBuilder]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockBumpFeeTxBuilder extends _i1.Mock implements _i3.BumpFeeTxBuilder { - @override - String get txid => (super.noSuchMethod( - Invocation.getter(#txid), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#txid), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.getter(#txid), - ), - ) as String); - - @override - double get feeRate => (super.noSuchMethod( - Invocation.getter(#feeRate), - returnValue: 0.0, - returnValueForMissingStub: 0.0, - ) as double); - - @override - _i3.BumpFeeTxBuilder allowShrinking(_i3.Address? address) => - (super.noSuchMethod( - Invocation.method( - #allowShrinking, - [address], - ), - returnValue: _FakeBumpFeeTxBuilder_16( - this, - Invocation.method( - #allowShrinking, - [address], - ), - ), - returnValueForMissingStub: _FakeBumpFeeTxBuilder_16( - this, - Invocation.method( - #allowShrinking, - [address], - ), - ), - ) as _i3.BumpFeeTxBuilder); - - @override - _i3.BumpFeeTxBuilder enableRbf() => (super.noSuchMethod( - Invocation.method( - #enableRbf, - [], - ), - returnValue: _FakeBumpFeeTxBuilder_16( - this, - Invocation.method( - #enableRbf, - [], - ), - ), - returnValueForMissingStub: _FakeBumpFeeTxBuilder_16( - this, - Invocation.method( - #enableRbf, - [], - ), - ), - ) as _i3.BumpFeeTxBuilder); - - @override - _i3.BumpFeeTxBuilder enableRbfWithSequence(int? nSequence) => - (super.noSuchMethod( - Invocation.method( - #enableRbfWithSequence, - [nSequence], - ), - returnValue: _FakeBumpFeeTxBuilder_16( - this, - Invocation.method( - #enableRbfWithSequence, - [nSequence], - ), - ), - returnValueForMissingStub: _FakeBumpFeeTxBuilder_16( - this, - Invocation.method( - #enableRbfWithSequence, - [nSequence], - ), - ), - ) as _i3.BumpFeeTxBuilder); - - @override - _i5.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( - _i3.Wallet? wallet) => - (super.noSuchMethod( - Invocation.method( - #finish, - [wallet], - ), - returnValue: _i5.Future< - (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - returnValueForMissingStub: _i5.Future< - (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - ) as _i5 - .Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)>); -} - -/// A class which mocks [ScriptBuf]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScriptBuf extends _i1.Mock implements _i3.ScriptBuf { - @override - _i7.Uint8List get bytes => (super.noSuchMethod( - Invocation.getter(#bytes), - returnValue: _i7.Uint8List(0), - returnValueForMissingStub: _i7.Uint8List(0), - ) as _i7.Uint8List); - - @override - String asString() => (super.noSuchMethod( - Invocation.method( - #asString, - [], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - ) as String); -} - -/// A class which mocks [Address]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockAddress extends _i1.Mock implements _i3.Address { - @override - _i2.Address get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeAddress_17( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeAddress_17( - this, - Invocation.getter(#ptr), - ), - ) as _i2.Address); - - @override - _i3.ScriptBuf scriptPubkey() => (super.noSuchMethod( - Invocation.method( - #scriptPubkey, - [], - ), - returnValue: _FakeScriptBuf_18( - this, - Invocation.method( - #scriptPubkey, - [], - ), - ), - returnValueForMissingStub: _FakeScriptBuf_18( - this, - Invocation.method( - #scriptPubkey, - [], - ), - ), - ) as _i3.ScriptBuf); - - @override - String toQrUri() => (super.noSuchMethod( - Invocation.method( - #toQrUri, - [], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #toQrUri, - [], - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #toQrUri, - [], - ), - ), - ) as String); - - @override - bool isValidForNetwork({required _i4.Network? network}) => - (super.noSuchMethod( - Invocation.method( - #isValidForNetwork, - [], - {#network: network}, - ), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - _i4.Network network() => (super.noSuchMethod( - Invocation.method( - #network, - [], - ), - returnValue: _i4.Network.testnet, - returnValueForMissingStub: _i4.Network.testnet, - ) as _i4.Network); - - @override - _i4.Payload payload() => (super.noSuchMethod( - Invocation.method( - #payload, - [], - ), - returnValue: _i6.dummyValue<_i4.Payload>( - this, - Invocation.method( - #payload, - [], - ), - ), - returnValueForMissingStub: _i6.dummyValue<_i4.Payload>( - this, - Invocation.method( - #payload, - [], - ), - ), - ) as _i4.Payload); - - @override - String asString() => (super.noSuchMethod( - Invocation.method( - #asString, - [], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - ) as String); -} - -/// A class which mocks [DerivationPath]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockDerivationPath extends _i1.Mock implements _i3.DerivationPath { - @override - _i2.DerivationPath get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeDerivationPath_19( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeDerivationPath_19( - this, - Invocation.getter(#ptr), - ), - ) as _i2.DerivationPath); - - @override - String asString() => (super.noSuchMethod( - Invocation.method( - #asString, - [], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - ) as String); -} - -/// A class which mocks [FeeRate]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockFeeRate extends _i1.Mock implements _i4.FeeRate { - @override - double get satPerVb => (super.noSuchMethod( - Invocation.getter(#satPerVb), - returnValue: 0.0, - returnValueForMissingStub: 0.0, - ) as double); -} - -/// A class which mocks [LocalUtxo]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLocalUtxo extends _i1.Mock implements _i4.LocalUtxo { - @override - _i4.OutPoint get outpoint => (super.noSuchMethod( - Invocation.getter(#outpoint), - returnValue: _FakeOutPoint_20( - this, - Invocation.getter(#outpoint), - ), - returnValueForMissingStub: _FakeOutPoint_20( - this, - Invocation.getter(#outpoint), - ), - ) as _i4.OutPoint); - - @override - _i4.TxOut get txout => (super.noSuchMethod( - Invocation.getter(#txout), - returnValue: _FakeTxOut_21( - this, - Invocation.getter(#txout), - ), - returnValueForMissingStub: _FakeTxOut_21( - this, - Invocation.getter(#txout), - ), - ) as _i4.TxOut); - - @override - _i4.KeychainKind get keychain => (super.noSuchMethod( - Invocation.getter(#keychain), - returnValue: _i4.KeychainKind.externalChain, - returnValueForMissingStub: _i4.KeychainKind.externalChain, - ) as _i4.KeychainKind); - - @override - bool get isSpent => (super.noSuchMethod( - Invocation.getter(#isSpent), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); -} - -/// A class which mocks [TransactionDetails]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockTransactionDetails extends _i1.Mock - implements _i3.TransactionDetails { - @override - String get txid => (super.noSuchMethod( - Invocation.getter(#txid), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#txid), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.getter(#txid), - ), - ) as String); - - @override - BigInt get received => (super.noSuchMethod( - Invocation.getter(#received), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#received), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.getter(#received), - ), - ) as BigInt); - - @override - BigInt get sent => (super.noSuchMethod( - Invocation.getter(#sent), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#sent), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.getter(#sent), - ), - ) as BigInt); -} From f1f622c628cecf7033e9b2addbfd5f604fcaa2b3 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 4 Dec 2024 19:37:00 -0500 Subject: [PATCH 3/7] Merge commit '5f2908c48900c8ff8af9de2ed809acfae7d7753e' as 'cargokit' --- .github/workflows/precompile_binaries.yml | 54 + .gitignore | 40 +- .metadata | 36 + CHANGELOG.md | 179 + LICENSE | 40 +- LICENSE-APACHE | 201 + README.md | 189 + analysis_options.yaml | 31 + android/.gitignore | 9 + android/build.gradle | 57 + android/gradle.properties | 15 + android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + android/gradlew | 234 + android/gradlew.bat | 89 + android/settings.gradle | 1 + android/src/main/AndroidManifest.xml | 1 + .../.github}/workflows/check_and_lint.yml | 0 .../workflows/test_example_plugin_build.yml | 0 cargokit/.gitignore | 4 + cargokit/LICENSE | 39 + README => cargokit/README | 0 build_pod.sh => cargokit/build_pod.sh | 0 {build_tool => cargokit/build_tool}/README.md | 0 .../build_tool}/analysis_options.yaml | 0 .../build_tool}/bin/build_tool.dart | 0 .../build_tool}/lib/build_tool.dart | 0 .../lib/src/android_environment.dart | 0 .../lib/src/artifacts_provider.dart | 0 .../build_tool}/lib/src/build_cmake.dart | 0 .../build_tool}/lib/src/build_gradle.dart | 0 .../build_tool}/lib/src/build_pod.dart | 0 .../build_tool}/lib/src/build_tool.dart | 0 .../build_tool}/lib/src/builder.dart | 0 .../build_tool}/lib/src/cargo.dart | 0 .../build_tool}/lib/src/crate_hash.dart | 0 .../build_tool}/lib/src/environment.dart | 0 .../build_tool}/lib/src/logging.dart | 0 .../build_tool}/lib/src/options.dart | 0 .../lib/src/precompile_binaries.dart | 0 .../build_tool}/lib/src/rustup.dart | 0 .../build_tool}/lib/src/target.dart | 0 .../build_tool}/lib/src/util.dart | 0 .../build_tool}/lib/src/verify_binaries.dart | 0 .../build_tool}/pubspec.lock | 0 .../build_tool}/pubspec.yaml | 0 .../build_tool}/test/builder_test.dart | 0 .../build_tool}/test/cargo_test.dart | 0 .../build_tool}/test/options_test.dart | 0 .../build_tool}/test/rustup_test.dart | 0 {cmake => cargokit/cmake}/cargokit.cmake | 0 .../cmake}/resolve_symlinks.ps1 | 0 {docs => cargokit/docs}/architecture.md | 0 .../docs}/precompiled_binaries.md | 0 {gradle => cargokit/gradle}/plugin.gradle | 0 .../run_build_tool.cmd | 0 .../run_build_tool.sh | 0 check_precompiled.sh | 11 + example/.gitignore | 45 + example/README.md | 16 + example/analysis_options.yaml | 29 + example/android/.gitignore | 13 + example/android/app/build.gradle | 72 + .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 34 + .../bdk/f/bdk_flutter_example/MainActivity.kt | 5 + .../res/drawable-v21/launch_background.xml | 11 + .../main/res/drawable/launch_background.xml | 11 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 + .../app/src/main/res/values/styles.xml | 18 + .../app/src/profile/AndroidManifest.xml | 7 + example/android/build.gradle | 31 + example/android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 6 + example/android/settings.gradle | 11 + example/integration_test /multi_sig_test.dart | 167 + example/ios/.gitignore | 34 + example/ios/Flutter/AppFrameworkInfo.plist | 26 + example/ios/Flutter/Debug.xcconfig | 2 + example/ios/Flutter/Release.xcconfig | 2 + example/ios/Podfile | 40 + example/ios/Runner.xcodeproj/project.pbxproj | 557 + .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 87 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + example/ios/Runner/AppDelegate.swift | 13 + .../AppIcon.appiconset/Contents.json | 122 + .../Icon-App-1024x1024@1x.png | Bin 0 -> 10932 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 564 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 1283 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 1588 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 1025 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 1716 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 1920 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 1283 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 1895 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 3831 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 1888 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 3294 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 3612 bytes .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 8 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 + example/ios/Runner/Base.lproj/Main.storyboard | 26 + example/ios/Runner/Info.plist | 51 + example/ios/Runner/Runner-Bridging-Header.h | 1 + example/lib/bdk_library.dart | 119 + example/lib/main.dart | 6 + example/lib/wallet.dart | 325 + example/macos/.gitignore | 7 + example/macos/Flutter/Flutter-Debug.xcconfig | 2 + .../macos/Flutter/Flutter-Release.xcconfig | 2 + .../Flutter/GeneratedPluginRegistrant.swift | 10 + example/macos/Podfile | 43 + example/macos/Podfile.lock | 22 + .../macos/Runner.xcodeproj/project.pbxproj | 791 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 98 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + example/macos/Runner/AppDelegate.swift | 9 + .../AppIcon.appiconset/Contents.json | 68 + .../AppIcon.appiconset/app_icon_1024.png | Bin 0 -> 102994 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 0 -> 5680 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 0 -> 520 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 0 -> 14142 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 0 -> 1066 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 0 -> 36406 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 0 -> 2218 bytes example/macos/Runner/Base.lproj/MainMenu.xib | 343 + example/macos/Runner/Configs/AppInfo.xcconfig | 14 + example/macos/Runner/Configs/Debug.xcconfig | 2 + example/macos/Runner/Configs/Release.xcconfig | 2 + .../macos/Runner/Configs/Warnings.xcconfig | 13 + .../macos/Runner/DebugProfile.entitlements | 14 + example/macos/Runner/Info.plist | 32 + example/macos/Runner/MainFlutterWindow.swift | 15 + example/macos/Runner/Release.entitlements | 8 + example/pubspec.lock | 483 + example/pubspec.yaml | 86 + flutter_rust_bridge.yaml | 10 + ios/.gitignore | 41 + ios/Classes/EnforceBundling.swift | 4 + ios/Classes/bdk_flutter.c | 0 ios/Classes/frb_generated.h | 1542 + ios/bdk_flutter.podspec | 31 + lefthook.yml | 16 + lib/bdk_flutter.dart | 50 + lib/src/generated/api/blockchain.dart | 289 + lib/src/generated/api/blockchain.freezed.dart | 993 + lib/src/generated/api/descriptor.dart | 127 + lib/src/generated/api/error.dart | 362 + lib/src/generated/api/error.freezed.dart | 28272 ++++++++++++++++ lib/src/generated/api/key.dart | 170 + lib/src/generated/api/psbt.dart | 77 + lib/src/generated/api/types.dart | 991 + lib/src/generated/api/types.freezed.dart | 5830 ++++ lib/src/generated/api/wallet.dart | 181 + lib/src/generated/frb_generated.dart | 8595 +++++ lib/src/generated/frb_generated.io.dart | 8116 +++++ lib/src/generated/lib.dart | 55 + lib/src/root.dart | 1369 + lib/src/utils/exceptions.dart | 459 + lib/src/utils/utils.dart | 15 + macos/.gitignore | 41 + macos/Classes/EnforceBundling.swift | 4 + macos/Classes/bdk_flutter.c | 0 macos/Classes/frb_generated.h | 1542 + macos/bdk_flutter.podspec | 36 + makefile | 29 + pubspec.lock | 621 + pubspec.yaml | 36 + rust/Cargo.lock | 1592 + rust/Cargo.toml | 29 + rust/cargokit.yaml | 6 + rust/src/api/blockchain.rs | 207 + rust/src/api/descriptor.rs | 274 + rust/src/api/error.rs | 368 + rust/src/api/key.rs | 297 + rust/src/api/mod.rs | 24 + rust/src/api/psbt.rs | 101 + rust/src/api/types.rs | 1168 + rust/src/api/wallet.rs | 329 + rust/src/frb_generated.io.rs | 4856 +++ rust/src/frb_generated.rs | 7124 ++++ rust/src/lib.rs | 5 + test/bdk_flutter_test.dart | 345 + test/bdk_flutter_test.mocks.dart | 2243 ++ 202 files changed, 84189 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/precompile_binaries.yml create mode 100644 .metadata create mode 100644 CHANGELOG.md create mode 100644 LICENSE-APACHE create mode 100644 README.md create mode 100644 analysis_options.yaml create mode 100644 android/.gitignore create mode 100644 android/build.gradle create mode 100644 android/gradle.properties create mode 100644 android/gradle/wrapper/gradle-wrapper.jar create mode 100644 android/gradle/wrapper/gradle-wrapper.properties create mode 100644 android/gradlew create mode 100644 android/gradlew.bat create mode 100644 android/settings.gradle create mode 100644 android/src/main/AndroidManifest.xml rename {.github => cargokit/.github}/workflows/check_and_lint.yml (100%) rename {.github => cargokit/.github}/workflows/test_example_plugin_build.yml (100%) create mode 100644 cargokit/.gitignore create mode 100644 cargokit/LICENSE rename README => cargokit/README (100%) rename build_pod.sh => cargokit/build_pod.sh (100%) rename {build_tool => cargokit/build_tool}/README.md (100%) rename {build_tool => cargokit/build_tool}/analysis_options.yaml (100%) rename {build_tool => cargokit/build_tool}/bin/build_tool.dart (100%) rename {build_tool => cargokit/build_tool}/lib/build_tool.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/android_environment.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/artifacts_provider.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/build_cmake.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/build_gradle.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/build_pod.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/build_tool.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/builder.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/cargo.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/crate_hash.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/environment.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/logging.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/options.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/precompile_binaries.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/rustup.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/target.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/util.dart (100%) rename {build_tool => cargokit/build_tool}/lib/src/verify_binaries.dart (100%) rename {build_tool => cargokit/build_tool}/pubspec.lock (100%) rename {build_tool => cargokit/build_tool}/pubspec.yaml (100%) rename {build_tool => cargokit/build_tool}/test/builder_test.dart (100%) rename {build_tool => cargokit/build_tool}/test/cargo_test.dart (100%) rename {build_tool => cargokit/build_tool}/test/options_test.dart (100%) rename {build_tool => cargokit/build_tool}/test/rustup_test.dart (100%) rename {cmake => cargokit/cmake}/cargokit.cmake (100%) rename {cmake => cargokit/cmake}/resolve_symlinks.ps1 (100%) rename {docs => cargokit/docs}/architecture.md (100%) rename {docs => cargokit/docs}/precompiled_binaries.md (100%) rename {gradle => cargokit/gradle}/plugin.gradle (100%) rename run_build_tool.cmd => cargokit/run_build_tool.cmd (100%) rename run_build_tool.sh => cargokit/run_build_tool.sh (100%) create mode 100644 check_precompiled.sh create mode 100644 example/.gitignore create mode 100644 example/README.md create mode 100644 example/analysis_options.yaml create mode 100644 example/android/.gitignore create mode 100644 example/android/app/build.gradle create mode 100644 example/android/app/src/debug/AndroidManifest.xml create mode 100644 example/android/app/src/main/AndroidManifest.xml create mode 100644 example/android/app/src/main/kotlin/io/bdk/f/bdk_flutter_example/MainActivity.kt create mode 100644 example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 example/android/app/src/main/res/drawable/launch_background.xml create mode 100644 example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 example/android/app/src/main/res/values-night/styles.xml create mode 100644 example/android/app/src/main/res/values/styles.xml create mode 100644 example/android/app/src/profile/AndroidManifest.xml create mode 100644 example/android/build.gradle create mode 100644 example/android/gradle.properties create mode 100644 example/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 example/android/settings.gradle create mode 100644 example/integration_test /multi_sig_test.dart create mode 100644 example/ios/.gitignore create mode 100644 example/ios/Flutter/AppFrameworkInfo.plist create mode 100644 example/ios/Flutter/Debug.xcconfig create mode 100644 example/ios/Flutter/Release.xcconfig create mode 100644 example/ios/Podfile create mode 100644 example/ios/Runner.xcodeproj/project.pbxproj create mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 example/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 example/ios/Runner/AppDelegate.swift create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png create mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100644 example/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 example/ios/Runner/Base.lproj/Main.storyboard create mode 100644 example/ios/Runner/Info.plist create mode 100644 example/ios/Runner/Runner-Bridging-Header.h create mode 100644 example/lib/bdk_library.dart create mode 100644 example/lib/main.dart create mode 100644 example/lib/wallet.dart create mode 100644 example/macos/.gitignore create mode 100644 example/macos/Flutter/Flutter-Debug.xcconfig create mode 100644 example/macos/Flutter/Flutter-Release.xcconfig create mode 100644 example/macos/Flutter/GeneratedPluginRegistrant.swift create mode 100644 example/macos/Podfile create mode 100644 example/macos/Podfile.lock create mode 100644 example/macos/Runner.xcodeproj/project.pbxproj create mode 100644 example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 example/macos/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 example/macos/Runner/AppDelegate.swift create mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png create mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png create mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png create mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png create mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png create mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png create mode 100644 example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png create mode 100644 example/macos/Runner/Base.lproj/MainMenu.xib create mode 100644 example/macos/Runner/Configs/AppInfo.xcconfig create mode 100644 example/macos/Runner/Configs/Debug.xcconfig create mode 100644 example/macos/Runner/Configs/Release.xcconfig create mode 100644 example/macos/Runner/Configs/Warnings.xcconfig create mode 100644 example/macos/Runner/DebugProfile.entitlements create mode 100644 example/macos/Runner/Info.plist create mode 100644 example/macos/Runner/MainFlutterWindow.swift create mode 100644 example/macos/Runner/Release.entitlements create mode 100644 example/pubspec.lock create mode 100644 example/pubspec.yaml create mode 100644 flutter_rust_bridge.yaml create mode 100644 ios/.gitignore create mode 100644 ios/Classes/EnforceBundling.swift create mode 100644 ios/Classes/bdk_flutter.c create mode 100644 ios/Classes/frb_generated.h create mode 100644 ios/bdk_flutter.podspec create mode 100644 lefthook.yml create mode 100644 lib/bdk_flutter.dart create mode 100644 lib/src/generated/api/blockchain.dart create mode 100644 lib/src/generated/api/blockchain.freezed.dart create mode 100644 lib/src/generated/api/descriptor.dart create mode 100644 lib/src/generated/api/error.dart create mode 100644 lib/src/generated/api/error.freezed.dart create mode 100644 lib/src/generated/api/key.dart create mode 100644 lib/src/generated/api/psbt.dart create mode 100644 lib/src/generated/api/types.dart create mode 100644 lib/src/generated/api/types.freezed.dart create mode 100644 lib/src/generated/api/wallet.dart create mode 100644 lib/src/generated/frb_generated.dart create mode 100644 lib/src/generated/frb_generated.io.dart create mode 100644 lib/src/generated/lib.dart create mode 100644 lib/src/root.dart create mode 100644 lib/src/utils/exceptions.dart create mode 100644 lib/src/utils/utils.dart create mode 100644 macos/.gitignore create mode 100644 macos/Classes/EnforceBundling.swift create mode 100644 macos/Classes/bdk_flutter.c create mode 100644 macos/Classes/frb_generated.h create mode 100644 macos/bdk_flutter.podspec create mode 100644 makefile create mode 100644 pubspec.lock create mode 100644 pubspec.yaml create mode 100644 rust/Cargo.lock create mode 100644 rust/Cargo.toml create mode 100644 rust/cargokit.yaml create mode 100644 rust/src/api/blockchain.rs create mode 100644 rust/src/api/descriptor.rs create mode 100644 rust/src/api/error.rs create mode 100644 rust/src/api/key.rs create mode 100644 rust/src/api/mod.rs create mode 100644 rust/src/api/psbt.rs create mode 100644 rust/src/api/types.rs create mode 100644 rust/src/api/wallet.rs create mode 100644 rust/src/frb_generated.io.rs create mode 100644 rust/src/frb_generated.rs create mode 100644 rust/src/lib.rs create mode 100644 test/bdk_flutter_test.dart create mode 100644 test/bdk_flutter_test.mocks.dart diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml new file mode 100644 index 00000000..0804c5b0 --- /dev/null +++ b/.github/workflows/precompile_binaries.yml @@ -0,0 +1,54 @@ +on: + push: + branches: '*' + +name: Precompile Binaries + +jobs: + Precompile: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-20.04 + - macOS-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Configure Cargo.toml optimizations + run: | + mkdir -p .cargo + echo "[profile.release]" >> .cargo/config.toml + echo "opt-level = 'z'" >> .cargo/config.toml + echo "lto = true" >> .cargo/config.toml + echo "codegen-units = 1" >> .cargo/config.toml + echo "panic = 'abort'" >> .cargo/config.toml + - uses: dart-lang/setup-dart@v1 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + - name: Set up Android SDK + if: (matrix.os == 'ubuntu-20.04') + uses: android-actions/setup-android@v2 + - name: Install Specific NDK + if: (matrix.os == 'ubuntu-20.04') + run: sdkmanager --install "ndk;24.0.8215888" + - name: Precompile (with iOS) + if: (matrix.os == 'macOS-latest') + run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter + working-directory: cargokit/build_tool + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} + - name: Precompile (with Android) + if: (matrix.os == 'ubuntu-20.04') + run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 + working-directory: cargokit/build_tool + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} diff --git a/.gitignore b/.gitignore index cf7bb868..840c0b18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,38 @@ -target -.dart_tool +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ +.vscode/settings.json + +# IntelliJ related *.iml -!pubspec.lock +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. + +**/doc/api/ +.dart_tool/ +.packages +build/ +bdk.*/ +*.xcframework +android/src/main/jniLibs/ +rust/target/ +rust/output.log + + diff --git a/.metadata b/.metadata new file mode 100644 index 00000000..8aaaa2cc --- /dev/null +++ b/.metadata @@ -0,0 +1,36 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: f92f44110e87bad5ff168335c36da6f6053036e6 + channel: stable + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 + base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 + - platform: android + create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 + base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 + - platform: ios + create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 + base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 + - platform: macos + create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 + base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..77d8f273 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,179 @@ +## [0.31.3] + +## [0.31.2] +Updated `flutter_rust_bridge` to `2.0.0`. +#### APIs added +- Exposed `createTestnet` & `createMutinynet` to `Blockchain`. +- Exposed `policies` in `Wallet`. +- Exposed `policyPath` in `TxBuilder`. +- Exposed `id`, `requiresPath`, `item`, `satisfaction`, `contribution` in `Policy` class. +- Overrode `toString()` for `Address`, `DerivationPath`, `Descriptor`, `DescriptorPublicKey` , `DescriptorSecretKey`, `Mnemonic`, +- `PartiallySignedTransaction`, `ScriptBuf` & `Transaction`. +#### Changed +- `partiallySignedTransaction.serialize()` serialize the data as raw binary. +#### Fixed +- Thread `frb_workerpool` panicked on Sql database access. + +## [0.31.2-dev.2] +#### Fixed +- Thread `frb_workerpool` panicked on invalid `Fingerprint`. +- `SignOptions` issue to accept `witness-utxo` while signing. + +#### Changed +- Removed `multiSig` variable from `SignOptions`. +- Updated example app to support `mutinynet`. +- Mapped `Hex`, `Address`, `Descriptor` & `Consensus` exceptions. + +## [0.31.2-dev.1] +#### Fixed +- Invalid `Bip49Public`, `Bip84Public` & `Bip86Public`. + +## [0.31.2-dev] +Updated Rust and Flutter dependencies. +#### APIs added +- Add `InvalidInputException`, `InvalidLockTimeException` & `InvalidTransactionException` . +#### Fixed +- Thread `frb_workerpool` panic on `UnknownUtxo` and `InvalidPsbtInput`. + +## [0.31.1-dev] +#### Fixed +- Failed to load `.so` files in android. + +## [0.31.0-dev] +Updated Rust and Flutter dependencies. +#### APIs added +- Add sealed class `Auth` in `RpcConfig`. +- Made `PartiallySignedTransaction` class mutable. + +#### Changed +- Replace `AddressIndex`'s `new` with`increase`. +- Renamed `Address`'s create to `fromString`. +- `txBuilder.finish` returns a tuple. +- Added `cargokit` to handle rust binary build + +#### Fixed +- Functions hang indefinitely on iOS devices. +- Thread `frb_workerpool` panicked. + +## [0.30.0] +Updated Rust and Flutter dependencies. +MacOS support bug resolved +#### APIs added +- Add BIP-86 descriptor template + +## [0.29.2] +Support MacOS and unit testing. +Updated flutter dependencies. + +## [0.29.1] +Updated Rust and Flutter dependencies. +Exposed strongly-typed exceptions. + +## [0.29.0] +Support Dart 3. +Updated Rust and Flutter dependencies. +#### APIs added +- Add `isMine` method to `Wallet`. +- Expose script.toBytes() method. + +## [0.28.3] +### Fixed +- Multisig issue resolved by adding isMultiSig to signOptions. + +## [0.28.2] +#### APIs added +- Expose `Wallet` class's `getDescriptorForKeyChain` and `getPsbtInput` functions. +- Expose `TxBuilder` class's `addForeignUtxo` function. +- Add `Input` class. +- Expose `Descriptor` class's `maxSatisfactionWeight` function. + +## [0.28.1] +### Fixed +- Invalid UTF-8 error for txansaction.input(). + +## [0.28.0] +Updated Rust ( Bdk to latest version 0.28.0 ) and Flutter dependencies. +#### APIs added +- Expose `Address` class's `payload` and `network` functions +- Add `fromScript` constructor to `Address` class +- Add `SignOptions` to Wallet.sign() params. +- Add `jsonSerialize` function to `PartiallySignedTransaction`, to get the JSON serialized value of all PSBT fields. +- Expose `Transaction` class's `txid`, `weight`, `size`, `vsize`, `isCoinBase`, `isExplicitlyRbf`, `version`, `isLockTimeEnabled`, `lockTime`, `input` and `output` functions. + +## [0.27.2] +### API changed +- txBuilder.finish() & bumpFeeTxBuilder.finish() returns a `TxBuilderResult` instead of a `PartiallySignedTransaction`. + +## [0.27.1] +Updated Rust ( Bdk to latest version 0.27.1 ) and Flutter dependencies. +#### APIs added +- New `Transaction` class that can be created from or serialized to consensus encoded bytes. +- Add estimateFee(int Target) function for `Blockchain` +- Add getInternalAddress() function for `Wallet` +- Add AddressIndex.reset(int index) & AddressIndex.peek(int index) +#### APIs changed +- partiallySignedTransaction.extractTx() returns a `Transaction` instead of a the transaction bytes. +- blockchain.broadcast() takes a `Transaction` instead of a `PartiallySignedTransaction` + +## [0.3.2] +### Fixed +- iOS build issue when using flavors +- Added toString method for all objects + +## [0.3.1] +### Fixed +- Pub.dev analysis score +- Type mismatch for descriptorSecretKey + +## [0.3.0] +Updated Rust ( Bdk to latest version 0.26.0 ) and Flutter dependencies. +#### APIs changed +- The descriptor and changeDescriptor arguments on the wallet constructor now take a `Descriptor` instead of a String. +#### APIs added +- Added RpcConfig, BlockchainConfig.rpc +- Added Descriptor type with the following named constructors: +- Default `create` constructor, that requires a descriptor in String format and a Network +- newBip44 constructor returns a Descriptor with structure pkh(key/44'/{0,1}'/0'/{0,1}/*) +- newBip44Public constructor returns a Descriptor with structure pkh(key/{0,1}/*) +- newBip49 constructor returns a Descriptor with structure sh(wpkh(key/49'/{0,1}'/0'/{0,1}/*)) +- newBip49Public constructor returns a Descriptor with structure sh(wpkh(key/{0,1}/*)) +- newBip84 constructor returns a Descriptor with structure wpkh(key/84'/{0,1}'/0'/{0,1}/*) +- newBip84Public constructor returns a Descriptor with structure wpkh(key/{0,1}/*) +- asString returns the public version of the output descriptor in String format +- asPrivateString returns the private version of the output descriptor if available, otherwise, return the public version + +## [0.2.3] +### Fixed +- pub.dev analysis score + +## [0.2.2] +### Fixed +- pub.dev analysis score + +## [0.2.1] +### Fixed +- pub.dev static analysis warning +- removing internal helper functions from public api + +## [0.2.0] +Updated API to match bdk-ffi + +## [0.1.4] +#### Functionality Added +- Generate Mnemonic method +- Create Descriptors +- Create Extended Key +- Create XPriv +- Create XPub +- Create Wallet +- Get New Address +- Get Last Unused Address +- Get Balance +- Get Transactions +- Get Pending Transactions +- Get Confirmed Transactions +- Sync Wallet +- Create Transaction +- Sign Transaction +- Broadcast Transaction +- Quick Send \ No newline at end of file diff --git a/LICENSE b/LICENSE index 54a7d589..1f95d26c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,39 +1,5 @@ -Copyright 2022 Matej Knopp +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -================================================================================ - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -================================================================================ - -APACHE LICENSE, VERSION 2.0 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 00000000..8c866a85 --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..8e596aad --- /dev/null +++ b/README.md @@ -0,0 +1,189 @@ +### Bdk Flutter + +

+ + BDK is released under the MIT license. + + + Docs + + + Current pub package version. + + + Issues + + + Stars + + + Forks + + + Demo App + +

+ +A Flutter library for the [Bitcoin Development Kit](https://bitcoindevkit.org/). +The bdk library aims to be the core building block for Bitcoin Applications of any kind. + +### Requirements + +- Flutter : 3.0 or higher +- Android minSdkVersion. : API 23 or higher. +- Deployment target : iOS 12.0 or greater. + +### How to Use + +To use the `bdk_flutter` package in your project, add it as a dependency in your project's pubspec.yaml: + +```dart +dependencies: + bdk_flutter: ^0.31.3 +``` + +### Examples + +### Create a Wallet & sync the balance of a descriptor + +```dart +import 'package:bdk_flutter/bdk_flutter.dart'; + +// .... + +final mnemonic = await Mnemonic.create(WordCount.words12); +final descriptorSecretKey = await DescriptorSecretKey.create( network: Network.testnet, + mnemonic: mnemonic ); +final externalDescriptor = await Descriptor.newBip44( secretKey: descriptorSecretKey, + network: Network.testnet, + keychain: KeychainKind.externalChain ); +final internalDescriptor = await Descriptor.newBip44( secretKey: descriptorSecretKey, + network: Network.testnet, + keychain: KeyChainKind.internalChain ); +final blockchain = await Blockchain.create( config: BlockchainConfig.electrum( + config: ElectrumConfig( + stopGap: 10, + timeout: 5, + retry: 5, + url: "ssl://electrum.blockstream.info:60002" ))); +final wallet = await Wallet.create( descriptor: externalDescriptor, + changeDescriptor: internalDescriptor, + network: Network.testnet, + databaseConfig: const DatabaseConfig.memory() ); +final _ = await wallet.sync( blockchain ); +``` + +### Create a `public` wallet descriptor + +```dart +import 'package:bdk_flutter/bdk_flutter.dart'; + +// .... + +final mnemonic = await Mnemonic.create(WordCount.words12); +final descriptorSecretKey = await DescriptorSecretKey.create( network: Network.testnet, + mnemonic: mnemonic ); +final externalDescriptor = await Descriptor.newBip44( secretKey: descriptorSecretKey, + network: Network.testnet, + keychain: KeychainKind.externalChain ); +final externalPublicDescriptor = await Descriptor.create( descriptor: externalDescriptor.toString(), + network: Network.testnet); +``` + +### Get the transaction details + +```dart +import 'package:bdk_flutter/bdk_flutter.dart'; + +final bdkWallet = ..... + +// .... + +final txBuilder = TxBuilder(); +final address = await Address.fromString(s: "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB", network: Network.testnet); + +final script = await address.scriptPubkey(); +final feeRate = await blockchain.estimateFee(target: 25); + +final (psbt, transactionDetails) = await txBuilder.feeRate( feeRate.satPerVb ) + .addRecipient( script, 2000 ) + .finish( bdkWallet ); + +final serializedPsbt = await psbt.jsonSerialize(); +final jsonObject = json.decode(serializedPsbt); +final outputs = jsonObject['unsigned_tx']['output'] as List; +final inputs = jsonObject['inputs'][0]['non_witness_utxo']['output'] as List; + +debugPrint("=========Inputs====="); + for (var e in 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. + +```dart +import 'package:bdk_flutter/bdk_flutter.dart'; + + +final mnemonic = await Mnemonic.create(WordCount.words12); +final descriptorSecretKey = await DescriptorSecretKey.create( + network: Network.testnet, mnemonic: mnemonic); + +// create external descriptor +final derivationPath = await DerivationPath.create(path: "m/44h/1h/0h/0"); +final descriptorPrivateKey = + await descriptorSecretKey.derive(derivationPath); +final Descriptor descriptorPrivate = await Descriptor.create( + descriptor: "pkh(${descriptorPrivateKey.toString()})", + network: Network.testnet, + ); + +// create internal descriptor +final derivationPathInt = + await DerivationPath.create(path: "m/44h/1h/0h/1"); +final descriptorPrivateKeyInt = + await descriptorSecretKey.derive(derivationPathInt); +final Descriptor descriptorPrivateInt = await Descriptor.create( + descriptor: "pkh(${descriptorPrivateKeyInt.toString()})", + network: Network.testnet, + ); + +final bdkWallet = await Wallet.create( + descriptor: descriptorPrivate, + changeDescriptor: descriptorPrivateInt, + network: Network.testnet, + databaseConfig: const DatabaseConfig.memory(), + ); + +final address = + await bdkWallet.getAddress(addressIndex: const AddressIndex.increase()); +final internalAddress = + await bdkWallet.getInternalAddress(addressIndex: const AddressIndex.increase()); + +``` + +### API Documentation + +The latest API documentation is available [here](https://pub.dev/documentation/bdk_flutter/latest/bdk_flutter/bdk_flutter-library.html) + +### Example Projects + +- **\*BDK Flutter Demo App:** The [BDK Flutter Demo App](https://github.com/LtbLightning/bdk-flutter-quickstart) + is a simple bitcoin app built in flutter to serve as a reference app to demonstrate `bdk-flutter` api usage. + +### 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 + + +Thanks for taking a look! diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 00000000..a40d945a --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,31 @@ +include: package:lints/core.yaml +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options + +linter: + rules: + prefer_single_quotes: false + avoid_void_async: false + prefer_interpolation_to_compose_strings: false + avoid_print: false + use_build_context_synchronously: false + unnecessary_string_escapes: false + avoid_dynamic_calls: false + non_constant_identifier_names: false + +analyzer: + exclude: + - lib/src/generated/frb_generated.dart + - lib/src/generated/frb_generated.io.dart + - lib/src/generated/frb_generated.dart + - lib/src/generated/api/types.freezed.dart + - lib/src/generated/api/types.dart + - lib/src/generated/api/descriptor.dart + - lib/src/generated/api/error.freezed.dart + - lib/src/generated/api/error.dart + - lib/src/generated/api/key.dart + - lib/src/generated/api/psbt.dart + - lib/src/generated/api/wallet.dart + - lib/src/generated/api/blockchain.freezed.dart + - README.md + - cargokit/ diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 00000000..161bdcda --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 00000000..6cc0c534 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,57 @@ +group 'io.bdk.f.bdk_flutter' +version '1.0-SNAPSHOT' +buildscript { + ext.kotlin_version = '1.6.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.2.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +android { + compileSdkVersion 31 + namespace "io.bdk.f.bdk_flutter" + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + minSdkVersion 23 + } +} +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'androidx.databinding:databinding-runtime:7.2.1' + testImplementation 'junit:junit:4.13.2' +} +apply from: "../cargokit/gradle/plugin.gradle" + +cargokit { + manifestDir = "../rust" + libname = "bdk_flutter" +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 00000000..49dec4d8 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,15 @@ +## For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx1024m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +#Sun Jun 05 16:55:39 EDT 2022 +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6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mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL literal 0 HcmV?d00001 diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..2e6e5897 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew new file mode 100644 index 00000000..c53aefaa --- /dev/null +++ b/android/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/android/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 00000000..ac214652 --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'bdk_flutter' diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml new file mode 100644 index 00000000..0bfa73ba --- /dev/null +++ b/android/src/main/AndroidManifest.xml @@ -0,0 +1 @@ + diff --git a/.github/workflows/check_and_lint.yml b/cargokit/.github/workflows/check_and_lint.yml similarity index 100% rename from .github/workflows/check_and_lint.yml rename to cargokit/.github/workflows/check_and_lint.yml diff --git a/.github/workflows/test_example_plugin_build.yml b/cargokit/.github/workflows/test_example_plugin_build.yml similarity index 100% rename from .github/workflows/test_example_plugin_build.yml rename to cargokit/.github/workflows/test_example_plugin_build.yml diff --git a/cargokit/.gitignore b/cargokit/.gitignore new file mode 100644 index 00000000..cf7bb868 --- /dev/null +++ b/cargokit/.gitignore @@ -0,0 +1,4 @@ +target +.dart_tool +*.iml +!pubspec.lock diff --git a/cargokit/LICENSE b/cargokit/LICENSE new file mode 100644 index 00000000..54a7d589 --- /dev/null +++ b/cargokit/LICENSE @@ -0,0 +1,39 @@ +Copyright 2022 Matej Knopp + +================================================================================ + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +================================================================================ + +APACHE LICENSE, VERSION 2.0 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + diff --git a/README b/cargokit/README similarity index 100% rename from README rename to cargokit/README diff --git a/build_pod.sh b/cargokit/build_pod.sh similarity index 100% rename from build_pod.sh rename to cargokit/build_pod.sh diff --git a/build_tool/README.md b/cargokit/build_tool/README.md similarity index 100% rename from build_tool/README.md rename to cargokit/build_tool/README.md diff --git a/build_tool/analysis_options.yaml b/cargokit/build_tool/analysis_options.yaml similarity index 100% rename from build_tool/analysis_options.yaml rename to cargokit/build_tool/analysis_options.yaml diff --git a/build_tool/bin/build_tool.dart b/cargokit/build_tool/bin/build_tool.dart similarity index 100% rename from build_tool/bin/build_tool.dart rename to cargokit/build_tool/bin/build_tool.dart diff --git a/build_tool/lib/build_tool.dart b/cargokit/build_tool/lib/build_tool.dart similarity index 100% rename from build_tool/lib/build_tool.dart rename to cargokit/build_tool/lib/build_tool.dart diff --git a/build_tool/lib/src/android_environment.dart b/cargokit/build_tool/lib/src/android_environment.dart similarity index 100% rename from build_tool/lib/src/android_environment.dart rename to cargokit/build_tool/lib/src/android_environment.dart diff --git a/build_tool/lib/src/artifacts_provider.dart b/cargokit/build_tool/lib/src/artifacts_provider.dart similarity index 100% rename from build_tool/lib/src/artifacts_provider.dart rename to cargokit/build_tool/lib/src/artifacts_provider.dart diff --git a/build_tool/lib/src/build_cmake.dart b/cargokit/build_tool/lib/src/build_cmake.dart similarity index 100% rename from build_tool/lib/src/build_cmake.dart rename to cargokit/build_tool/lib/src/build_cmake.dart diff --git a/build_tool/lib/src/build_gradle.dart b/cargokit/build_tool/lib/src/build_gradle.dart similarity index 100% rename from build_tool/lib/src/build_gradle.dart rename to cargokit/build_tool/lib/src/build_gradle.dart diff --git a/build_tool/lib/src/build_pod.dart b/cargokit/build_tool/lib/src/build_pod.dart similarity index 100% rename from build_tool/lib/src/build_pod.dart rename to cargokit/build_tool/lib/src/build_pod.dart diff --git a/build_tool/lib/src/build_tool.dart b/cargokit/build_tool/lib/src/build_tool.dart similarity index 100% rename from build_tool/lib/src/build_tool.dart rename to cargokit/build_tool/lib/src/build_tool.dart diff --git a/build_tool/lib/src/builder.dart b/cargokit/build_tool/lib/src/builder.dart similarity index 100% rename from build_tool/lib/src/builder.dart rename to cargokit/build_tool/lib/src/builder.dart diff --git a/build_tool/lib/src/cargo.dart b/cargokit/build_tool/lib/src/cargo.dart similarity index 100% rename from build_tool/lib/src/cargo.dart rename to cargokit/build_tool/lib/src/cargo.dart diff --git a/build_tool/lib/src/crate_hash.dart b/cargokit/build_tool/lib/src/crate_hash.dart similarity index 100% rename from build_tool/lib/src/crate_hash.dart rename to cargokit/build_tool/lib/src/crate_hash.dart diff --git a/build_tool/lib/src/environment.dart b/cargokit/build_tool/lib/src/environment.dart similarity index 100% rename from build_tool/lib/src/environment.dart rename to cargokit/build_tool/lib/src/environment.dart diff --git a/build_tool/lib/src/logging.dart b/cargokit/build_tool/lib/src/logging.dart similarity index 100% rename from build_tool/lib/src/logging.dart rename to cargokit/build_tool/lib/src/logging.dart diff --git a/build_tool/lib/src/options.dart b/cargokit/build_tool/lib/src/options.dart similarity index 100% rename from build_tool/lib/src/options.dart rename to cargokit/build_tool/lib/src/options.dart diff --git a/build_tool/lib/src/precompile_binaries.dart b/cargokit/build_tool/lib/src/precompile_binaries.dart similarity index 100% rename from build_tool/lib/src/precompile_binaries.dart rename to cargokit/build_tool/lib/src/precompile_binaries.dart diff --git a/build_tool/lib/src/rustup.dart b/cargokit/build_tool/lib/src/rustup.dart similarity index 100% rename from build_tool/lib/src/rustup.dart rename to cargokit/build_tool/lib/src/rustup.dart diff --git a/build_tool/lib/src/target.dart b/cargokit/build_tool/lib/src/target.dart similarity index 100% rename from build_tool/lib/src/target.dart rename to cargokit/build_tool/lib/src/target.dart diff --git a/build_tool/lib/src/util.dart b/cargokit/build_tool/lib/src/util.dart similarity index 100% rename from build_tool/lib/src/util.dart rename to cargokit/build_tool/lib/src/util.dart diff --git a/build_tool/lib/src/verify_binaries.dart b/cargokit/build_tool/lib/src/verify_binaries.dart similarity index 100% rename from build_tool/lib/src/verify_binaries.dart rename to cargokit/build_tool/lib/src/verify_binaries.dart diff --git a/build_tool/pubspec.lock b/cargokit/build_tool/pubspec.lock similarity index 100% rename from build_tool/pubspec.lock rename to cargokit/build_tool/pubspec.lock diff --git a/build_tool/pubspec.yaml b/cargokit/build_tool/pubspec.yaml similarity index 100% rename from build_tool/pubspec.yaml rename to cargokit/build_tool/pubspec.yaml diff --git a/build_tool/test/builder_test.dart b/cargokit/build_tool/test/builder_test.dart similarity index 100% rename from build_tool/test/builder_test.dart rename to cargokit/build_tool/test/builder_test.dart diff --git a/build_tool/test/cargo_test.dart b/cargokit/build_tool/test/cargo_test.dart similarity index 100% rename from build_tool/test/cargo_test.dart rename to cargokit/build_tool/test/cargo_test.dart diff --git a/build_tool/test/options_test.dart b/cargokit/build_tool/test/options_test.dart similarity index 100% rename from build_tool/test/options_test.dart rename to cargokit/build_tool/test/options_test.dart diff --git a/build_tool/test/rustup_test.dart b/cargokit/build_tool/test/rustup_test.dart similarity index 100% rename from build_tool/test/rustup_test.dart rename to cargokit/build_tool/test/rustup_test.dart diff --git a/cmake/cargokit.cmake b/cargokit/cmake/cargokit.cmake similarity index 100% rename from cmake/cargokit.cmake rename to cargokit/cmake/cargokit.cmake diff --git a/cmake/resolve_symlinks.ps1 b/cargokit/cmake/resolve_symlinks.ps1 similarity index 100% rename from cmake/resolve_symlinks.ps1 rename to cargokit/cmake/resolve_symlinks.ps1 diff --git a/docs/architecture.md b/cargokit/docs/architecture.md similarity index 100% rename from docs/architecture.md rename to cargokit/docs/architecture.md diff --git a/docs/precompiled_binaries.md b/cargokit/docs/precompiled_binaries.md similarity index 100% rename from docs/precompiled_binaries.md rename to cargokit/docs/precompiled_binaries.md diff --git a/gradle/plugin.gradle b/cargokit/gradle/plugin.gradle similarity index 100% rename from gradle/plugin.gradle rename to cargokit/gradle/plugin.gradle diff --git a/run_build_tool.cmd b/cargokit/run_build_tool.cmd similarity index 100% rename from run_build_tool.cmd rename to cargokit/run_build_tool.cmd diff --git a/run_build_tool.sh b/cargokit/run_build_tool.sh similarity index 100% rename from run_build_tool.sh rename to cargokit/run_build_tool.sh diff --git a/check_precompiled.sh b/check_precompiled.sh new file mode 100644 index 00000000..d6ff7498 --- /dev/null +++ b/check_precompiled.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +BASEDIR=$(dirname "$0") + +cd $BASEDIR/cargokit/build_tool + +# Check whether the precompiled binaries ara available for each architecture. +# Note: aaarch64-unknown-linux-gnu binary is missing as there is no +# cross-compilation available currently. + +dart run build_tool verify-binaries --manifest-dir=../../rust \ No newline at end of file diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 00000000..2aa6653f --- /dev/null +++ b/example/.gitignore @@ -0,0 +1,45 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +/ios/Podfile.lock +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release \ No newline at end of file diff --git a/example/README.md b/example/README.md new file mode 100644 index 00000000..5b6ea12f --- /dev/null +++ b/example/README.md @@ -0,0 +1,16 @@ +# bdk_flutter_example + +Demonstrates how to use the bdk_flutter plugin. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, samples, guidance on +mobile development, and a full API reference. diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml new file mode 100644 index 00000000..ae08714c --- /dev/null +++ b/example/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/example/android/.gitignore b/example/android/.gitignore new file mode 100644 index 00000000..6f568019 --- /dev/null +++ b/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle new file mode 100644 index 00000000..6036f812 --- /dev/null +++ b/example/android/app/build.gradle @@ -0,0 +1,72 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "io.bdk.f.bdk_flutter_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. + minSdkVersion 23 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } + namespace 'io.bdk.f.bdk_flutter_example' +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..4d959102 --- /dev/null +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..d56a0b37 --- /dev/null +++ b/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + diff --git a/example/android/app/src/main/kotlin/io/bdk/f/bdk_flutter_example/MainActivity.kt b/example/android/app/src/main/kotlin/io/bdk/f/bdk_flutter_example/MainActivity.kt new file mode 100644 index 00000000..ecb6d2f9 --- /dev/null +++ b/example/android/app/src/main/kotlin/io/bdk/f/bdk_flutter_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.bdk.f.bdk_flutter_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 00000000..c03a191c --- /dev/null +++ b/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/example/android/app/src/main/res/drawable/launch_background.xml b/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..0db4a835 --- /dev/null +++ b/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 00000000..06952be7 --- /dev/null +++ b/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..cb1ef880 --- /dev/null +++ b/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..4d959102 --- /dev/null +++ b/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example/android/build.gradle b/example/android/build.gradle new file mode 100644 index 00000000..5c8d9b8f --- /dev/null +++ b/example/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.2.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/example/android/gradle.properties b/example/android/gradle.properties new file mode 100644 index 00000000..94adc3a3 --- /dev/null +++ b/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..cc5527d7 --- /dev/null +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle new file mode 100644 index 00000000..44e62bcf --- /dev/null +++ b/example/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/example/integration_test /multi_sig_test.dart b/example/integration_test /multi_sig_test.dart new file mode 100644 index 00000000..d3ad408b --- /dev/null +++ b/example/integration_test /multi_sig_test.dart @@ -0,0 +1,167 @@ +import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +/// Derives extended descriptor keys (secret and public) based on the provided +/// hardened and unhardened derivation paths and mnemonic. +Future<(DescriptorSecretKey, DescriptorPublicKey)> deriveDescriptorKeys( + DerivationPath hardenedPath, + DerivationPath unHardenedPath, + Mnemonic mnemonic, +) async { + // Create the root secret key from the mnemonic + final secretKey = await DescriptorSecretKey.create( + mnemonic: mnemonic, network: Network.signet); + + // Derive the key at the hardened path + final derivedSecretKey = await secretKey.derive(hardenedPath); + + // Extend the derived secret key further using the unhardened path + final derivedExtendedSecretKey = + await derivedSecretKey.extend(unHardenedPath); + + // Convert the derived secret key to its public counterpart + final publicKey = derivedSecretKey.toPublic(); + + // Extend the public key using the same unhardened path + final derivedExtendedPublicKey = await publicKey.extend(path: unHardenedPath); + + return (derivedExtendedSecretKey, derivedExtendedPublicKey); +} + +/// Constructs a wallet descriptor using timelock conditions and public keys. +String createWalletDescriptor( + String primaryReceivingSecret, // Alice's descriptor derived from m/0 + String secondaryReceivingPublic, // Bob's public key derived from m/0 + int primaryTimelock, // Alice's timelock + int secondaryTimelock, // Bob's timelock + String primaryChangePublic, // Alice's public key derived from m/1 + String secondaryChangePublic, // Bob's public key derived from m/1 +) { + // Define the multi-sig condition based on timelock priority + String multi = (primaryTimelock < secondaryTimelock) + ? 'multi(2,$primaryReceivingSecret,$secondaryReceivingPublic)' + : 'multi(2,$secondaryReceivingPublic,$primaryReceivingSecret)'; + + // Define the timelock conditions for Bob and Alice + String timelockBob = + 'and_v(v:older($secondaryTimelock),pk($secondaryChangePublic))'; + String timelockAlice = + 'and_v(v:older($primaryTimelock),pk($primaryChangePublic))'; + + // Combine the timelock conditions + String timelockCondition = (primaryTimelock < secondaryTimelock) + ? 'or_i($timelockAlice,$timelockBob)' + : 'or_i($timelockBob,$timelockAlice)'; + + // Return the final wallet descriptor + return 'wsh(or_d($multi,$timelockCondition))'; +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('Time-locked multi-sig wallet synchronization', () { + setUp(() async { + // Setup for test group + }); + + test("Alice and Bob should have the same initial address and balance", + () async { + // Define mnemonics for Alice and Bob + final alice = await Mnemonic.fromString( + 'thumb member wage display inherit music elevator need side setup tube panther broom giant auction banner split potato'); + final bob = await Mnemonic.fromString( + 'tired shine hat tired hover timber reward bridge verb aerobic safe economy'); + + // Define timelocks for Alice and Bob + const aliceTimelock = 25; + const bobTimeLock = 35; + + // Define derivation paths + final hardenedDerivationPath = + await DerivationPath.create(path: "m/84h/1h/0h"); + final receivingDerivationPath = await DerivationPath.create(path: "m/0"); + final changeDerivationPath = await DerivationPath.create(path: "m/1"); + + // Derive keys for Alice + final (aliceReceivingSecretKey, aliceReceivingPublicKey) = + await deriveDescriptorKeys( + hardenedDerivationPath, receivingDerivationPath, alice); + final (aliceChangeSecretKey, aliceChangePublicKey) = + await deriveDescriptorKeys( + hardenedDerivationPath, changeDerivationPath, alice); + + // Derive keys for Bob + final (bobReceivingSecretKey, bobReceivingPublicKey) = + await deriveDescriptorKeys( + hardenedDerivationPath, receivingDerivationPath, bob); + final (bobChangeSecretKey, bobChangePublicKey) = + await deriveDescriptorKeys( + hardenedDerivationPath, changeDerivationPath, bob); + + // Create wallet descriptors for Alice and Bob + final aliceDescriptor = createWalletDescriptor( + aliceReceivingSecretKey.toString(), + bobReceivingPublicKey.toString(), + aliceTimelock, + bobTimeLock, + aliceChangePublicKey.toString(), + bobChangePublicKey.toString()); + final bobDescriptor = createWalletDescriptor( + bobReceivingSecretKey.toString(), + aliceReceivingPublicKey.toString(), + bobTimeLock, + aliceTimelock, + bobChangePublicKey.toString(), + aliceChangePublicKey.toString()); + + // Debug print descriptors + debugPrint("Alice's descriptor: $aliceDescriptor"); + debugPrint("Bob's descriptor: $bobDescriptor"); + + // Create wallets + final aliceWallet = await Wallet.create( + descriptor: await Descriptor.create( + descriptor: aliceDescriptor, network: Network.signet), + network: Network.signet, + databaseConfig: const DatabaseConfig.memory()); + final bobWallet = await Wallet.create( + descriptor: await Descriptor.create( + descriptor: bobDescriptor, network: Network.signet), + network: Network.signet, + databaseConfig: const DatabaseConfig.memory()); + + // Get initial addresses + final aliceAddress = aliceWallet + .getAddress(addressIndex: const AddressIndex.peek(index: 0)) + .address + .toString(); + final bobAddress = bobWallet + .getAddress(addressIndex: const AddressIndex.peek(index: 0)) + .address + .toString(); + assert(aliceAddress == bobAddress, "Addresses should match"); + + debugPrint("Alice's receiving address: $aliceAddress"); + debugPrint("Bob's receiving address: $bobAddress"); + + // Sync wallets + final blockchain = await Blockchain.createMutinynet(); + debugPrint("Syncing Bob's wallet..."); + await bobWallet.sync(blockchain: blockchain); + debugPrint("Syncing Alice's wallet..."); + await aliceWallet.sync(blockchain: blockchain); + debugPrint("Synchronization complete"); + + // Check balances + final bobBalance = bobWallet.getBalance().total.toInt(); + final aliceBalance = aliceWallet.getBalance().total.toInt(); + assert(bobBalance == aliceBalance, "Balances should match"); + + debugPrint("Alice's balance: $aliceBalance"); + debugPrint("Bob's balance: $bobBalance"); + }); + }); +} diff --git a/example/ios/.gitignore b/example/ios/.gitignore new file mode 100644 index 00000000..7a7f9873 --- /dev/null +++ b/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..7c569640 --- /dev/null +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..ec97fc6f --- /dev/null +++ b/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..c4855bfe --- /dev/null +++ b/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/example/ios/Podfile b/example/ios/Podfile new file mode 100644 index 00000000..70212f20 --- /dev/null +++ b/example/ios/Podfile @@ -0,0 +1,40 @@ +platform :ios, '12.0' + +# 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', '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 Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..146ebe1c --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,557 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + DAD25A380C8D08DC402ECE34 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45B80BDED127BA4FBE468995 /* Pods_Runner.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 32F77E949DF1B3A3BF65C47D /* 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 = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 42B600B2EA815C3C886B7896 /* 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 = ""; }; + 45B80BDED127BA4FBE468995 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9D82A3F5226CE72EC4665159 /* 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 */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DAD25A380C8D08DC402ECE34 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + DF292E499D171B0BBD72CC11 /* Pods */, + CFD36C00495802A0DEF4CE43 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + CFD36C00495802A0DEF4CE43 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 45B80BDED127BA4FBE468995 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + DF292E499D171B0BBD72CC11 /* Pods */ = { + isa = PBXGroup; + children = ( + 9D82A3F5226CE72EC4665159 /* Pods-Runner.debug.xcconfig */, + 32F77E949DF1B3A3BF65C47D /* Pods-Runner.release.xcconfig */, + 42B600B2EA815C3C886B7896 /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 77FC9EC9C7EB41059BB74F4A /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + F21923F72FCD31730B9E86ED /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 77FC9EC9C7EB41059BB74F4A /* [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; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + F21923F72FCD31730B9E86ED /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 6477GJYWXR; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.bdkFlutterExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 6477GJYWXR; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.bdkFlutterExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 6477GJYWXR; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.bdkFlutterExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..5e31d3d3 --- /dev/null +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..21a3cc14 --- /dev/null +++ b/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..b6363034 --- /dev/null +++ b/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..e882ab98 --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images": [ + { + "size": "20x20", + "idiom": "iphone", + "filename": "Icon-App-20x20@2x.png", + "scale": "2x" + }, + { + "size": "20x20", + "idiom": "iphone", + "filename": "Icon-App-20x20@3x.png", + "scale": "3x" + }, + { + "size": "29x29", + "idiom": "iphone", + "filename": "Icon-App-29x29@1x.png", + "scale": "1x" + }, + { + "size": "29x29", + "idiom": "iphone", + "filename": "Icon-App-29x29@2x.png", + "scale": "2x" + }, + { + "size": "29x29", + "idiom": "iphone", + "filename": "Icon-App-29x29@3x.png", + "scale": "3x" + }, + { + "size": "40x40", + "idiom": "iphone", + "filename": "Icon-App-40x40@2x.png", + "scale": "2x" + }, + { + "size": "40x40", + "idiom": "iphone", + "filename": "Icon-App-40x40@3x.png", + "scale": "3x" + }, + { + "size": "60x60", + "idiom": "iphone", + "filename": "Icon-App-60x60@2x.png", + "scale": "2x" + }, + { + "size": "60x60", + "idiom": "iphone", + "filename": "Icon-App-60x60@3x.png", + "scale": "3x" + }, + { + "size": "20x20", + "idiom": "ipad", + "filename": "Icon-App-20x20@1x.png", + "scale": "1x" + }, + { + "size": "20x20", + "idiom": "ipad", + "filename": "Icon-App-20x20@2x.png", + "scale": "2x" + }, + { + "size": "29x29", + "idiom": "ipad", + "filename": "Icon-App-29x29@1x.png", + "scale": "1x" + }, + { + "size": "29x29", + "idiom": "ipad", + "filename": "Icon-App-29x29@2x.png", + "scale": "2x" + }, + { + "size": "40x40", + "idiom": "ipad", + "filename": "Icon-App-40x40@1x.png", + "scale": "1x" + }, + { + "size": "40x40", + "idiom": "ipad", + "filename": "Icon-App-40x40@2x.png", + "scale": "2x" + }, + { + "size": "76x76", + "idiom": "ipad", + "filename": "Icon-App-76x76@1x.png", + "scale": "1x" + }, + { + "size": "76x76", + "idiom": "ipad", + "filename": "Icon-App-76x76@2x.png", + "scale": "2x" + }, + { + "size": "83.5x83.5", + "idiom": "ipad", + "filename": "Icon-App-83.5x83.5@2x.png", + "scale": "2x" + }, + { + "size": "1024x1024", + "idiom": "ios-marketing", + "filename": "Icon-App-1024x1024@1x.png", + "scale": "1x" + } + ], + "info": { + "version": 1, + "author": "xcode" + } +} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..dc9ada4725e9b0ddb1deab583e5b5102493aa332 GIT binary patch literal 10932 zcmeHN2~<R zh`|8`A_PQ1nSu(UMFx?8j8PC!!VDphaL#`F42fd#7Vlc`zIE4n%Y~eiz4y1j|NDpi z?<@|pSJ-HM`qifhf@m%MamgwK83`XpBA<+azdF#2QsT{X@z0A9Bq>~TVErigKH1~P zRX-!h-f0NJ4Mh++{D}J+K>~~rq}d%o%+4dogzXp7RxX4C>Km5XEI|PAFDmo;DFm6G zzjVoB`@qW98Yl0Kvc-9w09^PrsobmG*Eju^=3f?0o-t$U)TL1B3;sZ^!++3&bGZ!o-*6w?;oOhf z=A+Qb$scV5!RbG+&2S}BQ6YH!FKb0``VVX~T$dzzeSZ$&9=X$3)_7Z{SspSYJ!lGE z7yig_41zpQ)%5dr4ff0rh$@ky3-JLRk&DK)NEIHecf9c*?Z1bUB4%pZjQ7hD!A0r-@NF(^WKdr(LXj|=UE7?gBYGgGQV zidf2`ZT@pzXf7}!NH4q(0IMcxsUGDih(0{kRSez&z?CFA0RVXsVFw3^u=^KMtt95q z43q$b*6#uQDLoiCAF_{RFc{!H^moH_cmll#Fc^KXi{9GDl{>%+3qyfOE5;Zq|6#Hb zp^#1G+z^AXfRKaa9HK;%b3Ux~U@q?xg<2DXP%6k!3E)PA<#4$ui8eDy5|9hA5&{?v z(-;*1%(1~-NTQ`Is1_MGdQ{+i*ccd96ab$R$T3=% zw_KuNF@vI!A>>Y_2pl9L{9h1-C6H8<)J4gKI6{WzGBi<@u3P6hNsXG=bRq5c+z;Gc3VUCe;LIIFDmQAGy+=mRyF++u=drBWV8-^>0yE9N&*05XHZpPlE zxu@?8(ZNy7rm?|<+UNe0Vs6&o?l`Pt>P&WaL~M&#Eh%`rg@Mbb)J&@DA-wheQ>hRV z<(XhigZAT z>=M;URcdCaiO3d^?H<^EiEMDV+7HsTiOhoaMX%P65E<(5xMPJKxf!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Yy4y||C+SwQ! z)KM&$7_tyM`sljP2fz6&Z;jxRn{Wup8IOUx8D4uh&(=O zx-7$a;U><*5L^!%xRlw)vAbh;sdlR||& ze}8_8%)c2Fwy=F&H|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}JeGuMZk~LPi7{cidvUGB zAJ4LVeNV%XO>LTrklB#^-;8nb;}6l;1oW&WS=Mz*Az!4cqqQzbOSFq`$Q%PfD7srM zpKgP-D_0XPTRX*hAqeq0TDkJ;5HB1%$3Np)99#16c{ zJImlNL(npL!W|Gr_kxl1GVmF5&^$^YherS7+~q$p zt}{a=*RiD2Ikv6o=IM1kgc7zqpaZ;OB)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..f091b6b0bca859a3f474b03065bef75ba58a9e4c GIT binary patch literal 1588 zcmV-42Fv-0P)C1SqPt}wig>|5Crh^=oyX$BK<}M8eLU3e2hGT;=G|!_SP)7zNI6fqUMB=)y zRAZ>eDe#*r`yDAVgB_R*LB*MAc)8(b{g{9McCXW!lq7r(btRoB9!8B-#AI6JMb~YFBEvdsV)`mEQO^&#eRKx@b&x- z5lZm*!WfD8oCLzfHGz#u7sT0^VLMI1MqGxF^v+`4YYnVYgk*=kU?HsSz{v({E3lb9 z>+xILjBN)t6`=g~IBOelGQ(O990@BfXf(DRI5I$qN$0Gkz-FSc$3a+2fX$AedL4u{ z4V+5Ong(9LiGcIKW?_352sR;LtDPmPJXI{YtT=O8=76o9;*n%_m|xo!i>7$IrZ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?t@5_yHg6A8yI zC*%Wgg22K|8E#!~cTNYR~@Y9KepMPrrB8cABapAFa=`H+UGhkXUZV1GnwR1*lPyZ;*K(i~2gp|@bzp8}og7e*#% zEnr|^CWdVV!-4*Y_7rFvlww2Ze+>j*!Z!pQ?2l->4q#nqRu9`ELo6RMS5=br47g_X zRw}P9a7RRYQ%2Vsd0Me{_(EggTnuN6j=-?uFS6j^u69elMypu?t>op*wBx<=Wx8?( ztpe^(fwM6jJX7M-l*k3kEpWOl_Vk3@(_w4oc}4YF4|Rt=2V^XU?#Yz`8(e?aZ@#li0n*=g^qOcVpd-Wbok=@b#Yw zqn8u9a)z>l(1kEaPYZ6hwubN6i<8QHgsu0oE) ziJ(p;Wxm>sf!K+cw>R-(^Y2_bahB+&KI9y^);#0qt}t-$C|Bo71lHi{_+lg#f%RFy z0um=e3$K3i6K{U_4K!EX?F&rExl^W|G8Z8;`5z-k}OGNZ0#WVb$WCpQu-_YsiqKP?BB# vzVHS-CTUF4Ozn5G+mq_~Qqto~ahA+K`|lyv3(-e}00000NkvXXu0mjfd`9t{ literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d0ef06e7edb86cdfe0d15b4b0d98334a86163658 GIT binary patch literal 1716 zcmds$`#;kQ7{|XelZftyR5~xW7?MLxS4^|Hw3&P7^y)@A9Fj{Xm1~_CIV^XZ%SLBn zA;!r`GqGHg=7>xrB{?psZQs88ZaedDoagm^KF{a*>G|dJWRSe^I$DNW008I^+;Kjt z>9p3GNR^I;v>5_`+91i(*G;u5|L+Bu6M=(afLjtkya#yZ175|z$pU~>2#^Z_pCZ7o z1c6UNcv2B3?; zX%qdxCXQpdKRz=#b*q0P%b&o)5ZrNZt7$fiETSK_VaY=mb4GK`#~0K#~9^ zcY!`#Af+4h?UMR-gMKOmpuYe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%)c2Fwy=F&H|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}JeGuMZk~LPi7{cidvUGB zAJ4LVeNV%XO>LTrklB#^-;8nb;}6l;1oW&WS=Mz*Az!4cqqQzbOSFq`$Q%PfD7srM zpKgP-D_0XPTRX*hAqeq0TDkJ;5HB1%$3Np)99#16c{ zJImlNL(npL!W|Gr_kxl1GVmF5&^$^YherS7+~q$p zt}{a=*RiD2Ikv6o=IM1kgc7zqpaZ;OB)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c8f9ed8f5cee1c98386d13b17e89f719e83555b2 GIT binary patch literal 1895 zcmV-t2blPYP)FQtfgmafE#=YDCq`qUBt#QpG%*H6QHY765~R=q zZ6iudfM}q!Pz#~9JgOi8QJ|DSu?1-*(kSi1K4#~5?#|rh?sS)(-JQqX*}ciXJ56_H zdw=^s_srbAdqxlvGyrgGet#6T7_|j;95sL%MtM;q86vOxKM$f#puR)Bjv9Zvz9-di zXOTSsZkM83)E9PYBXC<$6(|>lNLVBb&&6y{NByFCp%6+^ALR@NCTse_wqvNmSWI-m z!$%KlHFH2omF!>#%1l3LTZg(s7eof$7*xB)ZQ0h?ejh?Ta9fDv59+u#MokW+1t8Zb zgHv%K(u9G^Lv`lh#f3<6!JVTL3(dCpxHbnbA;kKqQyd1~^Xe0VIaYBSWm6nsr;dFj z4;G-RyL?cYgsN1{L4ZFFNa;8)Rv0fM0C(~Tkit94 zz#~A)59?QjD&pAPSEQ)p8gP|D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7wQ176|FdW2m?&`qa(ScO^CFPR80HucLHOTy%5s*HR0^8)i h0WYBP*#0Ks^FNSabJA*5${_#%002ovPDHLkV1oKhTl@e3 literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22 GIT binary patch literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`sk6!QYtBa ztlZI#nu$8lJ^q2Z79UTgZe>BU73(Aospiq+?SdMt8lDZ;*?@tyWVZVS_Q7S&*tJaiRlJ z+aSMOmbg3@h5}v;A*c8SbqM3icg-`Cnwl;7Ts%A1RkNIp+Txl-Ckkvg4oxrqGA5ewEgYqwtECD<_3Egu)xGllKt&J8g&+=ac@Jq4-?w6M3b*>w5 z69N3O%=I^6&UL5gZ!}trC7bUj*12xLdkNs~Bz4QdJJ*UDZox2UGR}SNg@lmOvhCc~ z*f_UeXv(=#I#*7>VZx2ObEN~UoGUTl=-@)E;YtCRZ>SVp$p9yG5hEFZ!`wI!spd)n zSk+vK0Vin7FL{7f&6OB%f;SH22dtbcF<|9fi2Fp%q4kxL!b1#l^)8dUwJ zwEf{(wJj@8iYDVnKB`eSU+;ml-t2`@%_)0jDM`+a46xhDbBj2+&Ih>1A>6aky#(-SYyE{R3f#y57wfLs z6w1p~$bp;6!9DX$M+J~S@D6vJAaElETnsX4h9a5tvPhC3L@qB~bOzkL@^z0k_hS{T4PF*TDrgdXp+dzsE? z>V|VR035Pl9n5&-RePFdS{7KAr2vPOqR9=M$vXA1Yy5>w;EsF`;OK{2pkn-kpp9Pw z)r;5JfJKKaT$4qCb{TaXHjb$QA{y0EYy*+b1XI;6Ah- zw13P)xT`>~eFoJC!>{2XL(a_#upp3gaR1#5+L(Jmzp4TBnx{~WHedpJ1ch8JFk~Sw z>F+gN+i+VD?gMXwcIhn8rz`>e>J^TI3E-MW>f}6R-pL}>WMOa0k#jN+`RyUVUC;#D zg|~oS^$6%wpF{^Qr+}X>0PKcr3Fc&>Z>uv@C);pwDs@2bZWhYP!rvGx?_|q{d`t<*XEb#=aOb=N+L@CVBGqImZf&+a zCQEa3$~@#kC);pasdG=f6tuIi0PO-y&tvX%>Mv=oY3U$nD zJ#gMegnQ46pq+3r=;zmgcG+zRc9D~c>z+jo9&D+`E6$LmyFqlmCYw;-Zooma{sR@~ z)_^|YL1&&@|GXo*pivH7k!msl+$Sew3%XJnxajt0K%3M6Bd&YFNy9}tWG^aovK2eX z1aL1%7;KRDrA@eG-Wr6w+;*H_VD~qLiVI`{_;>o)k`{8xa3EJT1O_>#iy_?va0eR? zDV=N%;Zjb%Z2s$@O>w@iqt!I}tLjGk!=p`D23I}N4Be@$(|iSA zf3Ih7b<{zqpDB4WF_5X1(peKe+rASze%u8eKLn#KKXt;UZ+Adf$_TO+vTqshLLJ5c z52HucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22 GIT binary patch literal 2665 zcmV-v3YPVWP)oFh3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6tuIi0PO-y&tvX%>Mv=oY3U$nD zJ#gMegnQ46pq+3r=;zmgcG+zRc9D~c>z+jo9&D+`E6$LmyFqlmCYw;-Zooma{sR@~ z)_^|YL1&&@|GXo*pivH7k!msl+$Sew3%XJnxajt0K%3M6Bd&YFNy9}tWG^aovK2eX z1aL1%7;KRDrA@eG-Wr6w+;*H_VD~qLiVI`{_;>o)k`{8xa3EJT1O_>#iy_?va0eR? zDV=N%;Zjb%Z2s$@O>w@iqt!I}tLjGk!=p`D23I}N4Be@$(|iSA zf3Ih7b<{zqpDB4WF_5X1(peKe+rASze%u8eKLn#KKXt;UZ+Adf$_TO+vTqshLLJ5c z52HucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..75b2d164a5a98e212cca15ea7bf2ab5de5108680 GIT binary patch literal 3831 zcmVjJBgitF5mAp-i>4+KS_oR{|13AP->1TD4=w)g|)JHOx|a2Wk1Va z!k)vP$UcQ#mdj%wNQoaJ!w>jv_6&JPyutpQps?s5dmDQ>`%?Bvj>o<%kYG!YW6H-z zu`g$@mp`;qDR!51QaS}|ZToSuAGcJ7$2HF0z`ln4t!#Yg46>;vGG9N9{V@9z#}6v* zfP?}r6b{*-C*)(S>NECI_E~{QYzN5SXRmVnP<=gzP+_Sp(Aza_hKlZ{C1D&l*(7IKXxQC1Z9#6wx}YrGcn~g%;icdw>T0Rf^w0{ z$_w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An=kf_6z^(TZUa4Eelh{{ zqFX-#dY(EV@7l$NE&kv9u9BR8&Ojd#ZGJ6l8_BW}^r?DIS_rU2(XaGOK z225E@kH5Opf+CgD^{y29jD4gHbGf{1MD6ggQ&%>UG4WyPh5q_tb`{@_34B?xfSO*| zZv8!)q;^o-bz`MuxXk*G^}(6)ACb@=Lfs`Hxoh>`Y0NE8QRQ!*p|SH@{r8=%RKd4p z+#Ty^-0kb=-H-O`nAA3_6>2z(D=~Tbs(n8LHxD0`R0_ATFqp-SdY3(bZ3;VUM?J=O zKCNsxsgt@|&nKMC=*+ZqmLHhX1KHbAJs{nGVMs6~TiF%Q)P@>!koa$%oS zjXa=!5>P`vC-a}ln!uH1ooeI&v?=?v7?1n~P(wZ~0>xWxd_Aw;+}9#eULM7M8&E?Y zC-ZLhi3RoM92SXUb-5i-Lmt5_rfjE{6y^+24`y$1lywLyHO!)Boa7438K4#iLe?rh z2O~YGSgFUBH?og*6=r9rme=peP~ah`(8Zt7V)j5!V0KPFf_mebo3z95U8(up$-+EA^9dTRLq>Yl)YMBuch9%=e5B`Vnb>o zt03=kq;k2TgGe4|lGne&zJa~h(UGutjP_zr?a7~#b)@15XNA>Dj(m=gg2Q5V4-$)D|Q9}R#002ovPDHLkV1o7DH3k3x literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..c4df70d39da7941ef3f6dcb7f06a192d8dcb308d GIT binary patch literal 1888 zcmV-m2cP(fP)x~L`~4d)Rspd&<9kFh{hn*KP1LP0~$;u(LfAu zp%fx&qLBcRHx$G|3q(bv@+b;o0*D|jwD-Q9uQR(l*ST}s+uPgQ-MeFwZ#GS?b332? z&Tk$&_miXn3IGq)AmQ)3sisq{raD4(k*bHvpCe-TdWq^NRTEVM)i9xbgQ&ccnUVx* zEY%vS%gDcSg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Gw(fg>L zh)T5Ljb%lWE;V9L!;Cqk>AV1(rULYF07ZBJbGb9qbSoLAd;in9{)95YqX$J43-dY7YU*k~vrM25 zxh5_IqO0LYZW%oxQ5HOzmk4x{atE*vipUk}sh88$b2tn?!ujEHn`tQLe&vo}nMb&{ zio`xzZ&GG6&ZyN3jnaQy#iVqXE9VT(3tWY$n-)uWDQ|tc{`?fq2F`oQ{;d3aWPg4Hp-(iE{ry>MIPWL> iW8Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..2b467c8e --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,8 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in +this directory. + +You can also do it by opening your Flutter project's Xcode project +with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and +dropping in the desired images. \ No newline at end of file diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist new file mode 100644 index 00000000..c9c529c0 --- /dev/null +++ b/example/ios/Runner/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Bdk Flutter + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + bdk_flutter_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..308a2a56 --- /dev/null +++ b/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/example/lib/bdk_library.dart b/example/lib/bdk_library.dart new file mode 100644 index 00000000..db4ecce9 --- /dev/null +++ b/example/lib/bdk_library.dart @@ -0,0 +1,119 @@ +import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:flutter/foundation.dart'; + +class BdkLibrary { + Future createMnemonic() async { + final res = await Mnemonic.create(WordCount.words12); + return res; + } + + Future createDescriptor(Mnemonic mnemonic) async { + final descriptorSecretKey = await DescriptorSecretKey.create( + network: Network.signet, + mnemonic: mnemonic, + ); + if (kDebugMode) { + print(descriptorSecretKey.toPublic()); + print(descriptorSecretKey.secretBytes()); + print(descriptorSecretKey); + } + + final descriptor = await Descriptor.newBip84( + secretKey: descriptorSecretKey, + network: Network.signet, + keychain: KeychainKind.externalChain); + return descriptor; + } + + Future initializeBlockchain() async { + return Blockchain.createMutinynet(); + } + + Future restoreWallet(Descriptor descriptor) async { + final wallet = await Wallet.create( + descriptor: descriptor, + network: Network.testnet, + databaseConfig: const DatabaseConfig.memory()); + return wallet; + } + + Future sync(Blockchain blockchain, Wallet wallet) async { + try { + await wallet.sync(blockchain: blockchain); + } on FormatException catch (e) { + debugPrint(e.message); + } + } + + AddressInfo getAddressInfo(Wallet wallet) { + return wallet.getAddress(addressIndex: const AddressIndex.increase()); + } + + Future getPsbtInput( + Wallet wallet, LocalUtxo utxo, bool onlyWitnessUtxo) async { + final input = + await wallet.getPsbtInput(utxo: utxo, onlyWitnessUtxo: onlyWitnessUtxo); + return input; + } + + List getUnConfirmedTransactions(Wallet wallet) { + List unConfirmed = []; + final res = wallet.listTransactions(includeRaw: true); + for (var e in res) { + if (e.confirmationTime == null) unConfirmed.add(e); + } + return unConfirmed; + } + + List getConfirmedTransactions(Wallet wallet) { + List confirmed = []; + final res = wallet.listTransactions(includeRaw: true); + + for (var e in res) { + if (e.confirmationTime != null) confirmed.add(e); + } + return confirmed; + } + + Future getBalance(Wallet wallet) async { + return wallet.getBalance(); + } + + List listUnspent(Wallet wallet) { + return wallet.listUnspent(); + } + + Future estimateFeeRate( + int blocks, + Blockchain blockchain, + ) async { + final feeRate = await blockchain.estimateFee(target: BigInt.from(blocks)); + return feeRate; + } + + sendBitcoin(Blockchain blockchain, Wallet wallet, String receiverAddress, + int amountSat) async { + try { + final txBuilder = TxBuilder(); + final address = await Address.fromString( + s: receiverAddress, network: wallet.network()); + final script = address.scriptPubkey(); + final feeRate = await estimateFeeRate(25, blockchain); + final (psbt, _) = await txBuilder + .addRecipient(script, BigInt.from(amountSat)) + .feeRate(feeRate.satPerVb) + .finish(wallet); + final isFinalized = await wallet.sign(psbt: psbt); + if (isFinalized) { + final tx = psbt.extractTx(); + final res = await blockchain.broadcast(transaction: tx); + debugPrint(res); + } else { + debugPrint("psbt not finalized!"); + } + // Isolate.run(() async => {}); + } on Exception catch (_) { + rethrow; + } + } +} diff --git a/example/lib/main.dart b/example/lib/main.dart new file mode 100644 index 00000000..3b7e0e3b --- /dev/null +++ b/example/lib/main.dart @@ -0,0 +1,6 @@ +import 'package:bdk_flutter_example/wallet.dart'; +import 'package:flutter/material.dart'; + +void main() { + runApp(const ExampleWallet()); +} diff --git a/example/lib/wallet.dart b/example/lib/wallet.dart new file mode 100644 index 00000000..159e3685 --- /dev/null +++ b/example/lib/wallet.dart @@ -0,0 +1,325 @@ +import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +import 'bdk_library.dart'; + +class ExampleWallet extends StatefulWidget { + const ExampleWallet({super.key}); + + @override + State createState() => _ExampleWalletState(); +} + +class _ExampleWalletState extends State { + String displayText = ""; + BigInt balance = BigInt.zero; + late Wallet wallet; + Blockchain? blockchain; + BdkLibrary lib = BdkLibrary(); + @override + void initState() { + restoreWallet(); + super.initState(); + } + + generateMnemonicKeys() async { + final res = await lib.createMnemonic(); + setState(() { + displayText = res.toString(); + }); + if (kDebugMode) { + print(res.toString()); + } + } + + restoreWallet() async { + final aliceMnemonic = await Mnemonic.fromString( + 'give rate trigger race embrace dream wish column upon steel wrist rice'); + final aliceDescriptor = await lib.createDescriptor(aliceMnemonic); + wallet = await lib.restoreWallet(aliceDescriptor); + setState(() { + displayText = "Wallets restored"; + }); + } + + sync() async { + blockchain ??= await lib.initializeBlockchain(); + await lib.sync(blockchain!, wallet); + } + + getNewAddress() async { + final addressInfo = lib.getAddressInfo(wallet); + debugPrint(addressInfo.address.toString()); + + setState(() { + displayText = + "Address: ${addressInfo.address.toString()} \n Index: ${addressInfo.index}"; + }); + } + + getUnConfirmedTransactions() async { + final unConfirmed = lib.getUnConfirmedTransactions(wallet); + setState(() { + displayText = "You have ${unConfirmed.length} unConfirmed transactions"; + }); + for (var e in unConfirmed) { + final txOut = await e.transaction!.output(); + if (kDebugMode) { + print(" txid: ${e.txid}"); + print(" fee: ${e.fee}"); + print(" received: ${e.received}"); + print(" send: ${e.sent}"); + print(" output address: ${txOut.last.scriptPubkey.bytes}"); + print("==========================="); + } + } + } + + getConfirmedTransactions() async { + final confirmed = lib.getConfirmedTransactions(wallet); + setState(() { + displayText = "You have ${confirmed.length} confirmed transactions"; + }); + for (var e in confirmed) { + if (kDebugMode) { + print(" txid: ${e.txid}"); + print(" confirmationTime: ${e.confirmationTime?.timestamp}"); + print(" confirmationTime Height: ${e.confirmationTime?.height}"); + final txIn = await e.transaction!.input(); + final txOut = await e.transaction!.output(); + print("=============TxIn=============="); + for (var e in txIn) { + print(" previousOutout Txid: ${e.previousOutput.txid}"); + print(" previousOutout vout: ${e.previousOutput.vout}"); + print(" witness: ${e.witness}"); + } + print("=============TxOut=============="); + for (var e in txOut) { + print(" script: ${e.scriptPubkey.bytes}"); + print(" value: ${e.value}"); + } + print("========================================"); + } + } + } + + getBalance() async { + final alice = await lib.getBalance(wallet); + setState(() { + balance = alice.total; + displayText = + "Total Balance: ${alice.total} \n Immature Balance: ${alice.immature}"; + }); + } + + listUnspent() async { + final res = lib.listUnspent(wallet); + for (var e in res) { + setState(() { + displayText = + " OutPoint: { txid:${res.first.outpoint.txid}, vout: ${res.first.outpoint.vout} }"; + }); + if (kDebugMode) { + print("isSpent: ${e.isSpent}"); + print( + "outPoint: { txid:${e.outpoint.txid}, vout: ${e.outpoint.vout} } "); + print( + "txout: { address:${e.txout.scriptPubkey.bytes}, value: ${e.txout.value} }"); + print("==========================="); + } + } + } + + Future getBlockHeight() async { + final res = await blockchain!.getHeight(); + if (kDebugMode) { + print(res); + } + setState(() { + displayText = "Height: $res"; + }); + return res; + } + + getBlockHash() async { + final height = await getBlockHeight(); + final blockHash = await blockchain!.getBlockHash(height: height); + setState(() { + displayText = "BlockHash: $blockHash"; + }); + if (kDebugMode) { + print(blockHash); + } + } + + sendBit(int amountSat) async { + await lib.sendBitcoin(blockchain!, wallet, + "tb1qyhssajdx5vfxuatt082m9tsfmxrxludgqwe52f", amountSat); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + home: Scaffold( + appBar: AppBar( + backgroundColor: Colors.blue, + elevation: 0, + centerTitle: false, + title: const Text('Bdk Wallet', + style: TextStyle( + fontWeight: FontWeight.w900, + fontSize: 16, + color: Colors.white)), // Set this heigh + ), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.only(bottom: 50), + padding: const EdgeInsets.only(left: 15, right: 15, bottom: 20), + color: Colors.blue, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text("Response: ", + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 12, + fontWeight: FontWeight.w700)), + Expanded( + child: SelectableText( + displayText, + maxLines: 3, + textAlign: TextAlign.start, + style: const TextStyle( + color: Colors.white, + fontSize: 12, + fontWeight: FontWeight.w700), + ), + ), + ], + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + balance.toString(), + style: const TextStyle( + fontWeight: FontWeight.w900, + fontSize: 40, + color: Colors.blue), + ), + const Text( + " sats", + style: TextStyle( + fontWeight: FontWeight.w900, + fontSize: 20, + color: Colors.blue), + ), + ], + ), + TextButton( + onPressed: () => getNewAddress(), + child: const Text( + 'Press to create new Address', + style: TextStyle( + color: Colors.indigoAccent, + fontSize: 12, + height: 1.5, + fontWeight: FontWeight.w800), + )), + TextButton( + onPressed: () async { + await sync(); + }, + child: const Text( + 'Press to sync', + style: TextStyle( + color: Colors.indigoAccent, + fontSize: 12, + height: 1.5, + fontWeight: FontWeight.w800), + )), + TextButton( + onPressed: () => getConfirmedTransactions(), + child: const Text( + 'Get ConfirmedTransactions', + style: TextStyle( + color: Colors.indigoAccent, + fontSize: 12, + height: 1.5, + fontWeight: FontWeight.w800), + )), + TextButton( + onPressed: () => getUnConfirmedTransactions(), + child: const Text( + 'getPendingTransactions', + style: TextStyle( + color: Colors.indigoAccent, + fontSize: 12, + height: 1.5, + fontWeight: FontWeight.w800), + )), + TextButton( + onPressed: () => getBalance(), + child: const Text( + 'get Balance', + style: TextStyle( + color: Colors.indigoAccent, + fontSize: 12, + height: 1.5, + fontWeight: FontWeight.w800), + )), + TextButton( + onPressed: () => listUnspent(), + child: const Text( + 'list Unspent', + style: TextStyle( + color: Colors.indigoAccent, + fontSize: 12, + height: 1.5, + fontWeight: FontWeight.w800), + )), + TextButton( + onPressed: () => sendBit(100000), + child: const Text( + 'Press to send 1200 satoshi', + style: TextStyle( + color: Colors.indigoAccent, + fontSize: 12, + height: 1.5, + fontWeight: FontWeight.w800), + )), + TextButton( + onPressed: () => getBlockHash(), + child: const Text( + 'get BlockHash', + style: TextStyle( + color: Colors.indigoAccent, + fontSize: 12, + height: 1.5, + fontWeight: FontWeight.w800), + )), + TextButton( + onPressed: () => generateMnemonicKeys(), + child: const Text( + 'generate Mnemonic', + style: TextStyle( + color: Colors.indigoAccent, + fontSize: 12, + height: 1.5, + fontWeight: FontWeight.w800), + )), + ], + ), + ), + ), + ); + } +} 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..1f811a92 --- /dev/null +++ b/example/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '14.0' + +# 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..78c676da --- /dev/null +++ b/example/macos/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - bdk_flutter (0.31.3): + - FlutterMacOS + - FlutterMacOS (1.0.0) + +DEPENDENCIES: + - bdk_flutter (from `Flutter/ephemeral/.symlinks/plugins/bdk_flutter/macos`) + - FlutterMacOS (from `Flutter/ephemeral`) + +EXTERNAL SOURCES: + bdk_flutter: + :path: Flutter/ephemeral/.symlinks/plugins/bdk_flutter/macos + FlutterMacOS: + :path: Flutter/ephemeral + +SPEC CHECKSUMS: + bdk_flutter: d0437c6116753242241fed48270587542a636d40 + FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + +PODFILE CHECKSUM: 6acf97521436d16fc31cd5e1a02000905acdb3ae + +COCOAPODS: 1.15.2 diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..47e17ee2 --- /dev/null +++ b/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,791 @@ +// !$*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 */; }; + 4DC9B7747876A0FFEB72561D /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45E5FCC6A0CC76E43C906CAE /* Pods_RunnerTests.framework */; }; + 5E9CE529825D65D7646BA6CE /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CF6D2678C9D71A16234D97A5 /* Pods_Runner.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 = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 2776410C499C6CCE9E20D9CE /* 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 = ""; }; + 2E528ACB8C77AD5767B35CFE /* 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 = ""; }; + 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 /* bdk_flutter_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bdk_flutter_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 = ""; }; + 401216304B70411AE0A10C03 /* 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 = ""; }; + 45E5FCC6A0CC76E43C906CAE /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5888751D6342721B83E5C618 /* 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 = ""; }; + 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 = ""; }; + 9E06AB3C6C8CFA4961750B6D /* 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 = ""; }; + ABA8243B555D5099824DA8F1 /* 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 = ""; }; + CF6D2678C9D71A16234D97A5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4DC9B7747876A0FFEB72561D /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5E9CE529825D65D7646BA6CE /* 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 = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 4A50BCE68C4903267FD48E25 /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* bdk_flutter_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 = ""; + }; + 4A50BCE68C4903267FD48E25 /* Pods */ = { + isa = PBXGroup; + children = ( + 2E528ACB8C77AD5767B35CFE /* Pods-Runner.debug.xcconfig */, + 5888751D6342721B83E5C618 /* Pods-Runner.release.xcconfig */, + 2776410C499C6CCE9E20D9CE /* Pods-Runner.profile.xcconfig */, + 401216304B70411AE0A10C03 /* Pods-RunnerTests.debug.xcconfig */, + 9E06AB3C6C8CFA4961750B6D /* Pods-RunnerTests.release.xcconfig */, + ABA8243B555D5099824DA8F1 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + CF6D2678C9D71A16234D97A5 /* Pods_Runner.framework */, + 45E5FCC6A0CC76E43C906CAE /* 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 = ( + 70DF19CD3A6839B68909FBF5 /* [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 = ( + 61AAF25F365A4673AA6344C5 /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + 3B883BDF694F6878DE26C2F9 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* bdk_flutter_example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + 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 */, + ); + 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"; + }; + 3B883BDF694F6878DE26C2F9 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 61AAF25F365A4673AA6344C5 /* [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; + }; + 70DF19CD3A6839B68909FBF5 /* [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; + }; +/* 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 = 401216304B70411AE0A10C03 /* 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.bdkFlutterExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bdk_flutter_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/bdk_flutter_example"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9E06AB3C6C8CFA4961750B6D /* 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.bdkFlutterExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bdk_flutter_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/bdk_flutter_example"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = ABA8243B555D5099824DA8F1 /* 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.bdkFlutterExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bdk_flutter_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/bdk_flutter_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", + ); + 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", + ); + 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..4dc93e2a --- /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..8e02df28 --- /dev/null +++ b/example/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@main +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 0000000000000000000000000000000000000000..82b6f9d9a33e198f5747104729e1fcef999772a5 GIT binary patch literal 102994 zcmeEugo5nb1G~3xi~y`}h6XHx5j$(L*3|5S2UfkG$|UCNI>}4f?MfqZ+HW-sRW5RKHEm z^unW*Xx{AH_X3Xdvb%C(Bh6POqg==@d9j=5*}oEny_IS;M3==J`P0R!eD6s~N<36C z*%-OGYqd0AdWClO!Z!}Y1@@RkfeiQ$Ib_ z&fk%T;K9h`{`cX3Hu#?({4WgtmkR!u3ICS~|NqH^fdNz>51-9)OF{|bRLy*RBv#&1 z3Oi_gk=Y5;>`KbHf~w!`u}!&O%ou*Jzf|Sf?J&*f*K8cftMOKswn6|nb1*|!;qSrlw= zr-@X;zGRKs&T$y8ENnFU@_Z~puu(4~Ir)>rbYp{zxcF*!EPS6{(&J}qYpWeqrPWW< zfaApz%<-=KqxrqLLFeV3w0-a0rEaz9&vv^0ZfU%gt9xJ8?=byvNSb%3hF^X_n7`(fMA;C&~( zM$cQvQ|g9X)1AqFvbp^B{JEX$o;4iPi?+v(!wYrN{L}l%e#5y{j+1NMiT-8=2VrCP zmFX9=IZyAYA5c2!QO96Ea-6;v6*$#ZKM-`%JCJtrA3d~6h{u+5oaTaGE)q2b+HvdZ zvHlY&9H&QJ5|uG@w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VNkY literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..13b35eba55c6dabc3aac36f33d859266c18fa0d0 GIT binary patch literal 5680 zcmaiYXH?Tqu=Xz`p-L#B_gI#0we$cm_HcmYFP$?wjD#BaCN4mzC5#`>w9y6=ThxrYZc0WPXprg zYjB`UsV}0=eUtY$(P6YW}npdd;%9pi?zS3k-nqCob zSX_AQEf|=wYT3r?f!*Yt)ar^;l3Sro{z(7deUBPd2~(SzZ-s@0r&~Km2S?8r##9-< z)2UOSVaHqq6}%sA9Ww;V2LG=PnNAh6mA2iWOuV7T_lRDR z&N8-eN=U)-T|;wo^Wv=34wtV0g}sAAe}`Ph@~!|<;z7*K8(qkX0}o=!(+N*UWrkEja*$_H6mhK1u{P!AC39} z|3+Z(mAOq#XRYS)TLoHv<)d%$$I@+x+2)V{@o~~J-!YUI-Q9%!Ldi4Op&Lw&B>jj* zwAgC#Y>gbIqv!d|J5f!$dbCXoq(l3GR(S>(rtZ~Z*agXMMKN!@mWT_vmCbSd3dUUm z4M&+gz?@^#RRGal%G3dDvj7C5QTb@9+!MG+>0dcjtZEB45c+qx*c?)d<%htn1o!#1 zpIGonh>P1LHu3s)fGFF-qS}AXjW|M*2Xjkh7(~r(lN=o#mBD9?jt74=Rz85I4Nfx_ z7Z)q?!};>IUjMNM6ee2Thq7))a>My?iWFxQ&}WvsFP5LP+iGz+QiYek+K1`bZiTV- zHHYng?ct@Uw5!gquJ(tEv1wTrRR7cemI>aSzLI^$PxW`wL_zt@RSfZ1M3c2sbebM* ze0=;sy^!90gL~YKISz*x;*^~hcCoO&CRD)zjT(A2b_uRue=QXFe5|!cf0z1m!iwv5GUnLw9Dr*Ux z)3Lc!J@Ei;&&yxGpf2kn@2wJ2?t6~obUg;?tBiD#uo$SkFIasu+^~h33W~`r82rSa ztyE;eh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Kgufm0MjVRfZ=f z4*ZRc2Lgr(P+j2zQE_JzYmP0*;trl7{*N341Cq}%^M^VC3gKG-hY zmPT>ECyrhIoFhnMB^qpdbiuI}pk{qPbK^}0?Rf7^{98+95zNq6!RuV_zAe&nDk0;f zez~oXlE5%ve^TmBEt*x_X#fs(-En$jXr-R4sb$b~`nS=iOy|OVrph(U&cVS!IhmZ~ zKIRA9X%Wp1J=vTvHZ~SDe_JXOe9*fa zgEPf;gD^|qE=dl>Qkx3(80#SE7oxXQ(n4qQ#by{uppSKoDbaq`U+fRqk0BwI>IXV3 zD#K%ASkzd7u>@|pA=)Z>rQr@dLH}*r7r0ng zxa^eME+l*s7{5TNu!+bD{Pp@2)v%g6^>yj{XP&mShhg9GszNu4ITW=XCIUp2Xro&1 zg_D=J3r)6hp$8+94?D$Yn2@Kp-3LDsci)<-H!wCeQt$e9Jk)K86hvV^*Nj-Ea*o;G zsuhRw$H{$o>8qByz1V!(yV{p_0X?Kmy%g#1oSmlHsw;FQ%j9S#}ha zm0Nx09@jmOtP8Q+onN^BAgd8QI^(y!n;-APUpo5WVdmp8!`yKTlF>cqn>ag`4;o>i zl!M0G-(S*fm6VjYy}J}0nX7nJ$h`|b&KuW4d&W5IhbR;-)*9Y0(Jj|@j`$xoPQ=Cl literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..0a3f5fa40fb3d1e0710331a48de5d256da3f275d GIT binary patch literal 520 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uuz(rC1}QWNE&K#jR^;j87-Auq zoUlN^K{r-Q+XN;zI ze|?*NFmgt#V#GwrSWaz^2G&@SBmck6ZcIFMww~vE<1E?M2#KUn1CzsB6D2+0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PN%MiEAtgE$;km@@t6ukO)1^!cY^83Pb_y85}Sb4q9e0FIsP9{>OV literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..2f1632cfddf3d9dade342351e627a0a75609fb46 GIT binary patch literal 2218 zcmV;b2vzrqP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAuE6iGxuRCodHTWf3-RTMruyW6Fu zQYeUM04eX6D5c0FCjKKPrco1(K`<0SL=crI{PC3-^hZU0kQie$gh-5!7z6SH6Q0J% zqot*`H1q{R5fHFYS}dje@;kG=v$L0(yY0?wY2%*c?A&{2?!D*x?m71{of2gv!$5|C z3>qG_BW}7K_yUcT3A5C6QD<+{aq?x;MAUyAiJn#Jv8_zZtQ{P zTRzbL3U9!qVuZzS$xKU10KiW~Bgdcv1-!uAhQxf3a7q+dU6lj?yoO4Lq4TUN4}h{N z*fIM=SS8|C2$(T>w$`t@3Tka!(r!7W`x z-isCVgQD^mG-MJ;XtJuK3V{Vy72GQ83KRWsHU?e*wrhKk=ApIYeDqLi;JI1e zuvv}5^Dc=k7F7?nm3nIw$NVmU-+R>> zyqOR$-2SDpJ}Pt;^RkJytDVXNTsu|mI1`~G7yw`EJR?VkGfNdqK9^^8P`JdtTV&tX4CNcV4 z&N06nZa??Fw1AgQOUSE2AmPE@WO(Fvo`%m`cDgiv(fAeRA%3AGXUbsGw{7Q`cY;1BI#ac3iN$$Hw z0LT0;xc%=q)me?Y*$xI@GRAw?+}>=9D+KTk??-HJ4=A>`V&vKFS75@MKdSF1JTq{S zc1!^8?YA|t+uKigaq!sT;Z!&0F2=k7F0PIU;F$leJLaw2UI6FL^w}OG&!;+b%ya1c z1n+6-inU<0VM-Y_s5iTElq)ThyF?StVcebpGI znw#+zLx2@ah{$_2jn+@}(zJZ{+}_N9BM;z)0yr|gF-4=Iyu@hI*Lk=-A8f#bAzc9f z`Kd6K--x@t04swJVC3JK1cHY-Hq+=|PN-VO;?^_C#;coU6TDP7Bt`;{JTG;!+jj(` zw5cLQ-(Cz-Tlb`A^w7|R56Ce;Wmr0)$KWOUZ6ai0PhzPeHwdl0H(etP zUV`va_i0s-4#DkNM8lUlqI7>YQLf)(lz9Q3Uw`)nc(z3{m5ZE77Ul$V%m)E}3&8L0 z-XaU|eB~Is08eORPk;=<>!1w)Kf}FOVS2l&9~A+@R#koFJ$Czd%Y(ENTV&A~U(IPI z;UY+gf+&6ioZ=roly<0Yst8ck>(M=S?B-ys3mLdM&)ex!hbt+ol|T6CTS+Sc0jv(& z7ijdvFwBq;0a{%3GGwkDKTeG`b+lyj0jjS1OMkYnepCdoosNY`*zmBIo*981BU%%U z@~$z0V`OVtIbEx5pa|Tct|Lg#ZQf5OYMUMRD>Wdxm5SAqV2}3!ceE-M2 z@O~lQ0OiKQp}o9I;?uxCgYVV?FH|?Riri*U$Zi_`V2eiA>l zdSm6;SEm6#T+SpcE8Ro_f2AwxzI z44hfe^WE3!h@W3RDyA_H440cpmYkv*)6m1XazTqw%=E5Xv7^@^^T7Q2wxr+Z2kVYr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/macos/Runner/Configs/AppInfo.xcconfig b/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 00000000..2660ca3e --- /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 = bdk_flutter_example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.bdkFlutterExample + +// 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..c946719a --- /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..852fa1a4 --- /dev/null +++ b/example/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/example/pubspec.lock b/example/pubspec.lock new file mode 100644 index 00000000..d3df3614 --- /dev/null +++ b/example/pubspec.lock @@ -0,0 +1,483 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + bdk_flutter: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "0.31.3" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_cli_annotations: + dependency: transitive + description: + name: build_cli_annotations + sha256: b59d2769769efd6c9ff6d4c4cede0be115a566afc591705c2040b707534b1172 + url: "https://pub.dev" + source: hosted + version: "2.1.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_rust_bridge: + dependency: transitive + description: + name: flutter_rust_bridge + sha256: f703c4b50e253e53efc604d50281bbaefe82d615856f8ae1e7625518ae252e98 + url: "https://pub.dev" + source: hosted + version: "2.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + mockito: + dependency: transitive + description: + name: mockito + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" + url: "https://pub.dev" + source: hosted + version: "5.4.4" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + process: + dependency: transitive + description: + name: process + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/example/pubspec.yaml b/example/pubspec.yaml new file mode 100644 index 00000000..549e6f2f --- /dev/null +++ b/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: bdk_flutter_example +description: Demonstrates how to use the bdk_flutter plugin. + +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.0.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + bdk_flutter: + # When depending on this package from a real application you should use: + # bdk_flutter: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 +dev_dependencies: + flutter_test: + sdk: flutter + integration_test: + sdk: flutter + flutter_driver: + sdk: flutter + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/flutter_rust_bridge.yaml b/flutter_rust_bridge.yaml new file mode 100644 index 00000000..0a112455 --- /dev/null +++ b/flutter_rust_bridge.yaml @@ -0,0 +1,10 @@ +rust_input: crate::api +rust_root: rust/ +dart_output: lib/src/generated/ +full_dep: true +web: false +dart3: true +enable_lifetime: true +c_output: ios/Classes/frb_generated.h +duplicated_c_output: [macos/Classes/frb_generated.h] +dart_entrypoint_class_name: core \ No newline at end of file diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 00000000..09a762be --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,41 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh +Flutter/ +Frameworks/* +!Frameworks/.gitkeep diff --git a/ios/Classes/EnforceBundling.swift b/ios/Classes/EnforceBundling.swift new file mode 100644 index 00000000..f95cacb9 --- /dev/null +++ b/ios/Classes/EnforceBundling.swift @@ -0,0 +1,4 @@ +public func dummyMethodToEnforceBundling() -> Int64 { + return dummy_method_to_enforce_bundling() +} +let dummyVar = dummyMethodToEnforceBundling(); diff --git a/ios/Classes/bdk_flutter.c b/ios/Classes/bdk_flutter.c new file mode 100644 index 00000000..e69de29b diff --git a/ios/Classes/frb_generated.h b/ios/Classes/frb_generated.h new file mode 100644 index 00000000..2430b240 --- /dev/null +++ b/ios/Classes/frb_generated.h @@ -0,0 +1,1542 @@ +#include +#include +#include +// EXTRA BEGIN +typedef struct DartCObject *WireSyncRust2DartDco; +typedef struct WireSyncRust2DartSse { + uint8_t *ptr; + int32_t len; +} WireSyncRust2DartSse; + +typedef int64_t DartPort; +typedef bool (*DartPostCObjectFnType)(DartPort port_id, void *message); +void store_dart_post_cobject(DartPostCObjectFnType ptr); +// EXTRA END +typedef struct _Dart_Handle* Dart_Handle; + +typedef struct wire_cst_bdk_blockchain { + uintptr_t ptr; +} wire_cst_bdk_blockchain; + +typedef struct wire_cst_list_prim_u_8_strict { + uint8_t *ptr; + int32_t len; +} wire_cst_list_prim_u_8_strict; + +typedef struct wire_cst_bdk_transaction { + struct wire_cst_list_prim_u_8_strict *s; +} wire_cst_bdk_transaction; + +typedef struct wire_cst_electrum_config { + struct wire_cst_list_prim_u_8_strict *url; + struct wire_cst_list_prim_u_8_strict *socks5; + uint8_t retry; + uint8_t *timeout; + uint64_t stop_gap; + bool validate_domain; +} wire_cst_electrum_config; + +typedef struct wire_cst_BlockchainConfig_Electrum { + struct wire_cst_electrum_config *config; +} wire_cst_BlockchainConfig_Electrum; + +typedef struct wire_cst_esplora_config { + struct wire_cst_list_prim_u_8_strict *base_url; + struct wire_cst_list_prim_u_8_strict *proxy; + uint8_t *concurrency; + uint64_t stop_gap; + uint64_t *timeout; +} wire_cst_esplora_config; + +typedef struct wire_cst_BlockchainConfig_Esplora { + struct wire_cst_esplora_config *config; +} wire_cst_BlockchainConfig_Esplora; + +typedef struct wire_cst_Auth_UserPass { + struct wire_cst_list_prim_u_8_strict *username; + struct wire_cst_list_prim_u_8_strict *password; +} wire_cst_Auth_UserPass; + +typedef struct wire_cst_Auth_Cookie { + struct wire_cst_list_prim_u_8_strict *file; +} wire_cst_Auth_Cookie; + +typedef union AuthKind { + struct wire_cst_Auth_UserPass UserPass; + struct wire_cst_Auth_Cookie Cookie; +} AuthKind; + +typedef struct wire_cst_auth { + int32_t tag; + union AuthKind kind; +} wire_cst_auth; + +typedef struct wire_cst_rpc_sync_params { + uint64_t start_script_count; + uint64_t start_time; + bool force_start_time; + uint64_t poll_rate_sec; +} wire_cst_rpc_sync_params; + +typedef struct wire_cst_rpc_config { + struct wire_cst_list_prim_u_8_strict *url; + struct wire_cst_auth auth; + int32_t network; + struct wire_cst_list_prim_u_8_strict *wallet_name; + struct wire_cst_rpc_sync_params *sync_params; +} wire_cst_rpc_config; + +typedef struct wire_cst_BlockchainConfig_Rpc { + struct wire_cst_rpc_config *config; +} wire_cst_BlockchainConfig_Rpc; + +typedef union BlockchainConfigKind { + struct wire_cst_BlockchainConfig_Electrum Electrum; + struct wire_cst_BlockchainConfig_Esplora Esplora; + struct wire_cst_BlockchainConfig_Rpc Rpc; +} BlockchainConfigKind; + +typedef struct wire_cst_blockchain_config { + int32_t tag; + union BlockchainConfigKind kind; +} wire_cst_blockchain_config; + +typedef struct wire_cst_bdk_descriptor { + uintptr_t extended_descriptor; + uintptr_t key_map; +} wire_cst_bdk_descriptor; + +typedef struct wire_cst_bdk_descriptor_secret_key { + uintptr_t ptr; +} wire_cst_bdk_descriptor_secret_key; + +typedef struct wire_cst_bdk_descriptor_public_key { + uintptr_t ptr; +} wire_cst_bdk_descriptor_public_key; + +typedef struct wire_cst_bdk_derivation_path { + uintptr_t ptr; +} wire_cst_bdk_derivation_path; + +typedef struct wire_cst_bdk_mnemonic { + uintptr_t ptr; +} wire_cst_bdk_mnemonic; + +typedef struct wire_cst_list_prim_u_8_loose { + uint8_t *ptr; + int32_t len; +} wire_cst_list_prim_u_8_loose; + +typedef struct wire_cst_bdk_psbt { + uintptr_t ptr; +} wire_cst_bdk_psbt; + +typedef struct wire_cst_bdk_address { + uintptr_t ptr; +} wire_cst_bdk_address; + +typedef struct wire_cst_bdk_script_buf { + struct wire_cst_list_prim_u_8_strict *bytes; +} wire_cst_bdk_script_buf; + +typedef struct wire_cst_bdk_policy { + uintptr_t ptr; +} wire_cst_bdk_policy; + +typedef struct wire_cst_LockTime_Blocks { + uint32_t field0; +} wire_cst_LockTime_Blocks; + +typedef struct wire_cst_LockTime_Seconds { + uint32_t field0; +} wire_cst_LockTime_Seconds; + +typedef union LockTimeKind { + struct wire_cst_LockTime_Blocks Blocks; + struct wire_cst_LockTime_Seconds Seconds; +} LockTimeKind; + +typedef struct wire_cst_lock_time { + int32_t tag; + union LockTimeKind kind; +} wire_cst_lock_time; + +typedef struct wire_cst_out_point { + struct wire_cst_list_prim_u_8_strict *txid; + uint32_t vout; +} wire_cst_out_point; + +typedef struct wire_cst_list_list_prim_u_8_strict { + struct wire_cst_list_prim_u_8_strict **ptr; + int32_t len; +} wire_cst_list_list_prim_u_8_strict; + +typedef struct wire_cst_tx_in { + struct wire_cst_out_point previous_output; + struct wire_cst_bdk_script_buf script_sig; + uint32_t sequence; + struct wire_cst_list_list_prim_u_8_strict *witness; +} wire_cst_tx_in; + +typedef struct wire_cst_list_tx_in { + struct wire_cst_tx_in *ptr; + int32_t len; +} wire_cst_list_tx_in; + +typedef struct wire_cst_tx_out { + uint64_t value; + struct wire_cst_bdk_script_buf script_pubkey; +} wire_cst_tx_out; + +typedef struct wire_cst_list_tx_out { + struct wire_cst_tx_out *ptr; + int32_t len; +} wire_cst_list_tx_out; + +typedef struct wire_cst_bdk_wallet { + uintptr_t ptr; +} wire_cst_bdk_wallet; + +typedef struct wire_cst_AddressIndex_Peek { + uint32_t index; +} wire_cst_AddressIndex_Peek; + +typedef struct wire_cst_AddressIndex_Reset { + uint32_t index; +} wire_cst_AddressIndex_Reset; + +typedef union AddressIndexKind { + struct wire_cst_AddressIndex_Peek Peek; + struct wire_cst_AddressIndex_Reset Reset; +} AddressIndexKind; + +typedef struct wire_cst_address_index { + int32_t tag; + union AddressIndexKind kind; +} wire_cst_address_index; + +typedef struct wire_cst_local_utxo { + struct wire_cst_out_point outpoint; + struct wire_cst_tx_out txout; + int32_t keychain; + bool is_spent; +} wire_cst_local_utxo; + +typedef struct wire_cst_psbt_sig_hash_type { + uint32_t inner; +} wire_cst_psbt_sig_hash_type; + +typedef struct wire_cst_sqlite_db_configuration { + struct wire_cst_list_prim_u_8_strict *path; +} wire_cst_sqlite_db_configuration; + +typedef struct wire_cst_DatabaseConfig_Sqlite { + struct wire_cst_sqlite_db_configuration *config; +} wire_cst_DatabaseConfig_Sqlite; + +typedef struct wire_cst_sled_db_configuration { + struct wire_cst_list_prim_u_8_strict *path; + struct wire_cst_list_prim_u_8_strict *tree_name; +} wire_cst_sled_db_configuration; + +typedef struct wire_cst_DatabaseConfig_Sled { + struct wire_cst_sled_db_configuration *config; +} wire_cst_DatabaseConfig_Sled; + +typedef union DatabaseConfigKind { + struct wire_cst_DatabaseConfig_Sqlite Sqlite; + struct wire_cst_DatabaseConfig_Sled Sled; +} DatabaseConfigKind; + +typedef struct wire_cst_database_config { + int32_t tag; + union DatabaseConfigKind kind; +} wire_cst_database_config; + +typedef struct wire_cst_sign_options { + bool trust_witness_utxo; + uint32_t *assume_height; + bool allow_all_sighashes; + bool remove_partial_sigs; + bool try_finalize; + bool sign_with_tap_internal_key; + bool allow_grinding; +} wire_cst_sign_options; + +typedef struct wire_cst_script_amount { + struct wire_cst_bdk_script_buf script; + uint64_t amount; +} wire_cst_script_amount; + +typedef struct wire_cst_list_script_amount { + struct wire_cst_script_amount *ptr; + int32_t len; +} wire_cst_list_script_amount; + +typedef struct wire_cst_list_out_point { + struct wire_cst_out_point *ptr; + int32_t len; +} wire_cst_list_out_point; + +typedef struct wire_cst_input { + struct wire_cst_list_prim_u_8_strict *s; +} wire_cst_input; + +typedef struct wire_cst_record_out_point_input_usize { + struct wire_cst_out_point field0; + struct wire_cst_input field1; + uintptr_t field2; +} wire_cst_record_out_point_input_usize; + +typedef struct wire_cst_RbfValue_Value { + uint32_t field0; +} wire_cst_RbfValue_Value; + +typedef union RbfValueKind { + struct wire_cst_RbfValue_Value Value; +} RbfValueKind; + +typedef struct wire_cst_rbf_value { + int32_t tag; + union RbfValueKind kind; +} wire_cst_rbf_value; + +typedef struct wire_cst_list_prim_u_32_strict { + uint32_t *ptr; + int32_t len; +} wire_cst_list_prim_u_32_strict; + +typedef struct wire_cst_record_string_list_prim_u_32_strict { + struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_32_strict *field1; +} wire_cst_record_string_list_prim_u_32_strict; + +typedef struct wire_cst_list_record_string_list_prim_u_32_strict { + struct wire_cst_record_string_list_prim_u_32_strict *ptr; + int32_t len; +} wire_cst_list_record_string_list_prim_u_32_strict; + +typedef struct wire_cst_AddressError_Base58 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_AddressError_Base58; + +typedef struct wire_cst_AddressError_Bech32 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_AddressError_Bech32; + +typedef struct wire_cst_AddressError_InvalidBech32Variant { + int32_t expected; + int32_t found; +} wire_cst_AddressError_InvalidBech32Variant; + +typedef struct wire_cst_AddressError_InvalidWitnessVersion { + uint8_t field0; +} wire_cst_AddressError_InvalidWitnessVersion; + +typedef struct wire_cst_AddressError_UnparsableWitnessVersion { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_AddressError_UnparsableWitnessVersion; + +typedef struct wire_cst_AddressError_InvalidWitnessProgramLength { + uintptr_t field0; +} wire_cst_AddressError_InvalidWitnessProgramLength; + +typedef struct wire_cst_AddressError_InvalidSegwitV0ProgramLength { + uintptr_t field0; +} wire_cst_AddressError_InvalidSegwitV0ProgramLength; + +typedef struct wire_cst_AddressError_UnknownAddressType { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_AddressError_UnknownAddressType; + +typedef struct wire_cst_AddressError_NetworkValidation { + int32_t network_required; + int32_t network_found; + struct wire_cst_list_prim_u_8_strict *address; +} wire_cst_AddressError_NetworkValidation; + +typedef union AddressErrorKind { + struct wire_cst_AddressError_Base58 Base58; + struct wire_cst_AddressError_Bech32 Bech32; + struct wire_cst_AddressError_InvalidBech32Variant InvalidBech32Variant; + struct wire_cst_AddressError_InvalidWitnessVersion InvalidWitnessVersion; + struct wire_cst_AddressError_UnparsableWitnessVersion UnparsableWitnessVersion; + struct wire_cst_AddressError_InvalidWitnessProgramLength InvalidWitnessProgramLength; + struct wire_cst_AddressError_InvalidSegwitV0ProgramLength InvalidSegwitV0ProgramLength; + struct wire_cst_AddressError_UnknownAddressType UnknownAddressType; + struct wire_cst_AddressError_NetworkValidation NetworkValidation; +} AddressErrorKind; + +typedef struct wire_cst_address_error { + int32_t tag; + union AddressErrorKind kind; +} wire_cst_address_error; + +typedef struct wire_cst_block_time { + uint32_t height; + uint64_t timestamp; +} wire_cst_block_time; + +typedef struct wire_cst_condition { + uint32_t *csv; + struct wire_cst_lock_time *timelock; +} wire_cst_condition; + +typedef struct wire_cst_ConsensusError_Io { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_ConsensusError_Io; + +typedef struct wire_cst_ConsensusError_OversizedVectorAllocation { + uintptr_t requested; + uintptr_t max; +} wire_cst_ConsensusError_OversizedVectorAllocation; + +typedef struct wire_cst_ConsensusError_InvalidChecksum { + struct wire_cst_list_prim_u_8_strict *expected; + struct wire_cst_list_prim_u_8_strict *actual; +} wire_cst_ConsensusError_InvalidChecksum; + +typedef struct wire_cst_ConsensusError_ParseFailed { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_ConsensusError_ParseFailed; + +typedef struct wire_cst_ConsensusError_UnsupportedSegwitFlag { + uint8_t field0; +} wire_cst_ConsensusError_UnsupportedSegwitFlag; + +typedef union ConsensusErrorKind { + struct wire_cst_ConsensusError_Io Io; + struct wire_cst_ConsensusError_OversizedVectorAllocation OversizedVectorAllocation; + struct wire_cst_ConsensusError_InvalidChecksum InvalidChecksum; + struct wire_cst_ConsensusError_ParseFailed ParseFailed; + struct wire_cst_ConsensusError_UnsupportedSegwitFlag UnsupportedSegwitFlag; +} ConsensusErrorKind; + +typedef struct wire_cst_consensus_error { + int32_t tag; + union ConsensusErrorKind kind; +} wire_cst_consensus_error; + +typedef struct wire_cst_DescriptorError_Key { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Key; + +typedef struct wire_cst_DescriptorError_Policy { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Policy; + +typedef struct wire_cst_DescriptorError_InvalidDescriptorCharacter { + uint8_t field0; +} wire_cst_DescriptorError_InvalidDescriptorCharacter; + +typedef struct wire_cst_DescriptorError_Bip32 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Bip32; + +typedef struct wire_cst_DescriptorError_Base58 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Base58; + +typedef struct wire_cst_DescriptorError_Pk { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Pk; + +typedef struct wire_cst_DescriptorError_Miniscript { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Miniscript; + +typedef struct wire_cst_DescriptorError_Hex { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Hex; + +typedef union DescriptorErrorKind { + struct wire_cst_DescriptorError_Key Key; + struct wire_cst_DescriptorError_Policy Policy; + struct wire_cst_DescriptorError_InvalidDescriptorCharacter InvalidDescriptorCharacter; + struct wire_cst_DescriptorError_Bip32 Bip32; + struct wire_cst_DescriptorError_Base58 Base58; + struct wire_cst_DescriptorError_Pk Pk; + struct wire_cst_DescriptorError_Miniscript Miniscript; + struct wire_cst_DescriptorError_Hex Hex; +} DescriptorErrorKind; + +typedef struct wire_cst_descriptor_error { + int32_t tag; + union DescriptorErrorKind kind; +} wire_cst_descriptor_error; + +typedef struct wire_cst_fee_rate { + float sat_per_vb; +} wire_cst_fee_rate; + +typedef struct wire_cst_HexError_InvalidChar { + uint8_t field0; +} wire_cst_HexError_InvalidChar; + +typedef struct wire_cst_HexError_OddLengthString { + uintptr_t field0; +} wire_cst_HexError_OddLengthString; + +typedef struct wire_cst_HexError_InvalidLength { + uintptr_t field0; + uintptr_t field1; +} wire_cst_HexError_InvalidLength; + +typedef union HexErrorKind { + struct wire_cst_HexError_InvalidChar InvalidChar; + struct wire_cst_HexError_OddLengthString OddLengthString; + struct wire_cst_HexError_InvalidLength InvalidLength; +} HexErrorKind; + +typedef struct wire_cst_hex_error { + int32_t tag; + union HexErrorKind kind; +} wire_cst_hex_error; + +typedef struct wire_cst_PkOrF_Pubkey { + struct wire_cst_list_prim_u_8_strict *value; +} wire_cst_PkOrF_Pubkey; + +typedef struct wire_cst_PkOrF_XOnlyPubkey { + struct wire_cst_list_prim_u_8_strict *value; +} wire_cst_PkOrF_XOnlyPubkey; + +typedef struct wire_cst_PkOrF_Fingerprint { + struct wire_cst_list_prim_u_8_strict *value; +} wire_cst_PkOrF_Fingerprint; + +typedef union PkOrFKind { + struct wire_cst_PkOrF_Pubkey Pubkey; + struct wire_cst_PkOrF_XOnlyPubkey XOnlyPubkey; + struct wire_cst_PkOrF_Fingerprint Fingerprint; +} PkOrFKind; + +typedef struct wire_cst_pk_or_f { + int32_t tag; + union PkOrFKind kind; +} wire_cst_pk_or_f; + +typedef struct wire_cst_list_bdk_policy { + struct wire_cst_bdk_policy *ptr; + int32_t len; +} wire_cst_list_bdk_policy; + +typedef struct wire_cst_list_condition { + struct wire_cst_condition *ptr; + int32_t len; +} wire_cst_list_condition; + +typedef struct wire_cst_list_local_utxo { + struct wire_cst_local_utxo *ptr; + int32_t len; +} wire_cst_list_local_utxo; + +typedef struct wire_cst_list_pk_or_f { + struct wire_cst_pk_or_f *ptr; + int32_t len; +} wire_cst_list_pk_or_f; + +typedef struct wire_cst_list_prim_u_64_strict { + uint64_t *ptr; + int32_t len; +} wire_cst_list_prim_u_64_strict; + +typedef struct wire_cst_record_list_prim_u_32_strict_list_condition { + struct wire_cst_list_prim_u_32_strict *field0; + struct wire_cst_list_condition *field1; +} wire_cst_record_list_prim_u_32_strict_list_condition; + +typedef struct wire_cst_list_record_list_prim_u_32_strict_list_condition { + struct wire_cst_record_list_prim_u_32_strict_list_condition *ptr; + int32_t len; +} wire_cst_list_record_list_prim_u_32_strict_list_condition; + +typedef struct wire_cst_record_u_32_list_condition { + uint32_t field0; + struct wire_cst_list_condition *field1; +} wire_cst_record_u_32_list_condition; + +typedef struct wire_cst_list_record_u_32_list_condition { + struct wire_cst_record_u_32_list_condition *ptr; + int32_t len; +} wire_cst_list_record_u_32_list_condition; + +typedef struct wire_cst_transaction_details { + struct wire_cst_bdk_transaction *transaction; + struct wire_cst_list_prim_u_8_strict *txid; + uint64_t received; + uint64_t sent; + uint64_t *fee; + struct wire_cst_block_time *confirmation_time; +} wire_cst_transaction_details; + +typedef struct wire_cst_list_transaction_details { + struct wire_cst_transaction_details *ptr; + int32_t len; +} wire_cst_list_transaction_details; + +typedef struct wire_cst_balance { + uint64_t immature; + uint64_t trusted_pending; + uint64_t untrusted_pending; + uint64_t confirmed; + uint64_t spendable; + uint64_t total; +} wire_cst_balance; + +typedef struct wire_cst_BdkError_Hex { + struct wire_cst_hex_error *field0; +} wire_cst_BdkError_Hex; + +typedef struct wire_cst_BdkError_Consensus { + struct wire_cst_consensus_error *field0; +} wire_cst_BdkError_Consensus; + +typedef struct wire_cst_BdkError_VerifyTransaction { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_VerifyTransaction; + +typedef struct wire_cst_BdkError_Address { + struct wire_cst_address_error *field0; +} wire_cst_BdkError_Address; + +typedef struct wire_cst_BdkError_Descriptor { + struct wire_cst_descriptor_error *field0; +} wire_cst_BdkError_Descriptor; + +typedef struct wire_cst_BdkError_InvalidU32Bytes { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidU32Bytes; + +typedef struct wire_cst_BdkError_Generic { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Generic; + +typedef struct wire_cst_BdkError_OutputBelowDustLimit { + uintptr_t field0; +} wire_cst_BdkError_OutputBelowDustLimit; + +typedef struct wire_cst_BdkError_InsufficientFunds { + uint64_t needed; + uint64_t available; +} wire_cst_BdkError_InsufficientFunds; + +typedef struct wire_cst_BdkError_FeeRateTooLow { + float needed; +} wire_cst_BdkError_FeeRateTooLow; + +typedef struct wire_cst_BdkError_FeeTooLow { + uint64_t needed; +} wire_cst_BdkError_FeeTooLow; + +typedef struct wire_cst_BdkError_MissingKeyOrigin { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_MissingKeyOrigin; + +typedef struct wire_cst_BdkError_Key { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Key; + +typedef struct wire_cst_BdkError_SpendingPolicyRequired { + int32_t field0; +} wire_cst_BdkError_SpendingPolicyRequired; + +typedef struct wire_cst_BdkError_InvalidPolicyPathError { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidPolicyPathError; + +typedef struct wire_cst_BdkError_Signer { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Signer; + +typedef struct wire_cst_BdkError_InvalidNetwork { + int32_t requested; + int32_t found; +} wire_cst_BdkError_InvalidNetwork; + +typedef struct wire_cst_BdkError_InvalidOutpoint { + struct wire_cst_out_point *field0; +} wire_cst_BdkError_InvalidOutpoint; + +typedef struct wire_cst_BdkError_Encode { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Encode; + +typedef struct wire_cst_BdkError_Miniscript { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Miniscript; + +typedef struct wire_cst_BdkError_MiniscriptPsbt { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_MiniscriptPsbt; + +typedef struct wire_cst_BdkError_Bip32 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Bip32; + +typedef struct wire_cst_BdkError_Bip39 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Bip39; + +typedef struct wire_cst_BdkError_Secp256k1 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Secp256k1; + +typedef struct wire_cst_BdkError_Json { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Json; + +typedef struct wire_cst_BdkError_Psbt { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Psbt; + +typedef struct wire_cst_BdkError_PsbtParse { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_PsbtParse; + +typedef struct wire_cst_BdkError_MissingCachedScripts { + uintptr_t field0; + uintptr_t field1; +} wire_cst_BdkError_MissingCachedScripts; + +typedef struct wire_cst_BdkError_Electrum { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Electrum; + +typedef struct wire_cst_BdkError_Esplora { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Esplora; + +typedef struct wire_cst_BdkError_Sled { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Sled; + +typedef struct wire_cst_BdkError_Rpc { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Rpc; + +typedef struct wire_cst_BdkError_Rusqlite { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Rusqlite; + +typedef struct wire_cst_BdkError_InvalidInput { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidInput; + +typedef struct wire_cst_BdkError_InvalidLockTime { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidLockTime; + +typedef struct wire_cst_BdkError_InvalidTransaction { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidTransaction; + +typedef union BdkErrorKind { + struct wire_cst_BdkError_Hex Hex; + struct wire_cst_BdkError_Consensus Consensus; + struct wire_cst_BdkError_VerifyTransaction VerifyTransaction; + struct wire_cst_BdkError_Address Address; + struct wire_cst_BdkError_Descriptor Descriptor; + struct wire_cst_BdkError_InvalidU32Bytes InvalidU32Bytes; + struct wire_cst_BdkError_Generic Generic; + struct wire_cst_BdkError_OutputBelowDustLimit OutputBelowDustLimit; + struct wire_cst_BdkError_InsufficientFunds InsufficientFunds; + struct wire_cst_BdkError_FeeRateTooLow FeeRateTooLow; + struct wire_cst_BdkError_FeeTooLow FeeTooLow; + struct wire_cst_BdkError_MissingKeyOrigin MissingKeyOrigin; + struct wire_cst_BdkError_Key Key; + struct wire_cst_BdkError_SpendingPolicyRequired SpendingPolicyRequired; + struct wire_cst_BdkError_InvalidPolicyPathError InvalidPolicyPathError; + struct wire_cst_BdkError_Signer Signer; + struct wire_cst_BdkError_InvalidNetwork InvalidNetwork; + struct wire_cst_BdkError_InvalidOutpoint InvalidOutpoint; + struct wire_cst_BdkError_Encode Encode; + struct wire_cst_BdkError_Miniscript Miniscript; + struct wire_cst_BdkError_MiniscriptPsbt MiniscriptPsbt; + struct wire_cst_BdkError_Bip32 Bip32; + struct wire_cst_BdkError_Bip39 Bip39; + struct wire_cst_BdkError_Secp256k1 Secp256k1; + struct wire_cst_BdkError_Json Json; + struct wire_cst_BdkError_Psbt Psbt; + struct wire_cst_BdkError_PsbtParse PsbtParse; + struct wire_cst_BdkError_MissingCachedScripts MissingCachedScripts; + struct wire_cst_BdkError_Electrum Electrum; + struct wire_cst_BdkError_Esplora Esplora; + struct wire_cst_BdkError_Sled Sled; + struct wire_cst_BdkError_Rpc Rpc; + struct wire_cst_BdkError_Rusqlite Rusqlite; + struct wire_cst_BdkError_InvalidInput InvalidInput; + struct wire_cst_BdkError_InvalidLockTime InvalidLockTime; + struct wire_cst_BdkError_InvalidTransaction InvalidTransaction; +} BdkErrorKind; + +typedef struct wire_cst_bdk_error { + int32_t tag; + union BdkErrorKind kind; +} wire_cst_bdk_error; + +typedef struct wire_cst_Payload_PubkeyHash { + struct wire_cst_list_prim_u_8_strict *pubkey_hash; +} wire_cst_Payload_PubkeyHash; + +typedef struct wire_cst_Payload_ScriptHash { + struct wire_cst_list_prim_u_8_strict *script_hash; +} wire_cst_Payload_ScriptHash; + +typedef struct wire_cst_Payload_WitnessProgram { + int32_t version; + struct wire_cst_list_prim_u_8_strict *program; +} wire_cst_Payload_WitnessProgram; + +typedef union PayloadKind { + struct wire_cst_Payload_PubkeyHash PubkeyHash; + struct wire_cst_Payload_ScriptHash ScriptHash; + struct wire_cst_Payload_WitnessProgram WitnessProgram; +} PayloadKind; + +typedef struct wire_cst_payload { + int32_t tag; + union PayloadKind kind; +} wire_cst_payload; + +typedef struct wire_cst_record_bdk_address_u_32 { + struct wire_cst_bdk_address field0; + uint32_t field1; +} wire_cst_record_bdk_address_u_32; + +typedef struct wire_cst_record_bdk_psbt_transaction_details { + struct wire_cst_bdk_psbt field0; + struct wire_cst_transaction_details field1; +} wire_cst_record_bdk_psbt_transaction_details; + +typedef struct wire_cst_Satisfaction_Partial { + uint64_t n; + uint64_t m; + struct wire_cst_list_prim_u_64_strict *items; + bool *sorted; + struct wire_cst_list_record_u_32_list_condition *conditions; +} wire_cst_Satisfaction_Partial; + +typedef struct wire_cst_Satisfaction_PartialComplete { + uint64_t n; + uint64_t m; + struct wire_cst_list_prim_u_64_strict *items; + bool *sorted; + struct wire_cst_list_record_list_prim_u_32_strict_list_condition *conditions; +} wire_cst_Satisfaction_PartialComplete; + +typedef struct wire_cst_Satisfaction_Complete { + struct wire_cst_condition *condition; +} wire_cst_Satisfaction_Complete; + +typedef struct wire_cst_Satisfaction_None { + struct wire_cst_list_prim_u_8_strict *msg; +} wire_cst_Satisfaction_None; + +typedef union SatisfactionKind { + struct wire_cst_Satisfaction_Partial Partial; + struct wire_cst_Satisfaction_PartialComplete PartialComplete; + struct wire_cst_Satisfaction_Complete Complete; + struct wire_cst_Satisfaction_None None; +} SatisfactionKind; + +typedef struct wire_cst_satisfaction { + int32_t tag; + union SatisfactionKind kind; +} wire_cst_satisfaction; + +typedef struct wire_cst_SatisfiableItem_EcdsaSignature { + struct wire_cst_pk_or_f *key; +} wire_cst_SatisfiableItem_EcdsaSignature; + +typedef struct wire_cst_SatisfiableItem_SchnorrSignature { + struct wire_cst_pk_or_f *key; +} wire_cst_SatisfiableItem_SchnorrSignature; + +typedef struct wire_cst_SatisfiableItem_Sha256Preimage { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_SatisfiableItem_Sha256Preimage; + +typedef struct wire_cst_SatisfiableItem_Hash256Preimage { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_SatisfiableItem_Hash256Preimage; + +typedef struct wire_cst_SatisfiableItem_Ripemd160Preimage { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_SatisfiableItem_Ripemd160Preimage; + +typedef struct wire_cst_SatisfiableItem_Hash160Preimage { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_SatisfiableItem_Hash160Preimage; + +typedef struct wire_cst_SatisfiableItem_AbsoluteTimelock { + struct wire_cst_lock_time *value; +} wire_cst_SatisfiableItem_AbsoluteTimelock; + +typedef struct wire_cst_SatisfiableItem_RelativeTimelock { + uint32_t value; +} wire_cst_SatisfiableItem_RelativeTimelock; + +typedef struct wire_cst_SatisfiableItem_Multisig { + struct wire_cst_list_pk_or_f *keys; + uint64_t threshold; +} wire_cst_SatisfiableItem_Multisig; + +typedef struct wire_cst_SatisfiableItem_Thresh { + struct wire_cst_list_bdk_policy *items; + uint64_t threshold; +} wire_cst_SatisfiableItem_Thresh; + +typedef union SatisfiableItemKind { + struct wire_cst_SatisfiableItem_EcdsaSignature EcdsaSignature; + struct wire_cst_SatisfiableItem_SchnorrSignature SchnorrSignature; + struct wire_cst_SatisfiableItem_Sha256Preimage Sha256Preimage; + struct wire_cst_SatisfiableItem_Hash256Preimage Hash256Preimage; + struct wire_cst_SatisfiableItem_Ripemd160Preimage Ripemd160Preimage; + struct wire_cst_SatisfiableItem_Hash160Preimage Hash160Preimage; + struct wire_cst_SatisfiableItem_AbsoluteTimelock AbsoluteTimelock; + struct wire_cst_SatisfiableItem_RelativeTimelock RelativeTimelock; + struct wire_cst_SatisfiableItem_Multisig Multisig; + struct wire_cst_SatisfiableItem_Thresh Thresh; +} SatisfiableItemKind; + +typedef struct wire_cst_satisfiable_item { + int32_t tag; + union SatisfiableItemKind kind; +} wire_cst_satisfiable_item; + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast(int64_t port_, + struct wire_cst_bdk_blockchain *ptr, + struct wire_cst_bdk_transaction *transaction); + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create(int64_t port_, + struct wire_cst_blockchain_config *blockchain_config); + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee(int64_t port_, + struct wire_cst_bdk_blockchain *that, + uint64_t target); + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash(int64_t port_, + struct wire_cst_bdk_blockchain *that, + uint32_t height); + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height(int64_t port_, + struct wire_cst_bdk_blockchain *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string(struct wire_cst_bdk_descriptor *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight(struct wire_cst_bdk_descriptor *that); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *descriptor, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *secret_key, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *public_key, + struct wire_cst_list_prim_u_8_strict *fingerprint, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *secret_key, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *public_key, + struct wire_cst_list_prim_u_8_strict *fingerprint, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *secret_key, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *public_key, + struct wire_cst_list_prim_u_8_strict *fingerprint, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *secret_key, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *public_key, + struct wire_cst_list_prim_u_8_strict *fingerprint, + int32_t keychain_kind, + int32_t network); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private(struct wire_cst_bdk_descriptor *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string(struct wire_cst_bdk_derivation_path *that); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *path); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string(struct wire_cst_bdk_descriptor_public_key *that); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *ptr, + struct wire_cst_bdk_derivation_path *path); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *ptr, + struct wire_cst_bdk_derivation_path *path); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *public_key); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public(struct wire_cst_bdk_descriptor_secret_key *ptr); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string(struct wire_cst_bdk_descriptor_secret_key *that); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create(int64_t port_, + int32_t network, + struct wire_cst_bdk_mnemonic *mnemonic, + struct wire_cst_list_prim_u_8_strict *password); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *ptr, + struct wire_cst_bdk_derivation_path *path); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *ptr, + struct wire_cst_bdk_derivation_path *path); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *secret_key); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes(struct wire_cst_bdk_descriptor_secret_key *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string(struct wire_cst_bdk_mnemonic *that); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy(int64_t port_, + struct wire_cst_list_prim_u_8_loose *entropy); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *mnemonic); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new(int64_t port_, int32_t word_count); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string(struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine(int64_t port_, + struct wire_cst_bdk_psbt *ptr, + struct wire_cst_bdk_psbt *other); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx(struct wire_cst_bdk_psbt *ptr); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount(struct wire_cst_bdk_psbt *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate(struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str(int64_t port_, + struct wire_cst_list_prim_u_8_strict *psbt_base64); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize(struct wire_cst_bdk_psbt *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize(struct wire_cst_bdk_psbt *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid(struct wire_cst_bdk_psbt *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string(struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script(int64_t port_, + struct wire_cst_bdk_script_buf *script, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *address, + int32_t network); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network(struct wire_cst_bdk_address *that, + int32_t network); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network(struct wire_cst_bdk_address *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload(struct wire_cst_bdk_address *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script(struct wire_cst_bdk_address *ptr); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri(struct wire_cst_bdk_address *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string(struct wire_cst_bdk_script_buf *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty(void); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity(int64_t port_, + uintptr_t capacity); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes(int64_t port_, + struct wire_cst_list_prim_u_8_loose *transaction_bytes); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new(int64_t port_, + int32_t version, + struct wire_cst_lock_time *lock_time, + struct wire_cst_list_tx_in *input, + struct wire_cst_list_tx_out *output); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight(int64_t port_, + struct wire_cst_bdk_transaction *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address(struct wire_cst_bdk_wallet *ptr, + struct wire_cst_address_index *address_index); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance(struct wire_cst_bdk_wallet *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain(struct wire_cst_bdk_wallet *ptr, + int32_t keychain); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address(struct wire_cst_bdk_wallet *ptr, + struct wire_cst_address_index *address_index); + +void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(int64_t port_, + struct wire_cst_bdk_wallet *that, + struct wire_cst_local_utxo *utxo, + bool only_witness_utxo, + struct wire_cst_psbt_sig_hash_type *sighash_type); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_script_buf *script); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions(struct wire_cst_bdk_wallet *that, + bool include_raw); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent(struct wire_cst_bdk_wallet *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network(struct wire_cst_bdk_wallet *that); + +void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new(int64_t port_, + struct wire_cst_bdk_descriptor *descriptor, + struct wire_cst_bdk_descriptor *change_descriptor, + int32_t network, + struct wire_cst_database_config *database_config); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies(struct wire_cst_bdk_wallet *ptr, + int32_t keychain); + +void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_psbt *psbt, + struct wire_cst_sign_options *sign_options); + +void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_blockchain *blockchain); + +void frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder(int64_t port_, + struct wire_cst_list_prim_u_8_strict *txid, + float fee_rate, + struct wire_cst_bdk_address *allow_shrinking, + struct wire_cst_bdk_wallet *wallet, + bool enable_rbf, + uint32_t *n_sequence); + +void frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish(int64_t port_, + struct wire_cst_bdk_wallet *wallet, + struct wire_cst_list_script_amount *recipients, + struct wire_cst_list_out_point *utxos, + struct wire_cst_record_out_point_input_usize *foreign_utxo, + struct wire_cst_list_out_point *un_spendable, + int32_t change_policy, + bool manually_selected_only, + float *fee_rate, + uint64_t *fee_absolute, + bool drain_wallet, + struct wire_cst_bdk_script_buf *drain_to, + struct wire_cst_rbf_value *rbf, + struct wire_cst_list_record_string_list_prim_u_32_strict *internal_policy_path, + struct wire_cst_list_record_string_list_prim_u_32_strict *external_policy_path, + struct wire_cst_list_prim_u_8_loose *data); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); + +struct wire_cst_address_error *frbgen_bdk_flutter_cst_new_box_autoadd_address_error(void); + +struct wire_cst_address_index *frbgen_bdk_flutter_cst_new_box_autoadd_address_index(void); + +struct wire_cst_bdk_address *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address(void); + +struct wire_cst_bdk_blockchain *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain(void); + +struct wire_cst_bdk_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path(void); + +struct wire_cst_bdk_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor(void); + +struct wire_cst_bdk_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key(void); + +struct wire_cst_bdk_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key(void); + +struct wire_cst_bdk_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic(void); + +struct wire_cst_bdk_policy *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy(void); + +struct wire_cst_bdk_psbt *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt(void); + +struct wire_cst_bdk_script_buf *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf(void); + +struct wire_cst_bdk_transaction *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction(void); + +struct wire_cst_bdk_wallet *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet(void); + +struct wire_cst_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_block_time(void); + +struct wire_cst_blockchain_config *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config(void); + +bool *frbgen_bdk_flutter_cst_new_box_autoadd_bool(bool value); + +struct wire_cst_condition *frbgen_bdk_flutter_cst_new_box_autoadd_condition(void); + +struct wire_cst_consensus_error *frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error(void); + +struct wire_cst_database_config *frbgen_bdk_flutter_cst_new_box_autoadd_database_config(void); + +struct wire_cst_descriptor_error *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error(void); + +struct wire_cst_electrum_config *frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config(void); + +struct wire_cst_esplora_config *frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config(void); + +float *frbgen_bdk_flutter_cst_new_box_autoadd_f_32(float value); + +struct wire_cst_fee_rate *frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate(void); + +struct wire_cst_hex_error *frbgen_bdk_flutter_cst_new_box_autoadd_hex_error(void); + +struct wire_cst_local_utxo *frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo(void); + +struct wire_cst_lock_time *frbgen_bdk_flutter_cst_new_box_autoadd_lock_time(void); + +struct wire_cst_out_point *frbgen_bdk_flutter_cst_new_box_autoadd_out_point(void); + +struct wire_cst_pk_or_f *frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f(void); + +struct wire_cst_psbt_sig_hash_type *frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type(void); + +struct wire_cst_rbf_value *frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value(void); + +struct wire_cst_record_out_point_input_usize *frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize(void); + +struct wire_cst_rpc_config *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config(void); + +struct wire_cst_rpc_sync_params *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params(void); + +struct wire_cst_sign_options *frbgen_bdk_flutter_cst_new_box_autoadd_sign_options(void); + +struct wire_cst_sled_db_configuration *frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration(void); + +struct wire_cst_sqlite_db_configuration *frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration(void); + +uint32_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_32(uint32_t value); + +uint64_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_64(uint64_t value); + +uint8_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_8(uint8_t value); + +struct wire_cst_list_bdk_policy *frbgen_bdk_flutter_cst_new_list_bdk_policy(int32_t len); + +struct wire_cst_list_condition *frbgen_bdk_flutter_cst_new_list_condition(int32_t len); + +struct wire_cst_list_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict(int32_t len); + +struct wire_cst_list_local_utxo *frbgen_bdk_flutter_cst_new_list_local_utxo(int32_t len); + +struct wire_cst_list_out_point *frbgen_bdk_flutter_cst_new_list_out_point(int32_t len); + +struct wire_cst_list_pk_or_f *frbgen_bdk_flutter_cst_new_list_pk_or_f(int32_t len); + +struct wire_cst_list_prim_u_32_strict *frbgen_bdk_flutter_cst_new_list_prim_u_32_strict(int32_t len); + +struct wire_cst_list_prim_u_64_strict *frbgen_bdk_flutter_cst_new_list_prim_u_64_strict(int32_t len); + +struct wire_cst_list_prim_u_8_loose *frbgen_bdk_flutter_cst_new_list_prim_u_8_loose(int32_t len); + +struct wire_cst_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_prim_u_8_strict(int32_t len); + +struct wire_cst_list_record_list_prim_u_32_strict_list_condition *frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition(int32_t len); + +struct wire_cst_list_record_string_list_prim_u_32_strict *frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict(int32_t len); + +struct wire_cst_list_record_u_32_list_condition *frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition(int32_t len); + +struct wire_cst_list_script_amount *frbgen_bdk_flutter_cst_new_list_script_amount(int32_t len); + +struct wire_cst_list_transaction_details *frbgen_bdk_flutter_cst_new_list_transaction_details(int32_t len); + +struct wire_cst_list_tx_in *frbgen_bdk_flutter_cst_new_list_tx_in(int32_t len); + +struct wire_cst_list_tx_out *frbgen_bdk_flutter_cst_new_list_tx_out(int32_t len); +static int64_t dummy_method_to_enforce_bundling(void) { + int64_t dummy_var = 0; + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_address_error); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_address_index); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_block_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bool); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_condition); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_database_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_f_32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_hex_error); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_out_point); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sign_options); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_64); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_8); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_bdk_policy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_condition); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_local_utxo); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_out_point); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_pk_or_f); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_32_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_64_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_loose); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_script_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_transaction_details); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_in); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_out); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish); + dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); + return dummy_var; +} diff --git a/ios/bdk_flutter.podspec b/ios/bdk_flutter.podspec new file mode 100644 index 00000000..a4dfcd45 --- /dev/null +++ b/ios/bdk_flutter.podspec @@ -0,0 +1,31 @@ +Pod::Spec.new do |s| + s.name = 'bdk_flutter' + s.version = "0.31.3" + s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' + s.description = <<-DESC +A new Flutter plugin 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' + s.platform = :ios, '12.0' + s.script_phase = { + :name => 'Build Rust library', + # First argument is relative path to the `rust` folder, second is name of rust library + :script => 'sh "$PODS_TARGET_SRCROOT/../cargokit/build_pod.sh" ../rust bdk_flutter', + :execution_position => :before_compile, + :input_files => ['${BUILT_PRODUCTS_DIR}/cargokit_phony'], + # Let XCode know that the static library referenced in -force_load below is + # created by this build step. + :output_files => ["${BUILT_PRODUCTS_DIR}/libbdk_flutter.a"], + } + s.pod_target_xcconfig = { + 'DEFINES_MODULE' => 'YES', + # Flutter.framework does not contain a i386 slice. + 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386', + 'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/libbdk_flutter.a', + } +end diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 00000000..e909d5b2 --- /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 + static_code_analysis: + run: flutter analyze \ No newline at end of file diff --git a/lib/bdk_flutter.dart b/lib/bdk_flutter.dart new file mode 100644 index 00000000..3f8a0457 --- /dev/null +++ b/lib/bdk_flutter.dart @@ -0,0 +1,50 @@ +///A Flutter library for the [Bitcoin Development Kit](https://bitcoindevkit.org/). +library bdk_flutter; + +export './src/generated/api/blockchain.dart' + show + Auth, + BlockchainConfig, + ElectrumConfig, + EsploraConfig, + RpcConfig, + RpcSyncParams; + +export './src/generated/api/types.dart' + show + AddressIndex, + Balance, + BlockTime, + ChangeSpendPolicy, + Condition, + DatabaseConfig, + FeeRate, + Input, + KeychainKind, + LocalUtxo, + LockTime, + Network, + OutPoint, + Payload, + PkOrF, + PsbtSigHashType, + RbfValue, + Satisfaction, + SatisfiableItem, + SignOptions, + SledDbConfiguration, + SqliteDbConfiguration, + Variant, + WitnessVersion, + WordCount; +export './src/generated/api/wallet.dart' + hide BdkWallet, finishBumpFeeTxBuilder, txBuilderFinish; +export './src/root.dart'; +export 'src/utils/exceptions.dart' + hide + mapBdkError, + mapAddressError, + mapConsensusError, + mapDescriptorError, + mapHexError, + BdkFfiException; diff --git a/lib/src/generated/api/blockchain.dart b/lib/src/generated/api/blockchain.dart new file mode 100644 index 00000000..469d95ee --- /dev/null +++ b/lib/src/generated/api/blockchain.dart @@ -0,0 +1,289 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +import 'types.dart'; +part 'blockchain.freezed.dart'; + +// These functions are ignored because they are not marked as `pub`: `get_blockchain` +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `from`, `from`, `from` + +@freezed +sealed class Auth with _$Auth { + const Auth._(); + + /// No authentication + const factory Auth.none() = Auth_None; + + /// Authentication with username and password. + const factory Auth.userPass({ + /// Username + required String username, + + /// Password + required String password, + }) = Auth_UserPass; + + /// Authentication with a cookie file + const factory Auth.cookie({ + /// Cookie file + required String file, + }) = Auth_Cookie; +} + +class BdkBlockchain { + final AnyBlockchain ptr; + + const BdkBlockchain({ + required this.ptr, + }); + + static Future broadcast( + {required BdkBlockchain ptr, required BdkTransaction transaction}) => + core.instance.api.crateApiBlockchainBdkBlockchainBroadcast( + ptr: ptr, transaction: transaction); + + static Future create( + {required BlockchainConfig blockchainConfig}) => + core.instance.api.crateApiBlockchainBdkBlockchainCreate( + blockchainConfig: blockchainConfig); + + Future estimateFee({required BigInt target}) => core.instance.api + .crateApiBlockchainBdkBlockchainEstimateFee(that: this, target: target); + + Future getBlockHash({required int height}) => core.instance.api + .crateApiBlockchainBdkBlockchainGetBlockHash(that: this, height: height); + + Future getHeight() => + core.instance.api.crateApiBlockchainBdkBlockchainGetHeight( + that: this, + ); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkBlockchain && + runtimeType == other.runtimeType && + ptr == other.ptr; +} + +@freezed +sealed class BlockchainConfig with _$BlockchainConfig { + const BlockchainConfig._(); + + /// Electrum client + const factory BlockchainConfig.electrum({ + required ElectrumConfig config, + }) = BlockchainConfig_Electrum; + + /// Esplora client + const factory BlockchainConfig.esplora({ + required EsploraConfig config, + }) = BlockchainConfig_Esplora; + + /// Bitcoin Core RPC client + const factory BlockchainConfig.rpc({ + required RpcConfig config, + }) = BlockchainConfig_Rpc; +} + +/// Configuration for an ElectrumBlockchain +class ElectrumConfig { + /// URL of the Electrum server (such as ElectrumX, Esplora, BWT) may start with ssl:// or tcp:// and include a port + /// e.g. ssl://electrum.blockstream.info:60002 + final String url; + + /// URL of the socks5 proxy server or a Tor service + final String? socks5; + + /// Request retry count + final int retry; + + /// Request timeout (seconds) + final int? timeout; + + /// Stop searching addresses for transactions after finding an unused gap of this length + final BigInt stopGap; + + /// Validate the domain when using SSL + final bool validateDomain; + + const ElectrumConfig({ + required this.url, + this.socks5, + required this.retry, + this.timeout, + required this.stopGap, + required this.validateDomain, + }); + + @override + int get hashCode => + url.hashCode ^ + socks5.hashCode ^ + retry.hashCode ^ + timeout.hashCode ^ + stopGap.hashCode ^ + validateDomain.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ElectrumConfig && + runtimeType == other.runtimeType && + url == other.url && + socks5 == other.socks5 && + retry == other.retry && + timeout == other.timeout && + stopGap == other.stopGap && + validateDomain == other.validateDomain; +} + +/// Configuration for an EsploraBlockchain +class EsploraConfig { + /// Base URL of the esplora service + /// e.g. https://blockstream.info/api/ + final String baseUrl; + + /// Optional URL of the proxy to use to make requests to the Esplora server + /// The string should be formatted as: ://:@host:. + /// Note that the format of this value and the supported protocols change slightly between the + /// sync version of esplora (using ureq) and the async version (using reqwest). For more + /// details check with the documentation of the two crates. Both of them are compiled with + /// the socks feature enabled. + /// The proxy is ignored when targeting wasm32. + final String? proxy; + + /// Number of parallel requests sent to the esplora service (default: 4) + final int? concurrency; + + /// Stop searching addresses for transactions after finding an unused gap of this length. + final BigInt stopGap; + + /// Socket timeout. + final BigInt? timeout; + + const EsploraConfig({ + required this.baseUrl, + this.proxy, + this.concurrency, + required this.stopGap, + this.timeout, + }); + + @override + int get hashCode => + baseUrl.hashCode ^ + proxy.hashCode ^ + concurrency.hashCode ^ + stopGap.hashCode ^ + timeout.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is EsploraConfig && + runtimeType == other.runtimeType && + baseUrl == other.baseUrl && + proxy == other.proxy && + concurrency == other.concurrency && + stopGap == other.stopGap && + timeout == other.timeout; +} + +/// RpcBlockchain configuration options +class RpcConfig { + /// The bitcoin node url + final String url; + + /// The bitcoin node authentication mechanism + final Auth auth; + + /// The network we are using (it will be checked the bitcoin node network matches this) + final Network network; + + /// The wallet name in the bitcoin node. + final String walletName; + + /// Sync parameters + final RpcSyncParams? syncParams; + + const RpcConfig({ + required this.url, + required this.auth, + required this.network, + required this.walletName, + this.syncParams, + }); + + @override + int get hashCode => + url.hashCode ^ + auth.hashCode ^ + network.hashCode ^ + walletName.hashCode ^ + syncParams.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is RpcConfig && + runtimeType == other.runtimeType && + url == other.url && + auth == other.auth && + network == other.network && + walletName == other.walletName && + syncParams == other.syncParams; +} + +/// Sync parameters for Bitcoin Core RPC. +/// +/// In general, BDK tries to sync `scriptPubKey`s cached in `Database` with +/// `scriptPubKey`s imported in the Bitcoin Core Wallet. These parameters are used for determining +/// how the `importdescriptors` RPC calls are to be made. +class RpcSyncParams { + /// The minimum number of scripts to scan for on initial sync. + final BigInt startScriptCount; + + /// Time in unix seconds in which initial sync will start scanning from (0 to start from genesis). + final BigInt startTime; + + /// Forces every sync to use `start_time` as import timestamp. + final bool forceStartTime; + + /// RPC poll rate (in seconds) to get state updates. + final BigInt pollRateSec; + + const RpcSyncParams({ + required this.startScriptCount, + required this.startTime, + required this.forceStartTime, + required this.pollRateSec, + }); + + @override + int get hashCode => + startScriptCount.hashCode ^ + startTime.hashCode ^ + forceStartTime.hashCode ^ + pollRateSec.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is RpcSyncParams && + runtimeType == other.runtimeType && + startScriptCount == other.startScriptCount && + startTime == other.startTime && + forceStartTime == other.forceStartTime && + pollRateSec == other.pollRateSec; +} diff --git a/lib/src/generated/api/blockchain.freezed.dart b/lib/src/generated/api/blockchain.freezed.dart new file mode 100644 index 00000000..1ddb778a --- /dev/null +++ b/lib/src/generated/api/blockchain.freezed.dart @@ -0,0 +1,993 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'blockchain.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$Auth { + @optionalTypeArgs + TResult when({ + required TResult Function() none, + required TResult Function(String username, String password) userPass, + required TResult Function(String file) cookie, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? none, + TResult? Function(String username, String password)? userPass, + TResult? Function(String file)? cookie, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? none, + TResult Function(String username, String password)? userPass, + TResult Function(String file)? cookie, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(Auth_None value) none, + required TResult Function(Auth_UserPass value) userPass, + required TResult Function(Auth_Cookie value) cookie, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Auth_None value)? none, + TResult? Function(Auth_UserPass value)? userPass, + TResult? Function(Auth_Cookie value)? cookie, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Auth_None value)? none, + TResult Function(Auth_UserPass value)? userPass, + TResult Function(Auth_Cookie value)? cookie, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $AuthCopyWith<$Res> { + factory $AuthCopyWith(Auth value, $Res Function(Auth) then) = + _$AuthCopyWithImpl<$Res, Auth>; +} + +/// @nodoc +class _$AuthCopyWithImpl<$Res, $Val extends Auth> + implements $AuthCopyWith<$Res> { + _$AuthCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$Auth_NoneImplCopyWith<$Res> { + factory _$$Auth_NoneImplCopyWith( + _$Auth_NoneImpl value, $Res Function(_$Auth_NoneImpl) then) = + __$$Auth_NoneImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$Auth_NoneImplCopyWithImpl<$Res> + extends _$AuthCopyWithImpl<$Res, _$Auth_NoneImpl> + implements _$$Auth_NoneImplCopyWith<$Res> { + __$$Auth_NoneImplCopyWithImpl( + _$Auth_NoneImpl _value, $Res Function(_$Auth_NoneImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$Auth_NoneImpl extends Auth_None { + const _$Auth_NoneImpl() : super._(); + + @override + String toString() { + return 'Auth.none()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && other is _$Auth_NoneImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() none, + required TResult Function(String username, String password) userPass, + required TResult Function(String file) cookie, + }) { + return none(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? none, + TResult? Function(String username, String password)? userPass, + TResult? Function(String file)? cookie, + }) { + return none?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? none, + TResult Function(String username, String password)? userPass, + TResult Function(String file)? cookie, + required TResult orElse(), + }) { + if (none != null) { + return none(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Auth_None value) none, + required TResult Function(Auth_UserPass value) userPass, + required TResult Function(Auth_Cookie value) cookie, + }) { + return none(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Auth_None value)? none, + TResult? Function(Auth_UserPass value)? userPass, + TResult? Function(Auth_Cookie value)? cookie, + }) { + return none?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Auth_None value)? none, + TResult Function(Auth_UserPass value)? userPass, + TResult Function(Auth_Cookie value)? cookie, + required TResult orElse(), + }) { + if (none != null) { + return none(this); + } + return orElse(); + } +} + +abstract class Auth_None extends Auth { + const factory Auth_None() = _$Auth_NoneImpl; + const Auth_None._() : super._(); +} + +/// @nodoc +abstract class _$$Auth_UserPassImplCopyWith<$Res> { + factory _$$Auth_UserPassImplCopyWith( + _$Auth_UserPassImpl value, $Res Function(_$Auth_UserPassImpl) then) = + __$$Auth_UserPassImplCopyWithImpl<$Res>; + @useResult + $Res call({String username, String password}); +} + +/// @nodoc +class __$$Auth_UserPassImplCopyWithImpl<$Res> + extends _$AuthCopyWithImpl<$Res, _$Auth_UserPassImpl> + implements _$$Auth_UserPassImplCopyWith<$Res> { + __$$Auth_UserPassImplCopyWithImpl( + _$Auth_UserPassImpl _value, $Res Function(_$Auth_UserPassImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? username = null, + Object? password = null, + }) { + return _then(_$Auth_UserPassImpl( + username: null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String, + password: null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$Auth_UserPassImpl extends Auth_UserPass { + const _$Auth_UserPassImpl({required this.username, required this.password}) + : super._(); + + /// Username + @override + final String username; + + /// Password + @override + final String password; + + @override + String toString() { + return 'Auth.userPass(username: $username, password: $password)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Auth_UserPassImpl && + (identical(other.username, username) || + other.username == username) && + (identical(other.password, password) || + other.password == password)); + } + + @override + int get hashCode => Object.hash(runtimeType, username, password); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Auth_UserPassImplCopyWith<_$Auth_UserPassImpl> get copyWith => + __$$Auth_UserPassImplCopyWithImpl<_$Auth_UserPassImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() none, + required TResult Function(String username, String password) userPass, + required TResult Function(String file) cookie, + }) { + return userPass(username, password); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? none, + TResult? Function(String username, String password)? userPass, + TResult? Function(String file)? cookie, + }) { + return userPass?.call(username, password); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? none, + TResult Function(String username, String password)? userPass, + TResult Function(String file)? cookie, + required TResult orElse(), + }) { + if (userPass != null) { + return userPass(username, password); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Auth_None value) none, + required TResult Function(Auth_UserPass value) userPass, + required TResult Function(Auth_Cookie value) cookie, + }) { + return userPass(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Auth_None value)? none, + TResult? Function(Auth_UserPass value)? userPass, + TResult? Function(Auth_Cookie value)? cookie, + }) { + return userPass?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Auth_None value)? none, + TResult Function(Auth_UserPass value)? userPass, + TResult Function(Auth_Cookie value)? cookie, + required TResult orElse(), + }) { + if (userPass != null) { + return userPass(this); + } + return orElse(); + } +} + +abstract class Auth_UserPass extends Auth { + const factory Auth_UserPass( + {required final String username, + required final String password}) = _$Auth_UserPassImpl; + const Auth_UserPass._() : super._(); + + /// Username + String get username; + + /// Password + String get password; + @JsonKey(ignore: true) + _$$Auth_UserPassImplCopyWith<_$Auth_UserPassImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$Auth_CookieImplCopyWith<$Res> { + factory _$$Auth_CookieImplCopyWith( + _$Auth_CookieImpl value, $Res Function(_$Auth_CookieImpl) then) = + __$$Auth_CookieImplCopyWithImpl<$Res>; + @useResult + $Res call({String file}); +} + +/// @nodoc +class __$$Auth_CookieImplCopyWithImpl<$Res> + extends _$AuthCopyWithImpl<$Res, _$Auth_CookieImpl> + implements _$$Auth_CookieImplCopyWith<$Res> { + __$$Auth_CookieImplCopyWithImpl( + _$Auth_CookieImpl _value, $Res Function(_$Auth_CookieImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? file = null, + }) { + return _then(_$Auth_CookieImpl( + file: null == file + ? _value.file + : file // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$Auth_CookieImpl extends Auth_Cookie { + const _$Auth_CookieImpl({required this.file}) : super._(); + + /// Cookie file + @override + final String file; + + @override + String toString() { + return 'Auth.cookie(file: $file)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Auth_CookieImpl && + (identical(other.file, file) || other.file == file)); + } + + @override + int get hashCode => Object.hash(runtimeType, file); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Auth_CookieImplCopyWith<_$Auth_CookieImpl> get copyWith => + __$$Auth_CookieImplCopyWithImpl<_$Auth_CookieImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() none, + required TResult Function(String username, String password) userPass, + required TResult Function(String file) cookie, + }) { + return cookie(file); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? none, + TResult? Function(String username, String password)? userPass, + TResult? Function(String file)? cookie, + }) { + return cookie?.call(file); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? none, + TResult Function(String username, String password)? userPass, + TResult Function(String file)? cookie, + required TResult orElse(), + }) { + if (cookie != null) { + return cookie(file); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Auth_None value) none, + required TResult Function(Auth_UserPass value) userPass, + required TResult Function(Auth_Cookie value) cookie, + }) { + return cookie(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Auth_None value)? none, + TResult? Function(Auth_UserPass value)? userPass, + TResult? Function(Auth_Cookie value)? cookie, + }) { + return cookie?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Auth_None value)? none, + TResult Function(Auth_UserPass value)? userPass, + TResult Function(Auth_Cookie value)? cookie, + required TResult orElse(), + }) { + if (cookie != null) { + return cookie(this); + } + return orElse(); + } +} + +abstract class Auth_Cookie extends Auth { + const factory Auth_Cookie({required final String file}) = _$Auth_CookieImpl; + const Auth_Cookie._() : super._(); + + /// Cookie file + String get file; + @JsonKey(ignore: true) + _$$Auth_CookieImplCopyWith<_$Auth_CookieImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$BlockchainConfig { + Object get config => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(ElectrumConfig config) electrum, + required TResult Function(EsploraConfig config) esplora, + required TResult Function(RpcConfig config) rpc, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(ElectrumConfig config)? electrum, + TResult? Function(EsploraConfig config)? esplora, + TResult? Function(RpcConfig config)? rpc, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(ElectrumConfig config)? electrum, + TResult Function(EsploraConfig config)? esplora, + TResult Function(RpcConfig config)? rpc, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(BlockchainConfig_Electrum value) electrum, + required TResult Function(BlockchainConfig_Esplora value) esplora, + required TResult Function(BlockchainConfig_Rpc value) rpc, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BlockchainConfig_Electrum value)? electrum, + TResult? Function(BlockchainConfig_Esplora value)? esplora, + TResult? Function(BlockchainConfig_Rpc value)? rpc, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BlockchainConfig_Electrum value)? electrum, + TResult Function(BlockchainConfig_Esplora value)? esplora, + TResult Function(BlockchainConfig_Rpc value)? rpc, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $BlockchainConfigCopyWith<$Res> { + factory $BlockchainConfigCopyWith( + BlockchainConfig value, $Res Function(BlockchainConfig) then) = + _$BlockchainConfigCopyWithImpl<$Res, BlockchainConfig>; +} + +/// @nodoc +class _$BlockchainConfigCopyWithImpl<$Res, $Val extends BlockchainConfig> + implements $BlockchainConfigCopyWith<$Res> { + _$BlockchainConfigCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$BlockchainConfig_ElectrumImplCopyWith<$Res> { + factory _$$BlockchainConfig_ElectrumImplCopyWith( + _$BlockchainConfig_ElectrumImpl value, + $Res Function(_$BlockchainConfig_ElectrumImpl) then) = + __$$BlockchainConfig_ElectrumImplCopyWithImpl<$Res>; + @useResult + $Res call({ElectrumConfig config}); +} + +/// @nodoc +class __$$BlockchainConfig_ElectrumImplCopyWithImpl<$Res> + extends _$BlockchainConfigCopyWithImpl<$Res, + _$BlockchainConfig_ElectrumImpl> + implements _$$BlockchainConfig_ElectrumImplCopyWith<$Res> { + __$$BlockchainConfig_ElectrumImplCopyWithImpl( + _$BlockchainConfig_ElectrumImpl _value, + $Res Function(_$BlockchainConfig_ElectrumImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? config = null, + }) { + return _then(_$BlockchainConfig_ElectrumImpl( + config: null == config + ? _value.config + : config // ignore: cast_nullable_to_non_nullable + as ElectrumConfig, + )); + } +} + +/// @nodoc + +class _$BlockchainConfig_ElectrumImpl extends BlockchainConfig_Electrum { + const _$BlockchainConfig_ElectrumImpl({required this.config}) : super._(); + + @override + final ElectrumConfig config; + + @override + String toString() { + return 'BlockchainConfig.electrum(config: $config)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BlockchainConfig_ElectrumImpl && + (identical(other.config, config) || other.config == config)); + } + + @override + int get hashCode => Object.hash(runtimeType, config); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BlockchainConfig_ElectrumImplCopyWith<_$BlockchainConfig_ElectrumImpl> + get copyWith => __$$BlockchainConfig_ElectrumImplCopyWithImpl< + _$BlockchainConfig_ElectrumImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(ElectrumConfig config) electrum, + required TResult Function(EsploraConfig config) esplora, + required TResult Function(RpcConfig config) rpc, + }) { + return electrum(config); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(ElectrumConfig config)? electrum, + TResult? Function(EsploraConfig config)? esplora, + TResult? Function(RpcConfig config)? rpc, + }) { + return electrum?.call(config); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(ElectrumConfig config)? electrum, + TResult Function(EsploraConfig config)? esplora, + TResult Function(RpcConfig config)? rpc, + required TResult orElse(), + }) { + if (electrum != null) { + return electrum(config); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BlockchainConfig_Electrum value) electrum, + required TResult Function(BlockchainConfig_Esplora value) esplora, + required TResult Function(BlockchainConfig_Rpc value) rpc, + }) { + return electrum(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BlockchainConfig_Electrum value)? electrum, + TResult? Function(BlockchainConfig_Esplora value)? esplora, + TResult? Function(BlockchainConfig_Rpc value)? rpc, + }) { + return electrum?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BlockchainConfig_Electrum value)? electrum, + TResult Function(BlockchainConfig_Esplora value)? esplora, + TResult Function(BlockchainConfig_Rpc value)? rpc, + required TResult orElse(), + }) { + if (electrum != null) { + return electrum(this); + } + return orElse(); + } +} + +abstract class BlockchainConfig_Electrum extends BlockchainConfig { + const factory BlockchainConfig_Electrum( + {required final ElectrumConfig config}) = _$BlockchainConfig_ElectrumImpl; + const BlockchainConfig_Electrum._() : super._(); + + @override + ElectrumConfig get config; + @JsonKey(ignore: true) + _$$BlockchainConfig_ElectrumImplCopyWith<_$BlockchainConfig_ElectrumImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BlockchainConfig_EsploraImplCopyWith<$Res> { + factory _$$BlockchainConfig_EsploraImplCopyWith( + _$BlockchainConfig_EsploraImpl value, + $Res Function(_$BlockchainConfig_EsploraImpl) then) = + __$$BlockchainConfig_EsploraImplCopyWithImpl<$Res>; + @useResult + $Res call({EsploraConfig config}); +} + +/// @nodoc +class __$$BlockchainConfig_EsploraImplCopyWithImpl<$Res> + extends _$BlockchainConfigCopyWithImpl<$Res, _$BlockchainConfig_EsploraImpl> + implements _$$BlockchainConfig_EsploraImplCopyWith<$Res> { + __$$BlockchainConfig_EsploraImplCopyWithImpl( + _$BlockchainConfig_EsploraImpl _value, + $Res Function(_$BlockchainConfig_EsploraImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? config = null, + }) { + return _then(_$BlockchainConfig_EsploraImpl( + config: null == config + ? _value.config + : config // ignore: cast_nullable_to_non_nullable + as EsploraConfig, + )); + } +} + +/// @nodoc + +class _$BlockchainConfig_EsploraImpl extends BlockchainConfig_Esplora { + const _$BlockchainConfig_EsploraImpl({required this.config}) : super._(); + + @override + final EsploraConfig config; + + @override + String toString() { + return 'BlockchainConfig.esplora(config: $config)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BlockchainConfig_EsploraImpl && + (identical(other.config, config) || other.config == config)); + } + + @override + int get hashCode => Object.hash(runtimeType, config); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BlockchainConfig_EsploraImplCopyWith<_$BlockchainConfig_EsploraImpl> + get copyWith => __$$BlockchainConfig_EsploraImplCopyWithImpl< + _$BlockchainConfig_EsploraImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(ElectrumConfig config) electrum, + required TResult Function(EsploraConfig config) esplora, + required TResult Function(RpcConfig config) rpc, + }) { + return esplora(config); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(ElectrumConfig config)? electrum, + TResult? Function(EsploraConfig config)? esplora, + TResult? Function(RpcConfig config)? rpc, + }) { + return esplora?.call(config); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(ElectrumConfig config)? electrum, + TResult Function(EsploraConfig config)? esplora, + TResult Function(RpcConfig config)? rpc, + required TResult orElse(), + }) { + if (esplora != null) { + return esplora(config); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BlockchainConfig_Electrum value) electrum, + required TResult Function(BlockchainConfig_Esplora value) esplora, + required TResult Function(BlockchainConfig_Rpc value) rpc, + }) { + return esplora(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BlockchainConfig_Electrum value)? electrum, + TResult? Function(BlockchainConfig_Esplora value)? esplora, + TResult? Function(BlockchainConfig_Rpc value)? rpc, + }) { + return esplora?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BlockchainConfig_Electrum value)? electrum, + TResult Function(BlockchainConfig_Esplora value)? esplora, + TResult Function(BlockchainConfig_Rpc value)? rpc, + required TResult orElse(), + }) { + if (esplora != null) { + return esplora(this); + } + return orElse(); + } +} + +abstract class BlockchainConfig_Esplora extends BlockchainConfig { + const factory BlockchainConfig_Esplora( + {required final EsploraConfig config}) = _$BlockchainConfig_EsploraImpl; + const BlockchainConfig_Esplora._() : super._(); + + @override + EsploraConfig get config; + @JsonKey(ignore: true) + _$$BlockchainConfig_EsploraImplCopyWith<_$BlockchainConfig_EsploraImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BlockchainConfig_RpcImplCopyWith<$Res> { + factory _$$BlockchainConfig_RpcImplCopyWith(_$BlockchainConfig_RpcImpl value, + $Res Function(_$BlockchainConfig_RpcImpl) then) = + __$$BlockchainConfig_RpcImplCopyWithImpl<$Res>; + @useResult + $Res call({RpcConfig config}); +} + +/// @nodoc +class __$$BlockchainConfig_RpcImplCopyWithImpl<$Res> + extends _$BlockchainConfigCopyWithImpl<$Res, _$BlockchainConfig_RpcImpl> + implements _$$BlockchainConfig_RpcImplCopyWith<$Res> { + __$$BlockchainConfig_RpcImplCopyWithImpl(_$BlockchainConfig_RpcImpl _value, + $Res Function(_$BlockchainConfig_RpcImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? config = null, + }) { + return _then(_$BlockchainConfig_RpcImpl( + config: null == config + ? _value.config + : config // ignore: cast_nullable_to_non_nullable + as RpcConfig, + )); + } +} + +/// @nodoc + +class _$BlockchainConfig_RpcImpl extends BlockchainConfig_Rpc { + const _$BlockchainConfig_RpcImpl({required this.config}) : super._(); + + @override + final RpcConfig config; + + @override + String toString() { + return 'BlockchainConfig.rpc(config: $config)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BlockchainConfig_RpcImpl && + (identical(other.config, config) || other.config == config)); + } + + @override + int get hashCode => Object.hash(runtimeType, config); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BlockchainConfig_RpcImplCopyWith<_$BlockchainConfig_RpcImpl> + get copyWith => + __$$BlockchainConfig_RpcImplCopyWithImpl<_$BlockchainConfig_RpcImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(ElectrumConfig config) electrum, + required TResult Function(EsploraConfig config) esplora, + required TResult Function(RpcConfig config) rpc, + }) { + return rpc(config); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(ElectrumConfig config)? electrum, + TResult? Function(EsploraConfig config)? esplora, + TResult? Function(RpcConfig config)? rpc, + }) { + return rpc?.call(config); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(ElectrumConfig config)? electrum, + TResult Function(EsploraConfig config)? esplora, + TResult Function(RpcConfig config)? rpc, + required TResult orElse(), + }) { + if (rpc != null) { + return rpc(config); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BlockchainConfig_Electrum value) electrum, + required TResult Function(BlockchainConfig_Esplora value) esplora, + required TResult Function(BlockchainConfig_Rpc value) rpc, + }) { + return rpc(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BlockchainConfig_Electrum value)? electrum, + TResult? Function(BlockchainConfig_Esplora value)? esplora, + TResult? Function(BlockchainConfig_Rpc value)? rpc, + }) { + return rpc?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BlockchainConfig_Electrum value)? electrum, + TResult Function(BlockchainConfig_Esplora value)? esplora, + TResult Function(BlockchainConfig_Rpc value)? rpc, + required TResult orElse(), + }) { + if (rpc != null) { + return rpc(this); + } + return orElse(); + } +} + +abstract class BlockchainConfig_Rpc extends BlockchainConfig { + const factory BlockchainConfig_Rpc({required final RpcConfig config}) = + _$BlockchainConfig_RpcImpl; + const BlockchainConfig_Rpc._() : super._(); + + @override + RpcConfig get config; + @JsonKey(ignore: true) + _$$BlockchainConfig_RpcImplCopyWith<_$BlockchainConfig_RpcImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/lib/src/generated/api/descriptor.dart b/lib/src/generated/api/descriptor.dart new file mode 100644 index 00000000..83ace5cf --- /dev/null +++ b/lib/src/generated/api/descriptor.dart @@ -0,0 +1,127 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'error.dart'; +import 'key.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; + +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt` + +class BdkDescriptor { + final ExtendedDescriptor extendedDescriptor; + final KeyMap keyMap; + + const BdkDescriptor({ + required this.extendedDescriptor, + required this.keyMap, + }); + + String asString() => + core.instance.api.crateApiDescriptorBdkDescriptorAsString( + that: this, + ); + + BigInt maxSatisfactionWeight() => + core.instance.api.crateApiDescriptorBdkDescriptorMaxSatisfactionWeight( + that: this, + ); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance( + {required String descriptor, required Network network}) => + core.instance.api.crateApiDescriptorBdkDescriptorNew( + descriptor: descriptor, network: network); + + static Future newBip44( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) => + core.instance.api.crateApiDescriptorBdkDescriptorNewBip44( + secretKey: secretKey, keychainKind: keychainKind, network: network); + + static Future newBip44Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) => + core.instance.api.crateApiDescriptorBdkDescriptorNewBip44Public( + publicKey: publicKey, + fingerprint: fingerprint, + keychainKind: keychainKind, + network: network); + + static Future newBip49( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) => + core.instance.api.crateApiDescriptorBdkDescriptorNewBip49( + secretKey: secretKey, keychainKind: keychainKind, network: network); + + static Future newBip49Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) => + core.instance.api.crateApiDescriptorBdkDescriptorNewBip49Public( + publicKey: publicKey, + fingerprint: fingerprint, + keychainKind: keychainKind, + network: network); + + static Future newBip84( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) => + core.instance.api.crateApiDescriptorBdkDescriptorNewBip84( + secretKey: secretKey, keychainKind: keychainKind, network: network); + + static Future newBip84Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) => + core.instance.api.crateApiDescriptorBdkDescriptorNewBip84Public( + publicKey: publicKey, + fingerprint: fingerprint, + keychainKind: keychainKind, + network: network); + + static Future newBip86( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) => + core.instance.api.crateApiDescriptorBdkDescriptorNewBip86( + secretKey: secretKey, keychainKind: keychainKind, network: network); + + static Future newBip86Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) => + core.instance.api.crateApiDescriptorBdkDescriptorNewBip86Public( + publicKey: publicKey, + fingerprint: fingerprint, + keychainKind: keychainKind, + network: network); + + String toStringPrivate() => + core.instance.api.crateApiDescriptorBdkDescriptorToStringPrivate( + that: this, + ); + + @override + int get hashCode => extendedDescriptor.hashCode ^ keyMap.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkDescriptor && + runtimeType == other.runtimeType && + extendedDescriptor == other.extendedDescriptor && + keyMap == other.keyMap; +} diff --git a/lib/src/generated/api/error.dart b/lib/src/generated/api/error.dart new file mode 100644 index 00000000..03733e53 --- /dev/null +++ b/lib/src/generated/api/error.dart @@ -0,0 +1,362 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +import 'types.dart'; +part 'error.freezed.dart'; + +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from` + +@freezed +sealed class AddressError with _$AddressError { + const AddressError._(); + + const factory AddressError.base58( + String field0, + ) = AddressError_Base58; + const factory AddressError.bech32( + String field0, + ) = AddressError_Bech32; + const factory AddressError.emptyBech32Payload() = + AddressError_EmptyBech32Payload; + const factory AddressError.invalidBech32Variant({ + required Variant expected, + required Variant found, + }) = AddressError_InvalidBech32Variant; + const factory AddressError.invalidWitnessVersion( + int field0, + ) = AddressError_InvalidWitnessVersion; + const factory AddressError.unparsableWitnessVersion( + String field0, + ) = AddressError_UnparsableWitnessVersion; + const factory AddressError.malformedWitnessVersion() = + AddressError_MalformedWitnessVersion; + const factory AddressError.invalidWitnessProgramLength( + BigInt field0, + ) = AddressError_InvalidWitnessProgramLength; + const factory AddressError.invalidSegwitV0ProgramLength( + BigInt field0, + ) = AddressError_InvalidSegwitV0ProgramLength; + const factory AddressError.uncompressedPubkey() = + AddressError_UncompressedPubkey; + const factory AddressError.excessiveScriptSize() = + AddressError_ExcessiveScriptSize; + const factory AddressError.unrecognizedScript() = + AddressError_UnrecognizedScript; + const factory AddressError.unknownAddressType( + String field0, + ) = AddressError_UnknownAddressType; + const factory AddressError.networkValidation({ + required Network networkRequired, + required Network networkFound, + required String address, + }) = AddressError_NetworkValidation; +} + +@freezed +sealed class BdkError with _$BdkError implements FrbException { + const BdkError._(); + + /// Hex decoding error + const factory BdkError.hex( + HexError field0, + ) = BdkError_Hex; + + /// Encoding error + const factory BdkError.consensus( + ConsensusError field0, + ) = BdkError_Consensus; + const factory BdkError.verifyTransaction( + String field0, + ) = BdkError_VerifyTransaction; + + /// Address error. + const factory BdkError.address( + AddressError field0, + ) = BdkError_Address; + + /// Error related to the parsing and usage of descriptors + const factory BdkError.descriptor( + DescriptorError field0, + ) = BdkError_Descriptor; + + /// Wrong number of bytes found when trying to convert to u32 + const factory BdkError.invalidU32Bytes( + Uint8List field0, + ) = BdkError_InvalidU32Bytes; + + /// Generic error + const factory BdkError.generic( + String field0, + ) = BdkError_Generic; + + /// This error is thrown when trying to convert Bare and Public key script to address + const factory BdkError.scriptDoesntHaveAddressForm() = + BdkError_ScriptDoesntHaveAddressForm; + + /// Cannot build a tx without recipients + const factory BdkError.noRecipients() = BdkError_NoRecipients; + + /// `manually_selected_only` option is selected but no utxo has been passed + const factory BdkError.noUtxosSelected() = BdkError_NoUtxosSelected; + + /// Output created is under the dust limit, 546 satoshis + const factory BdkError.outputBelowDustLimit( + BigInt field0, + ) = BdkError_OutputBelowDustLimit; + + /// Wallet's UTXO set is not enough to cover recipient's requested plus fee + const factory BdkError.insufficientFunds({ + /// Sats needed for some transaction + required BigInt needed, + + /// Sats available for spending + required BigInt available, + }) = BdkError_InsufficientFunds; + + /// Branch and bound coin selection possible attempts with sufficiently big UTXO set could grow + /// exponentially, thus a limit is set, and when hit, this error is thrown + const factory BdkError.bnBTotalTriesExceeded() = + BdkError_BnBTotalTriesExceeded; + + /// Branch and bound coin selection tries to avoid needing a change by finding the right inputs for + /// the desired outputs plus fee, if there is not such combination this error is thrown + const factory BdkError.bnBNoExactMatch() = BdkError_BnBNoExactMatch; + + /// Happens when trying to spend an UTXO that is not in the internal database + const factory BdkError.unknownUtxo() = BdkError_UnknownUtxo; + + /// Thrown when a tx is not found in the internal database + const factory BdkError.transactionNotFound() = BdkError_TransactionNotFound; + + /// Happens when trying to bump a transaction that is already confirmed + const factory BdkError.transactionConfirmed() = BdkError_TransactionConfirmed; + + /// Trying to replace a tx that has a sequence >= `0xFFFFFFFE` + const factory BdkError.irreplaceableTransaction() = + BdkError_IrreplaceableTransaction; + + /// When bumping a tx the fee rate requested is lower than required + const factory BdkError.feeRateTooLow({ + /// Required fee rate (satoshi/vbyte) + required double needed, + }) = BdkError_FeeRateTooLow; + + /// When bumping a tx the absolute fee requested is lower than replaced tx absolute fee + const factory BdkError.feeTooLow({ + /// Required fee absolute value (satoshi) + required BigInt needed, + }) = BdkError_FeeTooLow; + + /// Node doesn't have data to estimate a fee rate + const factory BdkError.feeRateUnavailable() = BdkError_FeeRateUnavailable; + const factory BdkError.missingKeyOrigin( + String field0, + ) = BdkError_MissingKeyOrigin; + + /// Error while working with keys + const factory BdkError.key( + String field0, + ) = BdkError_Key; + + /// Descriptor checksum mismatch + const factory BdkError.checksumMismatch() = BdkError_ChecksumMismatch; + + /// Spending policy is not compatible with this [KeychainKind] + const factory BdkError.spendingPolicyRequired( + KeychainKind field0, + ) = BdkError_SpendingPolicyRequired; + + /// Error while extracting and manipulating policies + const factory BdkError.invalidPolicyPathError( + String field0, + ) = BdkError_InvalidPolicyPathError; + + /// Signing error + const factory BdkError.signer( + String field0, + ) = BdkError_Signer; + + /// Invalid network + const factory BdkError.invalidNetwork({ + /// requested network, for example what is given as bdk-cli option + required Network requested, + + /// found network, for example the network of the bitcoin node + required Network found, + }) = BdkError_InvalidNetwork; + + /// Requested outpoint doesn't exist in the tx (vout greater than available outputs) + const factory BdkError.invalidOutpoint( + OutPoint field0, + ) = BdkError_InvalidOutpoint; + + /// Encoding error + const factory BdkError.encode( + String field0, + ) = BdkError_Encode; + + /// Miniscript error + const factory BdkError.miniscript( + String field0, + ) = BdkError_Miniscript; + + /// Miniscript PSBT error + const factory BdkError.miniscriptPsbt( + String field0, + ) = BdkError_MiniscriptPsbt; + + /// BIP32 error + const factory BdkError.bip32( + String field0, + ) = BdkError_Bip32; + + /// BIP39 error + const factory BdkError.bip39( + String field0, + ) = BdkError_Bip39; + + /// A secp256k1 error + const factory BdkError.secp256K1( + String field0, + ) = BdkError_Secp256k1; + + /// Error serializing or deserializing JSON data + const factory BdkError.json( + String field0, + ) = BdkError_Json; + + /// Partially signed bitcoin transaction error + const factory BdkError.psbt( + String field0, + ) = BdkError_Psbt; + + /// Partially signed bitcoin transaction parse error + const factory BdkError.psbtParse( + String field0, + ) = BdkError_PsbtParse; + + /// sync attempt failed due to missing scripts in cache which + /// are needed to satisfy `stop_gap`. + const factory BdkError.missingCachedScripts( + BigInt field0, + BigInt field1, + ) = BdkError_MissingCachedScripts; + + /// Electrum client error + const factory BdkError.electrum( + String field0, + ) = BdkError_Electrum; + + /// Esplora client error + const factory BdkError.esplora( + String field0, + ) = BdkError_Esplora; + + /// Sled database error + const factory BdkError.sled( + String field0, + ) = BdkError_Sled; + + /// Rpc client error + const factory BdkError.rpc( + String field0, + ) = BdkError_Rpc; + + /// Rusqlite client error + const factory BdkError.rusqlite( + String field0, + ) = BdkError_Rusqlite; + const factory BdkError.invalidInput( + String field0, + ) = BdkError_InvalidInput; + const factory BdkError.invalidLockTime( + String field0, + ) = BdkError_InvalidLockTime; + const factory BdkError.invalidTransaction( + String field0, + ) = BdkError_InvalidTransaction; +} + +@freezed +sealed class ConsensusError with _$ConsensusError { + const ConsensusError._(); + + const factory ConsensusError.io( + String field0, + ) = ConsensusError_Io; + const factory ConsensusError.oversizedVectorAllocation({ + required BigInt requested, + required BigInt max, + }) = ConsensusError_OversizedVectorAllocation; + const factory ConsensusError.invalidChecksum({ + required U8Array4 expected, + required U8Array4 actual, + }) = ConsensusError_InvalidChecksum; + const factory ConsensusError.nonMinimalVarInt() = + ConsensusError_NonMinimalVarInt; + const factory ConsensusError.parseFailed( + String field0, + ) = ConsensusError_ParseFailed; + const factory ConsensusError.unsupportedSegwitFlag( + int field0, + ) = ConsensusError_UnsupportedSegwitFlag; +} + +@freezed +sealed class DescriptorError with _$DescriptorError { + const DescriptorError._(); + + const factory DescriptorError.invalidHdKeyPath() = + DescriptorError_InvalidHdKeyPath; + const factory DescriptorError.invalidDescriptorChecksum() = + DescriptorError_InvalidDescriptorChecksum; + const factory DescriptorError.hardenedDerivationXpub() = + DescriptorError_HardenedDerivationXpub; + const factory DescriptorError.multiPath() = DescriptorError_MultiPath; + const factory DescriptorError.key( + String field0, + ) = DescriptorError_Key; + const factory DescriptorError.policy( + String field0, + ) = DescriptorError_Policy; + const factory DescriptorError.invalidDescriptorCharacter( + int field0, + ) = DescriptorError_InvalidDescriptorCharacter; + const factory DescriptorError.bip32( + String field0, + ) = DescriptorError_Bip32; + const factory DescriptorError.base58( + String field0, + ) = DescriptorError_Base58; + const factory DescriptorError.pk( + String field0, + ) = DescriptorError_Pk; + const factory DescriptorError.miniscript( + String field0, + ) = DescriptorError_Miniscript; + const factory DescriptorError.hex( + String field0, + ) = DescriptorError_Hex; +} + +@freezed +sealed class HexError with _$HexError { + const HexError._(); + + const factory HexError.invalidChar( + int field0, + ) = HexError_InvalidChar; + const factory HexError.oddLengthString( + BigInt field0, + ) = HexError_OddLengthString; + const factory HexError.invalidLength( + BigInt field0, + BigInt field1, + ) = HexError_InvalidLength; +} diff --git a/lib/src/generated/api/error.freezed.dart b/lib/src/generated/api/error.freezed.dart new file mode 100644 index 00000000..72d8139e --- /dev/null +++ b/lib/src/generated/api/error.freezed.dart @@ -0,0 +1,28272 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'error.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$AddressError { + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $AddressErrorCopyWith<$Res> { + factory $AddressErrorCopyWith( + AddressError value, $Res Function(AddressError) then) = + _$AddressErrorCopyWithImpl<$Res, AddressError>; +} + +/// @nodoc +class _$AddressErrorCopyWithImpl<$Res, $Val extends AddressError> + implements $AddressErrorCopyWith<$Res> { + _$AddressErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$AddressError_Base58ImplCopyWith<$Res> { + factory _$$AddressError_Base58ImplCopyWith(_$AddressError_Base58Impl value, + $Res Function(_$AddressError_Base58Impl) then) = + __$$AddressError_Base58ImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$AddressError_Base58ImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, _$AddressError_Base58Impl> + implements _$$AddressError_Base58ImplCopyWith<$Res> { + __$$AddressError_Base58ImplCopyWithImpl(_$AddressError_Base58Impl _value, + $Res Function(_$AddressError_Base58Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$AddressError_Base58Impl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$AddressError_Base58Impl extends AddressError_Base58 { + const _$AddressError_Base58Impl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'AddressError.base58(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_Base58Impl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressError_Base58ImplCopyWith<_$AddressError_Base58Impl> get copyWith => + __$$AddressError_Base58ImplCopyWithImpl<_$AddressError_Base58Impl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return base58(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return base58?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (base58 != null) { + return base58(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return base58(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return base58?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (base58 != null) { + return base58(this); + } + return orElse(); + } +} + +abstract class AddressError_Base58 extends AddressError { + const factory AddressError_Base58(final String field0) = + _$AddressError_Base58Impl; + const AddressError_Base58._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$AddressError_Base58ImplCopyWith<_$AddressError_Base58Impl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AddressError_Bech32ImplCopyWith<$Res> { + factory _$$AddressError_Bech32ImplCopyWith(_$AddressError_Bech32Impl value, + $Res Function(_$AddressError_Bech32Impl) then) = + __$$AddressError_Bech32ImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$AddressError_Bech32ImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, _$AddressError_Bech32Impl> + implements _$$AddressError_Bech32ImplCopyWith<$Res> { + __$$AddressError_Bech32ImplCopyWithImpl(_$AddressError_Bech32Impl _value, + $Res Function(_$AddressError_Bech32Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$AddressError_Bech32Impl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$AddressError_Bech32Impl extends AddressError_Bech32 { + const _$AddressError_Bech32Impl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'AddressError.bech32(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_Bech32Impl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressError_Bech32ImplCopyWith<_$AddressError_Bech32Impl> get copyWith => + __$$AddressError_Bech32ImplCopyWithImpl<_$AddressError_Bech32Impl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return bech32(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return bech32?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (bech32 != null) { + return bech32(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return bech32(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return bech32?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (bech32 != null) { + return bech32(this); + } + return orElse(); + } +} + +abstract class AddressError_Bech32 extends AddressError { + const factory AddressError_Bech32(final String field0) = + _$AddressError_Bech32Impl; + const AddressError_Bech32._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$AddressError_Bech32ImplCopyWith<_$AddressError_Bech32Impl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AddressError_EmptyBech32PayloadImplCopyWith<$Res> { + factory _$$AddressError_EmptyBech32PayloadImplCopyWith( + _$AddressError_EmptyBech32PayloadImpl value, + $Res Function(_$AddressError_EmptyBech32PayloadImpl) then) = + __$$AddressError_EmptyBech32PayloadImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$AddressError_EmptyBech32PayloadImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_EmptyBech32PayloadImpl> + implements _$$AddressError_EmptyBech32PayloadImplCopyWith<$Res> { + __$$AddressError_EmptyBech32PayloadImplCopyWithImpl( + _$AddressError_EmptyBech32PayloadImpl _value, + $Res Function(_$AddressError_EmptyBech32PayloadImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$AddressError_EmptyBech32PayloadImpl + extends AddressError_EmptyBech32Payload { + const _$AddressError_EmptyBech32PayloadImpl() : super._(); + + @override + String toString() { + return 'AddressError.emptyBech32Payload()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_EmptyBech32PayloadImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return emptyBech32Payload(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return emptyBech32Payload?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (emptyBech32Payload != null) { + return emptyBech32Payload(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return emptyBech32Payload(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return emptyBech32Payload?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (emptyBech32Payload != null) { + return emptyBech32Payload(this); + } + return orElse(); + } +} + +abstract class AddressError_EmptyBech32Payload extends AddressError { + const factory AddressError_EmptyBech32Payload() = + _$AddressError_EmptyBech32PayloadImpl; + const AddressError_EmptyBech32Payload._() : super._(); +} + +/// @nodoc +abstract class _$$AddressError_InvalidBech32VariantImplCopyWith<$Res> { + factory _$$AddressError_InvalidBech32VariantImplCopyWith( + _$AddressError_InvalidBech32VariantImpl value, + $Res Function(_$AddressError_InvalidBech32VariantImpl) then) = + __$$AddressError_InvalidBech32VariantImplCopyWithImpl<$Res>; + @useResult + $Res call({Variant expected, Variant found}); +} + +/// @nodoc +class __$$AddressError_InvalidBech32VariantImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_InvalidBech32VariantImpl> + implements _$$AddressError_InvalidBech32VariantImplCopyWith<$Res> { + __$$AddressError_InvalidBech32VariantImplCopyWithImpl( + _$AddressError_InvalidBech32VariantImpl _value, + $Res Function(_$AddressError_InvalidBech32VariantImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? expected = null, + Object? found = null, + }) { + return _then(_$AddressError_InvalidBech32VariantImpl( + expected: null == expected + ? _value.expected + : expected // ignore: cast_nullable_to_non_nullable + as Variant, + found: null == found + ? _value.found + : found // ignore: cast_nullable_to_non_nullable + as Variant, + )); + } +} + +/// @nodoc + +class _$AddressError_InvalidBech32VariantImpl + extends AddressError_InvalidBech32Variant { + const _$AddressError_InvalidBech32VariantImpl( + {required this.expected, required this.found}) + : super._(); + + @override + final Variant expected; + @override + final Variant found; + + @override + String toString() { + return 'AddressError.invalidBech32Variant(expected: $expected, found: $found)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_InvalidBech32VariantImpl && + (identical(other.expected, expected) || + other.expected == expected) && + (identical(other.found, found) || other.found == found)); + } + + @override + int get hashCode => Object.hash(runtimeType, expected, found); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressError_InvalidBech32VariantImplCopyWith< + _$AddressError_InvalidBech32VariantImpl> + get copyWith => __$$AddressError_InvalidBech32VariantImplCopyWithImpl< + _$AddressError_InvalidBech32VariantImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return invalidBech32Variant(expected, found); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return invalidBech32Variant?.call(expected, found); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (invalidBech32Variant != null) { + return invalidBech32Variant(expected, found); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return invalidBech32Variant(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return invalidBech32Variant?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (invalidBech32Variant != null) { + return invalidBech32Variant(this); + } + return orElse(); + } +} + +abstract class AddressError_InvalidBech32Variant extends AddressError { + const factory AddressError_InvalidBech32Variant( + {required final Variant expected, + required final Variant found}) = _$AddressError_InvalidBech32VariantImpl; + const AddressError_InvalidBech32Variant._() : super._(); + + Variant get expected; + Variant get found; + @JsonKey(ignore: true) + _$$AddressError_InvalidBech32VariantImplCopyWith< + _$AddressError_InvalidBech32VariantImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AddressError_InvalidWitnessVersionImplCopyWith<$Res> { + factory _$$AddressError_InvalidWitnessVersionImplCopyWith( + _$AddressError_InvalidWitnessVersionImpl value, + $Res Function(_$AddressError_InvalidWitnessVersionImpl) then) = + __$$AddressError_InvalidWitnessVersionImplCopyWithImpl<$Res>; + @useResult + $Res call({int field0}); +} + +/// @nodoc +class __$$AddressError_InvalidWitnessVersionImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_InvalidWitnessVersionImpl> + implements _$$AddressError_InvalidWitnessVersionImplCopyWith<$Res> { + __$$AddressError_InvalidWitnessVersionImplCopyWithImpl( + _$AddressError_InvalidWitnessVersionImpl _value, + $Res Function(_$AddressError_InvalidWitnessVersionImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$AddressError_InvalidWitnessVersionImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$AddressError_InvalidWitnessVersionImpl + extends AddressError_InvalidWitnessVersion { + const _$AddressError_InvalidWitnessVersionImpl(this.field0) : super._(); + + @override + final int field0; + + @override + String toString() { + return 'AddressError.invalidWitnessVersion(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_InvalidWitnessVersionImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressError_InvalidWitnessVersionImplCopyWith< + _$AddressError_InvalidWitnessVersionImpl> + get copyWith => __$$AddressError_InvalidWitnessVersionImplCopyWithImpl< + _$AddressError_InvalidWitnessVersionImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return invalidWitnessVersion(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return invalidWitnessVersion?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (invalidWitnessVersion != null) { + return invalidWitnessVersion(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return invalidWitnessVersion(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return invalidWitnessVersion?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (invalidWitnessVersion != null) { + return invalidWitnessVersion(this); + } + return orElse(); + } +} + +abstract class AddressError_InvalidWitnessVersion extends AddressError { + const factory AddressError_InvalidWitnessVersion(final int field0) = + _$AddressError_InvalidWitnessVersionImpl; + const AddressError_InvalidWitnessVersion._() : super._(); + + int get field0; + @JsonKey(ignore: true) + _$$AddressError_InvalidWitnessVersionImplCopyWith< + _$AddressError_InvalidWitnessVersionImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AddressError_UnparsableWitnessVersionImplCopyWith<$Res> { + factory _$$AddressError_UnparsableWitnessVersionImplCopyWith( + _$AddressError_UnparsableWitnessVersionImpl value, + $Res Function(_$AddressError_UnparsableWitnessVersionImpl) then) = + __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_UnparsableWitnessVersionImpl> + implements _$$AddressError_UnparsableWitnessVersionImplCopyWith<$Res> { + __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl( + _$AddressError_UnparsableWitnessVersionImpl _value, + $Res Function(_$AddressError_UnparsableWitnessVersionImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$AddressError_UnparsableWitnessVersionImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$AddressError_UnparsableWitnessVersionImpl + extends AddressError_UnparsableWitnessVersion { + const _$AddressError_UnparsableWitnessVersionImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'AddressError.unparsableWitnessVersion(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_UnparsableWitnessVersionImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressError_UnparsableWitnessVersionImplCopyWith< + _$AddressError_UnparsableWitnessVersionImpl> + get copyWith => __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl< + _$AddressError_UnparsableWitnessVersionImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return unparsableWitnessVersion(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return unparsableWitnessVersion?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (unparsableWitnessVersion != null) { + return unparsableWitnessVersion(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return unparsableWitnessVersion(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return unparsableWitnessVersion?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (unparsableWitnessVersion != null) { + return unparsableWitnessVersion(this); + } + return orElse(); + } +} + +abstract class AddressError_UnparsableWitnessVersion extends AddressError { + const factory AddressError_UnparsableWitnessVersion(final String field0) = + _$AddressError_UnparsableWitnessVersionImpl; + const AddressError_UnparsableWitnessVersion._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$AddressError_UnparsableWitnessVersionImplCopyWith< + _$AddressError_UnparsableWitnessVersionImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AddressError_MalformedWitnessVersionImplCopyWith<$Res> { + factory _$$AddressError_MalformedWitnessVersionImplCopyWith( + _$AddressError_MalformedWitnessVersionImpl value, + $Res Function(_$AddressError_MalformedWitnessVersionImpl) then) = + __$$AddressError_MalformedWitnessVersionImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$AddressError_MalformedWitnessVersionImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_MalformedWitnessVersionImpl> + implements _$$AddressError_MalformedWitnessVersionImplCopyWith<$Res> { + __$$AddressError_MalformedWitnessVersionImplCopyWithImpl( + _$AddressError_MalformedWitnessVersionImpl _value, + $Res Function(_$AddressError_MalformedWitnessVersionImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$AddressError_MalformedWitnessVersionImpl + extends AddressError_MalformedWitnessVersion { + const _$AddressError_MalformedWitnessVersionImpl() : super._(); + + @override + String toString() { + return 'AddressError.malformedWitnessVersion()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_MalformedWitnessVersionImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return malformedWitnessVersion(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return malformedWitnessVersion?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (malformedWitnessVersion != null) { + return malformedWitnessVersion(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return malformedWitnessVersion(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return malformedWitnessVersion?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (malformedWitnessVersion != null) { + return malformedWitnessVersion(this); + } + return orElse(); + } +} + +abstract class AddressError_MalformedWitnessVersion extends AddressError { + const factory AddressError_MalformedWitnessVersion() = + _$AddressError_MalformedWitnessVersionImpl; + const AddressError_MalformedWitnessVersion._() : super._(); +} + +/// @nodoc +abstract class _$$AddressError_InvalidWitnessProgramLengthImplCopyWith<$Res> { + factory _$$AddressError_InvalidWitnessProgramLengthImplCopyWith( + _$AddressError_InvalidWitnessProgramLengthImpl value, + $Res Function(_$AddressError_InvalidWitnessProgramLengthImpl) then) = + __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt field0}); +} + +/// @nodoc +class __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_InvalidWitnessProgramLengthImpl> + implements _$$AddressError_InvalidWitnessProgramLengthImplCopyWith<$Res> { + __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl( + _$AddressError_InvalidWitnessProgramLengthImpl _value, + $Res Function(_$AddressError_InvalidWitnessProgramLengthImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$AddressError_InvalidWitnessProgramLengthImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$AddressError_InvalidWitnessProgramLengthImpl + extends AddressError_InvalidWitnessProgramLength { + const _$AddressError_InvalidWitnessProgramLengthImpl(this.field0) : super._(); + + @override + final BigInt field0; + + @override + String toString() { + return 'AddressError.invalidWitnessProgramLength(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_InvalidWitnessProgramLengthImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressError_InvalidWitnessProgramLengthImplCopyWith< + _$AddressError_InvalidWitnessProgramLengthImpl> + get copyWith => + __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl< + _$AddressError_InvalidWitnessProgramLengthImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return invalidWitnessProgramLength(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return invalidWitnessProgramLength?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (invalidWitnessProgramLength != null) { + return invalidWitnessProgramLength(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return invalidWitnessProgramLength(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return invalidWitnessProgramLength?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (invalidWitnessProgramLength != null) { + return invalidWitnessProgramLength(this); + } + return orElse(); + } +} + +abstract class AddressError_InvalidWitnessProgramLength extends AddressError { + const factory AddressError_InvalidWitnessProgramLength(final BigInt field0) = + _$AddressError_InvalidWitnessProgramLengthImpl; + const AddressError_InvalidWitnessProgramLength._() : super._(); + + BigInt get field0; + @JsonKey(ignore: true) + _$$AddressError_InvalidWitnessProgramLengthImplCopyWith< + _$AddressError_InvalidWitnessProgramLengthImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith<$Res> { + factory _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith( + _$AddressError_InvalidSegwitV0ProgramLengthImpl value, + $Res Function(_$AddressError_InvalidSegwitV0ProgramLengthImpl) then) = + __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt field0}); +} + +/// @nodoc +class __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_InvalidSegwitV0ProgramLengthImpl> + implements _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith<$Res> { + __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl( + _$AddressError_InvalidSegwitV0ProgramLengthImpl _value, + $Res Function(_$AddressError_InvalidSegwitV0ProgramLengthImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$AddressError_InvalidSegwitV0ProgramLengthImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$AddressError_InvalidSegwitV0ProgramLengthImpl + extends AddressError_InvalidSegwitV0ProgramLength { + const _$AddressError_InvalidSegwitV0ProgramLengthImpl(this.field0) + : super._(); + + @override + final BigInt field0; + + @override + String toString() { + return 'AddressError.invalidSegwitV0ProgramLength(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_InvalidSegwitV0ProgramLengthImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith< + _$AddressError_InvalidSegwitV0ProgramLengthImpl> + get copyWith => + __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl< + _$AddressError_InvalidSegwitV0ProgramLengthImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return invalidSegwitV0ProgramLength(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return invalidSegwitV0ProgramLength?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (invalidSegwitV0ProgramLength != null) { + return invalidSegwitV0ProgramLength(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return invalidSegwitV0ProgramLength(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return invalidSegwitV0ProgramLength?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (invalidSegwitV0ProgramLength != null) { + return invalidSegwitV0ProgramLength(this); + } + return orElse(); + } +} + +abstract class AddressError_InvalidSegwitV0ProgramLength extends AddressError { + const factory AddressError_InvalidSegwitV0ProgramLength(final BigInt field0) = + _$AddressError_InvalidSegwitV0ProgramLengthImpl; + const AddressError_InvalidSegwitV0ProgramLength._() : super._(); + + BigInt get field0; + @JsonKey(ignore: true) + _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith< + _$AddressError_InvalidSegwitV0ProgramLengthImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AddressError_UncompressedPubkeyImplCopyWith<$Res> { + factory _$$AddressError_UncompressedPubkeyImplCopyWith( + _$AddressError_UncompressedPubkeyImpl value, + $Res Function(_$AddressError_UncompressedPubkeyImpl) then) = + __$$AddressError_UncompressedPubkeyImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$AddressError_UncompressedPubkeyImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_UncompressedPubkeyImpl> + implements _$$AddressError_UncompressedPubkeyImplCopyWith<$Res> { + __$$AddressError_UncompressedPubkeyImplCopyWithImpl( + _$AddressError_UncompressedPubkeyImpl _value, + $Res Function(_$AddressError_UncompressedPubkeyImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$AddressError_UncompressedPubkeyImpl + extends AddressError_UncompressedPubkey { + const _$AddressError_UncompressedPubkeyImpl() : super._(); + + @override + String toString() { + return 'AddressError.uncompressedPubkey()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_UncompressedPubkeyImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return uncompressedPubkey(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return uncompressedPubkey?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (uncompressedPubkey != null) { + return uncompressedPubkey(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return uncompressedPubkey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return uncompressedPubkey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (uncompressedPubkey != null) { + return uncompressedPubkey(this); + } + return orElse(); + } +} + +abstract class AddressError_UncompressedPubkey extends AddressError { + const factory AddressError_UncompressedPubkey() = + _$AddressError_UncompressedPubkeyImpl; + const AddressError_UncompressedPubkey._() : super._(); +} + +/// @nodoc +abstract class _$$AddressError_ExcessiveScriptSizeImplCopyWith<$Res> { + factory _$$AddressError_ExcessiveScriptSizeImplCopyWith( + _$AddressError_ExcessiveScriptSizeImpl value, + $Res Function(_$AddressError_ExcessiveScriptSizeImpl) then) = + __$$AddressError_ExcessiveScriptSizeImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$AddressError_ExcessiveScriptSizeImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_ExcessiveScriptSizeImpl> + implements _$$AddressError_ExcessiveScriptSizeImplCopyWith<$Res> { + __$$AddressError_ExcessiveScriptSizeImplCopyWithImpl( + _$AddressError_ExcessiveScriptSizeImpl _value, + $Res Function(_$AddressError_ExcessiveScriptSizeImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$AddressError_ExcessiveScriptSizeImpl + extends AddressError_ExcessiveScriptSize { + const _$AddressError_ExcessiveScriptSizeImpl() : super._(); + + @override + String toString() { + return 'AddressError.excessiveScriptSize()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_ExcessiveScriptSizeImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return excessiveScriptSize(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return excessiveScriptSize?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (excessiveScriptSize != null) { + return excessiveScriptSize(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return excessiveScriptSize(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return excessiveScriptSize?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (excessiveScriptSize != null) { + return excessiveScriptSize(this); + } + return orElse(); + } +} + +abstract class AddressError_ExcessiveScriptSize extends AddressError { + const factory AddressError_ExcessiveScriptSize() = + _$AddressError_ExcessiveScriptSizeImpl; + const AddressError_ExcessiveScriptSize._() : super._(); +} + +/// @nodoc +abstract class _$$AddressError_UnrecognizedScriptImplCopyWith<$Res> { + factory _$$AddressError_UnrecognizedScriptImplCopyWith( + _$AddressError_UnrecognizedScriptImpl value, + $Res Function(_$AddressError_UnrecognizedScriptImpl) then) = + __$$AddressError_UnrecognizedScriptImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$AddressError_UnrecognizedScriptImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_UnrecognizedScriptImpl> + implements _$$AddressError_UnrecognizedScriptImplCopyWith<$Res> { + __$$AddressError_UnrecognizedScriptImplCopyWithImpl( + _$AddressError_UnrecognizedScriptImpl _value, + $Res Function(_$AddressError_UnrecognizedScriptImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$AddressError_UnrecognizedScriptImpl + extends AddressError_UnrecognizedScript { + const _$AddressError_UnrecognizedScriptImpl() : super._(); + + @override + String toString() { + return 'AddressError.unrecognizedScript()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_UnrecognizedScriptImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return unrecognizedScript(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return unrecognizedScript?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (unrecognizedScript != null) { + return unrecognizedScript(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return unrecognizedScript(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return unrecognizedScript?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (unrecognizedScript != null) { + return unrecognizedScript(this); + } + return orElse(); + } +} + +abstract class AddressError_UnrecognizedScript extends AddressError { + const factory AddressError_UnrecognizedScript() = + _$AddressError_UnrecognizedScriptImpl; + const AddressError_UnrecognizedScript._() : super._(); +} + +/// @nodoc +abstract class _$$AddressError_UnknownAddressTypeImplCopyWith<$Res> { + factory _$$AddressError_UnknownAddressTypeImplCopyWith( + _$AddressError_UnknownAddressTypeImpl value, + $Res Function(_$AddressError_UnknownAddressTypeImpl) then) = + __$$AddressError_UnknownAddressTypeImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$AddressError_UnknownAddressTypeImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_UnknownAddressTypeImpl> + implements _$$AddressError_UnknownAddressTypeImplCopyWith<$Res> { + __$$AddressError_UnknownAddressTypeImplCopyWithImpl( + _$AddressError_UnknownAddressTypeImpl _value, + $Res Function(_$AddressError_UnknownAddressTypeImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$AddressError_UnknownAddressTypeImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$AddressError_UnknownAddressTypeImpl + extends AddressError_UnknownAddressType { + const _$AddressError_UnknownAddressTypeImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'AddressError.unknownAddressType(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_UnknownAddressTypeImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressError_UnknownAddressTypeImplCopyWith< + _$AddressError_UnknownAddressTypeImpl> + get copyWith => __$$AddressError_UnknownAddressTypeImplCopyWithImpl< + _$AddressError_UnknownAddressTypeImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return unknownAddressType(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return unknownAddressType?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (unknownAddressType != null) { + return unknownAddressType(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return unknownAddressType(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return unknownAddressType?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (unknownAddressType != null) { + return unknownAddressType(this); + } + return orElse(); + } +} + +abstract class AddressError_UnknownAddressType extends AddressError { + const factory AddressError_UnknownAddressType(final String field0) = + _$AddressError_UnknownAddressTypeImpl; + const AddressError_UnknownAddressType._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$AddressError_UnknownAddressTypeImplCopyWith< + _$AddressError_UnknownAddressTypeImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AddressError_NetworkValidationImplCopyWith<$Res> { + factory _$$AddressError_NetworkValidationImplCopyWith( + _$AddressError_NetworkValidationImpl value, + $Res Function(_$AddressError_NetworkValidationImpl) then) = + __$$AddressError_NetworkValidationImplCopyWithImpl<$Res>; + @useResult + $Res call({Network networkRequired, Network networkFound, String address}); +} + +/// @nodoc +class __$$AddressError_NetworkValidationImplCopyWithImpl<$Res> + extends _$AddressErrorCopyWithImpl<$Res, + _$AddressError_NetworkValidationImpl> + implements _$$AddressError_NetworkValidationImplCopyWith<$Res> { + __$$AddressError_NetworkValidationImplCopyWithImpl( + _$AddressError_NetworkValidationImpl _value, + $Res Function(_$AddressError_NetworkValidationImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? networkRequired = null, + Object? networkFound = null, + Object? address = null, + }) { + return _then(_$AddressError_NetworkValidationImpl( + networkRequired: null == networkRequired + ? _value.networkRequired + : networkRequired // ignore: cast_nullable_to_non_nullable + as Network, + networkFound: null == networkFound + ? _value.networkFound + : networkFound // ignore: cast_nullable_to_non_nullable + as Network, + address: null == address + ? _value.address + : address // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$AddressError_NetworkValidationImpl + extends AddressError_NetworkValidation { + const _$AddressError_NetworkValidationImpl( + {required this.networkRequired, + required this.networkFound, + required this.address}) + : super._(); + + @override + final Network networkRequired; + @override + final Network networkFound; + @override + final String address; + + @override + String toString() { + return 'AddressError.networkValidation(networkRequired: $networkRequired, networkFound: $networkFound, address: $address)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressError_NetworkValidationImpl && + (identical(other.networkRequired, networkRequired) || + other.networkRequired == networkRequired) && + (identical(other.networkFound, networkFound) || + other.networkFound == networkFound) && + (identical(other.address, address) || other.address == address)); + } + + @override + int get hashCode => + Object.hash(runtimeType, networkRequired, networkFound, address); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressError_NetworkValidationImplCopyWith< + _$AddressError_NetworkValidationImpl> + get copyWith => __$$AddressError_NetworkValidationImplCopyWithImpl< + _$AddressError_NetworkValidationImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) base58, + required TResult Function(String field0) bech32, + required TResult Function() emptyBech32Payload, + required TResult Function(Variant expected, Variant found) + invalidBech32Variant, + required TResult Function(int field0) invalidWitnessVersion, + required TResult Function(String field0) unparsableWitnessVersion, + required TResult Function() malformedWitnessVersion, + required TResult Function(BigInt field0) invalidWitnessProgramLength, + required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, + required TResult Function() uncompressedPubkey, + required TResult Function() excessiveScriptSize, + required TResult Function() unrecognizedScript, + required TResult Function(String field0) unknownAddressType, + required TResult Function( + Network networkRequired, Network networkFound, String address) + networkValidation, + }) { + return networkValidation(networkRequired, networkFound, address); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? base58, + TResult? Function(String field0)? bech32, + TResult? Function()? emptyBech32Payload, + TResult? Function(Variant expected, Variant found)? invalidBech32Variant, + TResult? Function(int field0)? invalidWitnessVersion, + TResult? Function(String field0)? unparsableWitnessVersion, + TResult? Function()? malformedWitnessVersion, + TResult? Function(BigInt field0)? invalidWitnessProgramLength, + TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult? Function()? uncompressedPubkey, + TResult? Function()? excessiveScriptSize, + TResult? Function()? unrecognizedScript, + TResult? Function(String field0)? unknownAddressType, + TResult? Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + }) { + return networkValidation?.call(networkRequired, networkFound, address); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? base58, + TResult Function(String field0)? bech32, + TResult Function()? emptyBech32Payload, + TResult Function(Variant expected, Variant found)? invalidBech32Variant, + TResult Function(int field0)? invalidWitnessVersion, + TResult Function(String field0)? unparsableWitnessVersion, + TResult Function()? malformedWitnessVersion, + TResult Function(BigInt field0)? invalidWitnessProgramLength, + TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, + TResult Function()? uncompressedPubkey, + TResult Function()? excessiveScriptSize, + TResult Function()? unrecognizedScript, + TResult Function(String field0)? unknownAddressType, + TResult Function( + Network networkRequired, Network networkFound, String address)? + networkValidation, + required TResult orElse(), + }) { + if (networkValidation != null) { + return networkValidation(networkRequired, networkFound, address); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressError_Base58 value) base58, + required TResult Function(AddressError_Bech32 value) bech32, + required TResult Function(AddressError_EmptyBech32Payload value) + emptyBech32Payload, + required TResult Function(AddressError_InvalidBech32Variant value) + invalidBech32Variant, + required TResult Function(AddressError_InvalidWitnessVersion value) + invalidWitnessVersion, + required TResult Function(AddressError_UnparsableWitnessVersion value) + unparsableWitnessVersion, + required TResult Function(AddressError_MalformedWitnessVersion value) + malformedWitnessVersion, + required TResult Function(AddressError_InvalidWitnessProgramLength value) + invalidWitnessProgramLength, + required TResult Function(AddressError_InvalidSegwitV0ProgramLength value) + invalidSegwitV0ProgramLength, + required TResult Function(AddressError_UncompressedPubkey value) + uncompressedPubkey, + required TResult Function(AddressError_ExcessiveScriptSize value) + excessiveScriptSize, + required TResult Function(AddressError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(AddressError_UnknownAddressType value) + unknownAddressType, + required TResult Function(AddressError_NetworkValidation value) + networkValidation, + }) { + return networkValidation(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressError_Base58 value)? base58, + TResult? Function(AddressError_Bech32 value)? bech32, + TResult? Function(AddressError_EmptyBech32Payload value)? + emptyBech32Payload, + TResult? Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult? Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult? Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult? Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult? Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult? Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult? Function(AddressError_UncompressedPubkey value)? + uncompressedPubkey, + TResult? Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult? Function(AddressError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(AddressError_UnknownAddressType value)? + unknownAddressType, + TResult? Function(AddressError_NetworkValidation value)? networkValidation, + }) { + return networkValidation?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressError_Base58 value)? base58, + TResult Function(AddressError_Bech32 value)? bech32, + TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, + TResult Function(AddressError_InvalidBech32Variant value)? + invalidBech32Variant, + TResult Function(AddressError_InvalidWitnessVersion value)? + invalidWitnessVersion, + TResult Function(AddressError_UnparsableWitnessVersion value)? + unparsableWitnessVersion, + TResult Function(AddressError_MalformedWitnessVersion value)? + malformedWitnessVersion, + TResult Function(AddressError_InvalidWitnessProgramLength value)? + invalidWitnessProgramLength, + TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? + invalidSegwitV0ProgramLength, + TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, + TResult Function(AddressError_ExcessiveScriptSize value)? + excessiveScriptSize, + TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, + TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, + TResult Function(AddressError_NetworkValidation value)? networkValidation, + required TResult orElse(), + }) { + if (networkValidation != null) { + return networkValidation(this); + } + return orElse(); + } +} + +abstract class AddressError_NetworkValidation extends AddressError { + const factory AddressError_NetworkValidation( + {required final Network networkRequired, + required final Network networkFound, + required final String address}) = _$AddressError_NetworkValidationImpl; + const AddressError_NetworkValidation._() : super._(); + + Network get networkRequired; + Network get networkFound; + String get address; + @JsonKey(ignore: true) + _$$AddressError_NetworkValidationImplCopyWith< + _$AddressError_NetworkValidationImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$BdkError { + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $BdkErrorCopyWith<$Res> { + factory $BdkErrorCopyWith(BdkError value, $Res Function(BdkError) then) = + _$BdkErrorCopyWithImpl<$Res, BdkError>; +} + +/// @nodoc +class _$BdkErrorCopyWithImpl<$Res, $Val extends BdkError> + implements $BdkErrorCopyWith<$Res> { + _$BdkErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$BdkError_HexImplCopyWith<$Res> { + factory _$$BdkError_HexImplCopyWith( + _$BdkError_HexImpl value, $Res Function(_$BdkError_HexImpl) then) = + __$$BdkError_HexImplCopyWithImpl<$Res>; + @useResult + $Res call({HexError field0}); + + $HexErrorCopyWith<$Res> get field0; +} + +/// @nodoc +class __$$BdkError_HexImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_HexImpl> + implements _$$BdkError_HexImplCopyWith<$Res> { + __$$BdkError_HexImplCopyWithImpl( + _$BdkError_HexImpl _value, $Res Function(_$BdkError_HexImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_HexImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as HexError, + )); + } + + @override + @pragma('vm:prefer-inline') + $HexErrorCopyWith<$Res> get field0 { + return $HexErrorCopyWith<$Res>(_value.field0, (value) { + return _then(_value.copyWith(field0: value)); + }); + } +} + +/// @nodoc + +class _$BdkError_HexImpl extends BdkError_Hex { + const _$BdkError_HexImpl(this.field0) : super._(); + + @override + final HexError field0; + + @override + String toString() { + return 'BdkError.hex(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_HexImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_HexImplCopyWith<_$BdkError_HexImpl> get copyWith => + __$$BdkError_HexImplCopyWithImpl<_$BdkError_HexImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return hex(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return hex?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (hex != null) { + return hex(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return hex(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return hex?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (hex != null) { + return hex(this); + } + return orElse(); + } +} + +abstract class BdkError_Hex extends BdkError { + const factory BdkError_Hex(final HexError field0) = _$BdkError_HexImpl; + const BdkError_Hex._() : super._(); + + HexError get field0; + @JsonKey(ignore: true) + _$$BdkError_HexImplCopyWith<_$BdkError_HexImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_ConsensusImplCopyWith<$Res> { + factory _$$BdkError_ConsensusImplCopyWith(_$BdkError_ConsensusImpl value, + $Res Function(_$BdkError_ConsensusImpl) then) = + __$$BdkError_ConsensusImplCopyWithImpl<$Res>; + @useResult + $Res call({ConsensusError field0}); + + $ConsensusErrorCopyWith<$Res> get field0; +} + +/// @nodoc +class __$$BdkError_ConsensusImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_ConsensusImpl> + implements _$$BdkError_ConsensusImplCopyWith<$Res> { + __$$BdkError_ConsensusImplCopyWithImpl(_$BdkError_ConsensusImpl _value, + $Res Function(_$BdkError_ConsensusImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_ConsensusImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as ConsensusError, + )); + } + + @override + @pragma('vm:prefer-inline') + $ConsensusErrorCopyWith<$Res> get field0 { + return $ConsensusErrorCopyWith<$Res>(_value.field0, (value) { + return _then(_value.copyWith(field0: value)); + }); + } +} + +/// @nodoc + +class _$BdkError_ConsensusImpl extends BdkError_Consensus { + const _$BdkError_ConsensusImpl(this.field0) : super._(); + + @override + final ConsensusError field0; + + @override + String toString() { + return 'BdkError.consensus(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_ConsensusImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_ConsensusImplCopyWith<_$BdkError_ConsensusImpl> get copyWith => + __$$BdkError_ConsensusImplCopyWithImpl<_$BdkError_ConsensusImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return consensus(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return consensus?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (consensus != null) { + return consensus(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return consensus(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return consensus?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (consensus != null) { + return consensus(this); + } + return orElse(); + } +} + +abstract class BdkError_Consensus extends BdkError { + const factory BdkError_Consensus(final ConsensusError field0) = + _$BdkError_ConsensusImpl; + const BdkError_Consensus._() : super._(); + + ConsensusError get field0; + @JsonKey(ignore: true) + _$$BdkError_ConsensusImplCopyWith<_$BdkError_ConsensusImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_VerifyTransactionImplCopyWith<$Res> { + factory _$$BdkError_VerifyTransactionImplCopyWith( + _$BdkError_VerifyTransactionImpl value, + $Res Function(_$BdkError_VerifyTransactionImpl) then) = + __$$BdkError_VerifyTransactionImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_VerifyTransactionImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_VerifyTransactionImpl> + implements _$$BdkError_VerifyTransactionImplCopyWith<$Res> { + __$$BdkError_VerifyTransactionImplCopyWithImpl( + _$BdkError_VerifyTransactionImpl _value, + $Res Function(_$BdkError_VerifyTransactionImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_VerifyTransactionImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_VerifyTransactionImpl extends BdkError_VerifyTransaction { + const _$BdkError_VerifyTransactionImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.verifyTransaction(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_VerifyTransactionImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_VerifyTransactionImplCopyWith<_$BdkError_VerifyTransactionImpl> + get copyWith => __$$BdkError_VerifyTransactionImplCopyWithImpl< + _$BdkError_VerifyTransactionImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return verifyTransaction(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return verifyTransaction?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (verifyTransaction != null) { + return verifyTransaction(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return verifyTransaction(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return verifyTransaction?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (verifyTransaction != null) { + return verifyTransaction(this); + } + return orElse(); + } +} + +abstract class BdkError_VerifyTransaction extends BdkError { + const factory BdkError_VerifyTransaction(final String field0) = + _$BdkError_VerifyTransactionImpl; + const BdkError_VerifyTransaction._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_VerifyTransactionImplCopyWith<_$BdkError_VerifyTransactionImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_AddressImplCopyWith<$Res> { + factory _$$BdkError_AddressImplCopyWith(_$BdkError_AddressImpl value, + $Res Function(_$BdkError_AddressImpl) then) = + __$$BdkError_AddressImplCopyWithImpl<$Res>; + @useResult + $Res call({AddressError field0}); + + $AddressErrorCopyWith<$Res> get field0; +} + +/// @nodoc +class __$$BdkError_AddressImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_AddressImpl> + implements _$$BdkError_AddressImplCopyWith<$Res> { + __$$BdkError_AddressImplCopyWithImpl(_$BdkError_AddressImpl _value, + $Res Function(_$BdkError_AddressImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_AddressImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as AddressError, + )); + } + + @override + @pragma('vm:prefer-inline') + $AddressErrorCopyWith<$Res> get field0 { + return $AddressErrorCopyWith<$Res>(_value.field0, (value) { + return _then(_value.copyWith(field0: value)); + }); + } +} + +/// @nodoc + +class _$BdkError_AddressImpl extends BdkError_Address { + const _$BdkError_AddressImpl(this.field0) : super._(); + + @override + final AddressError field0; + + @override + String toString() { + return 'BdkError.address(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_AddressImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_AddressImplCopyWith<_$BdkError_AddressImpl> get copyWith => + __$$BdkError_AddressImplCopyWithImpl<_$BdkError_AddressImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return address(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return address?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (address != null) { + return address(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return address(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return address?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (address != null) { + return address(this); + } + return orElse(); + } +} + +abstract class BdkError_Address extends BdkError { + const factory BdkError_Address(final AddressError field0) = + _$BdkError_AddressImpl; + const BdkError_Address._() : super._(); + + AddressError get field0; + @JsonKey(ignore: true) + _$$BdkError_AddressImplCopyWith<_$BdkError_AddressImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_DescriptorImplCopyWith<$Res> { + factory _$$BdkError_DescriptorImplCopyWith(_$BdkError_DescriptorImpl value, + $Res Function(_$BdkError_DescriptorImpl) then) = + __$$BdkError_DescriptorImplCopyWithImpl<$Res>; + @useResult + $Res call({DescriptorError field0}); + + $DescriptorErrorCopyWith<$Res> get field0; +} + +/// @nodoc +class __$$BdkError_DescriptorImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_DescriptorImpl> + implements _$$BdkError_DescriptorImplCopyWith<$Res> { + __$$BdkError_DescriptorImplCopyWithImpl(_$BdkError_DescriptorImpl _value, + $Res Function(_$BdkError_DescriptorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_DescriptorImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as DescriptorError, + )); + } + + @override + @pragma('vm:prefer-inline') + $DescriptorErrorCopyWith<$Res> get field0 { + return $DescriptorErrorCopyWith<$Res>(_value.field0, (value) { + return _then(_value.copyWith(field0: value)); + }); + } +} + +/// @nodoc + +class _$BdkError_DescriptorImpl extends BdkError_Descriptor { + const _$BdkError_DescriptorImpl(this.field0) : super._(); + + @override + final DescriptorError field0; + + @override + String toString() { + return 'BdkError.descriptor(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_DescriptorImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_DescriptorImplCopyWith<_$BdkError_DescriptorImpl> get copyWith => + __$$BdkError_DescriptorImplCopyWithImpl<_$BdkError_DescriptorImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return descriptor(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return descriptor?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (descriptor != null) { + return descriptor(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return descriptor(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return descriptor?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (descriptor != null) { + return descriptor(this); + } + return orElse(); + } +} + +abstract class BdkError_Descriptor extends BdkError { + const factory BdkError_Descriptor(final DescriptorError field0) = + _$BdkError_DescriptorImpl; + const BdkError_Descriptor._() : super._(); + + DescriptorError get field0; + @JsonKey(ignore: true) + _$$BdkError_DescriptorImplCopyWith<_$BdkError_DescriptorImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_InvalidU32BytesImplCopyWith<$Res> { + factory _$$BdkError_InvalidU32BytesImplCopyWith( + _$BdkError_InvalidU32BytesImpl value, + $Res Function(_$BdkError_InvalidU32BytesImpl) then) = + __$$BdkError_InvalidU32BytesImplCopyWithImpl<$Res>; + @useResult + $Res call({Uint8List field0}); +} + +/// @nodoc +class __$$BdkError_InvalidU32BytesImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidU32BytesImpl> + implements _$$BdkError_InvalidU32BytesImplCopyWith<$Res> { + __$$BdkError_InvalidU32BytesImplCopyWithImpl( + _$BdkError_InvalidU32BytesImpl _value, + $Res Function(_$BdkError_InvalidU32BytesImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_InvalidU32BytesImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as Uint8List, + )); + } +} + +/// @nodoc + +class _$BdkError_InvalidU32BytesImpl extends BdkError_InvalidU32Bytes { + const _$BdkError_InvalidU32BytesImpl(this.field0) : super._(); + + @override + final Uint8List field0; + + @override + String toString() { + return 'BdkError.invalidU32Bytes(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_InvalidU32BytesImpl && + const DeepCollectionEquality().equals(other.field0, field0)); + } + + @override + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_InvalidU32BytesImplCopyWith<_$BdkError_InvalidU32BytesImpl> + get copyWith => __$$BdkError_InvalidU32BytesImplCopyWithImpl< + _$BdkError_InvalidU32BytesImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return invalidU32Bytes(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return invalidU32Bytes?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidU32Bytes != null) { + return invalidU32Bytes(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return invalidU32Bytes(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return invalidU32Bytes?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidU32Bytes != null) { + return invalidU32Bytes(this); + } + return orElse(); + } +} + +abstract class BdkError_InvalidU32Bytes extends BdkError { + const factory BdkError_InvalidU32Bytes(final Uint8List field0) = + _$BdkError_InvalidU32BytesImpl; + const BdkError_InvalidU32Bytes._() : super._(); + + Uint8List get field0; + @JsonKey(ignore: true) + _$$BdkError_InvalidU32BytesImplCopyWith<_$BdkError_InvalidU32BytesImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_GenericImplCopyWith<$Res> { + factory _$$BdkError_GenericImplCopyWith(_$BdkError_GenericImpl value, + $Res Function(_$BdkError_GenericImpl) then) = + __$$BdkError_GenericImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_GenericImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_GenericImpl> + implements _$$BdkError_GenericImplCopyWith<$Res> { + __$$BdkError_GenericImplCopyWithImpl(_$BdkError_GenericImpl _value, + $Res Function(_$BdkError_GenericImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_GenericImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_GenericImpl extends BdkError_Generic { + const _$BdkError_GenericImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.generic(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_GenericImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_GenericImplCopyWith<_$BdkError_GenericImpl> get copyWith => + __$$BdkError_GenericImplCopyWithImpl<_$BdkError_GenericImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return generic(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return generic?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (generic != null) { + return generic(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return generic(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return generic?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (generic != null) { + return generic(this); + } + return orElse(); + } +} + +abstract class BdkError_Generic extends BdkError { + const factory BdkError_Generic(final String field0) = _$BdkError_GenericImpl; + const BdkError_Generic._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_GenericImplCopyWith<_$BdkError_GenericImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_ScriptDoesntHaveAddressFormImplCopyWith<$Res> { + factory _$$BdkError_ScriptDoesntHaveAddressFormImplCopyWith( + _$BdkError_ScriptDoesntHaveAddressFormImpl value, + $Res Function(_$BdkError_ScriptDoesntHaveAddressFormImpl) then) = + __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, + _$BdkError_ScriptDoesntHaveAddressFormImpl> + implements _$$BdkError_ScriptDoesntHaveAddressFormImplCopyWith<$Res> { + __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl( + _$BdkError_ScriptDoesntHaveAddressFormImpl _value, + $Res Function(_$BdkError_ScriptDoesntHaveAddressFormImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_ScriptDoesntHaveAddressFormImpl + extends BdkError_ScriptDoesntHaveAddressForm { + const _$BdkError_ScriptDoesntHaveAddressFormImpl() : super._(); + + @override + String toString() { + return 'BdkError.scriptDoesntHaveAddressForm()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_ScriptDoesntHaveAddressFormImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return scriptDoesntHaveAddressForm(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return scriptDoesntHaveAddressForm?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (scriptDoesntHaveAddressForm != null) { + return scriptDoesntHaveAddressForm(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return scriptDoesntHaveAddressForm(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return scriptDoesntHaveAddressForm?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (scriptDoesntHaveAddressForm != null) { + return scriptDoesntHaveAddressForm(this); + } + return orElse(); + } +} + +abstract class BdkError_ScriptDoesntHaveAddressForm extends BdkError { + const factory BdkError_ScriptDoesntHaveAddressForm() = + _$BdkError_ScriptDoesntHaveAddressFormImpl; + const BdkError_ScriptDoesntHaveAddressForm._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_NoRecipientsImplCopyWith<$Res> { + factory _$$BdkError_NoRecipientsImplCopyWith( + _$BdkError_NoRecipientsImpl value, + $Res Function(_$BdkError_NoRecipientsImpl) then) = + __$$BdkError_NoRecipientsImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_NoRecipientsImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_NoRecipientsImpl> + implements _$$BdkError_NoRecipientsImplCopyWith<$Res> { + __$$BdkError_NoRecipientsImplCopyWithImpl(_$BdkError_NoRecipientsImpl _value, + $Res Function(_$BdkError_NoRecipientsImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_NoRecipientsImpl extends BdkError_NoRecipients { + const _$BdkError_NoRecipientsImpl() : super._(); + + @override + String toString() { + return 'BdkError.noRecipients()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_NoRecipientsImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return noRecipients(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return noRecipients?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (noRecipients != null) { + return noRecipients(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return noRecipients(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return noRecipients?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (noRecipients != null) { + return noRecipients(this); + } + return orElse(); + } +} + +abstract class BdkError_NoRecipients extends BdkError { + const factory BdkError_NoRecipients() = _$BdkError_NoRecipientsImpl; + const BdkError_NoRecipients._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_NoUtxosSelectedImplCopyWith<$Res> { + factory _$$BdkError_NoUtxosSelectedImplCopyWith( + _$BdkError_NoUtxosSelectedImpl value, + $Res Function(_$BdkError_NoUtxosSelectedImpl) then) = + __$$BdkError_NoUtxosSelectedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_NoUtxosSelectedImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_NoUtxosSelectedImpl> + implements _$$BdkError_NoUtxosSelectedImplCopyWith<$Res> { + __$$BdkError_NoUtxosSelectedImplCopyWithImpl( + _$BdkError_NoUtxosSelectedImpl _value, + $Res Function(_$BdkError_NoUtxosSelectedImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_NoUtxosSelectedImpl extends BdkError_NoUtxosSelected { + const _$BdkError_NoUtxosSelectedImpl() : super._(); + + @override + String toString() { + return 'BdkError.noUtxosSelected()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_NoUtxosSelectedImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return noUtxosSelected(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return noUtxosSelected?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (noUtxosSelected != null) { + return noUtxosSelected(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return noUtxosSelected(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return noUtxosSelected?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (noUtxosSelected != null) { + return noUtxosSelected(this); + } + return orElse(); + } +} + +abstract class BdkError_NoUtxosSelected extends BdkError { + const factory BdkError_NoUtxosSelected() = _$BdkError_NoUtxosSelectedImpl; + const BdkError_NoUtxosSelected._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_OutputBelowDustLimitImplCopyWith<$Res> { + factory _$$BdkError_OutputBelowDustLimitImplCopyWith( + _$BdkError_OutputBelowDustLimitImpl value, + $Res Function(_$BdkError_OutputBelowDustLimitImpl) then) = + __$$BdkError_OutputBelowDustLimitImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt field0}); +} + +/// @nodoc +class __$$BdkError_OutputBelowDustLimitImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_OutputBelowDustLimitImpl> + implements _$$BdkError_OutputBelowDustLimitImplCopyWith<$Res> { + __$$BdkError_OutputBelowDustLimitImplCopyWithImpl( + _$BdkError_OutputBelowDustLimitImpl _value, + $Res Function(_$BdkError_OutputBelowDustLimitImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_OutputBelowDustLimitImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$BdkError_OutputBelowDustLimitImpl + extends BdkError_OutputBelowDustLimit { + const _$BdkError_OutputBelowDustLimitImpl(this.field0) : super._(); + + @override + final BigInt field0; + + @override + String toString() { + return 'BdkError.outputBelowDustLimit(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_OutputBelowDustLimitImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_OutputBelowDustLimitImplCopyWith< + _$BdkError_OutputBelowDustLimitImpl> + get copyWith => __$$BdkError_OutputBelowDustLimitImplCopyWithImpl< + _$BdkError_OutputBelowDustLimitImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return outputBelowDustLimit(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return outputBelowDustLimit?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (outputBelowDustLimit != null) { + return outputBelowDustLimit(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return outputBelowDustLimit(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return outputBelowDustLimit?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (outputBelowDustLimit != null) { + return outputBelowDustLimit(this); + } + return orElse(); + } +} + +abstract class BdkError_OutputBelowDustLimit extends BdkError { + const factory BdkError_OutputBelowDustLimit(final BigInt field0) = + _$BdkError_OutputBelowDustLimitImpl; + const BdkError_OutputBelowDustLimit._() : super._(); + + BigInt get field0; + @JsonKey(ignore: true) + _$$BdkError_OutputBelowDustLimitImplCopyWith< + _$BdkError_OutputBelowDustLimitImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_InsufficientFundsImplCopyWith<$Res> { + factory _$$BdkError_InsufficientFundsImplCopyWith( + _$BdkError_InsufficientFundsImpl value, + $Res Function(_$BdkError_InsufficientFundsImpl) then) = + __$$BdkError_InsufficientFundsImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt needed, BigInt available}); +} + +/// @nodoc +class __$$BdkError_InsufficientFundsImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InsufficientFundsImpl> + implements _$$BdkError_InsufficientFundsImplCopyWith<$Res> { + __$$BdkError_InsufficientFundsImplCopyWithImpl( + _$BdkError_InsufficientFundsImpl _value, + $Res Function(_$BdkError_InsufficientFundsImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? needed = null, + Object? available = null, + }) { + return _then(_$BdkError_InsufficientFundsImpl( + needed: null == needed + ? _value.needed + : needed // ignore: cast_nullable_to_non_nullable + as BigInt, + available: null == available + ? _value.available + : available // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$BdkError_InsufficientFundsImpl extends BdkError_InsufficientFunds { + const _$BdkError_InsufficientFundsImpl( + {required this.needed, required this.available}) + : super._(); + + /// Sats needed for some transaction + @override + final BigInt needed; + + /// Sats available for spending + @override + final BigInt available; + + @override + String toString() { + return 'BdkError.insufficientFunds(needed: $needed, available: $available)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_InsufficientFundsImpl && + (identical(other.needed, needed) || other.needed == needed) && + (identical(other.available, available) || + other.available == available)); + } + + @override + int get hashCode => Object.hash(runtimeType, needed, available); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_InsufficientFundsImplCopyWith<_$BdkError_InsufficientFundsImpl> + get copyWith => __$$BdkError_InsufficientFundsImplCopyWithImpl< + _$BdkError_InsufficientFundsImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return insufficientFunds(needed, available); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return insufficientFunds?.call(needed, available); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (insufficientFunds != null) { + return insufficientFunds(needed, available); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return insufficientFunds(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return insufficientFunds?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (insufficientFunds != null) { + return insufficientFunds(this); + } + return orElse(); + } +} + +abstract class BdkError_InsufficientFunds extends BdkError { + const factory BdkError_InsufficientFunds( + {required final BigInt needed, + required final BigInt available}) = _$BdkError_InsufficientFundsImpl; + const BdkError_InsufficientFunds._() : super._(); + + /// Sats needed for some transaction + BigInt get needed; + + /// Sats available for spending + BigInt get available; + @JsonKey(ignore: true) + _$$BdkError_InsufficientFundsImplCopyWith<_$BdkError_InsufficientFundsImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_BnBTotalTriesExceededImplCopyWith<$Res> { + factory _$$BdkError_BnBTotalTriesExceededImplCopyWith( + _$BdkError_BnBTotalTriesExceededImpl value, + $Res Function(_$BdkError_BnBTotalTriesExceededImpl) then) = + __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_BnBTotalTriesExceededImpl> + implements _$$BdkError_BnBTotalTriesExceededImplCopyWith<$Res> { + __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl( + _$BdkError_BnBTotalTriesExceededImpl _value, + $Res Function(_$BdkError_BnBTotalTriesExceededImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_BnBTotalTriesExceededImpl + extends BdkError_BnBTotalTriesExceeded { + const _$BdkError_BnBTotalTriesExceededImpl() : super._(); + + @override + String toString() { + return 'BdkError.bnBTotalTriesExceeded()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_BnBTotalTriesExceededImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return bnBTotalTriesExceeded(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return bnBTotalTriesExceeded?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (bnBTotalTriesExceeded != null) { + return bnBTotalTriesExceeded(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return bnBTotalTriesExceeded(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return bnBTotalTriesExceeded?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (bnBTotalTriesExceeded != null) { + return bnBTotalTriesExceeded(this); + } + return orElse(); + } +} + +abstract class BdkError_BnBTotalTriesExceeded extends BdkError { + const factory BdkError_BnBTotalTriesExceeded() = + _$BdkError_BnBTotalTriesExceededImpl; + const BdkError_BnBTotalTriesExceeded._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_BnBNoExactMatchImplCopyWith<$Res> { + factory _$$BdkError_BnBNoExactMatchImplCopyWith( + _$BdkError_BnBNoExactMatchImpl value, + $Res Function(_$BdkError_BnBNoExactMatchImpl) then) = + __$$BdkError_BnBNoExactMatchImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_BnBNoExactMatchImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_BnBNoExactMatchImpl> + implements _$$BdkError_BnBNoExactMatchImplCopyWith<$Res> { + __$$BdkError_BnBNoExactMatchImplCopyWithImpl( + _$BdkError_BnBNoExactMatchImpl _value, + $Res Function(_$BdkError_BnBNoExactMatchImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_BnBNoExactMatchImpl extends BdkError_BnBNoExactMatch { + const _$BdkError_BnBNoExactMatchImpl() : super._(); + + @override + String toString() { + return 'BdkError.bnBNoExactMatch()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_BnBNoExactMatchImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return bnBNoExactMatch(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return bnBNoExactMatch?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (bnBNoExactMatch != null) { + return bnBNoExactMatch(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return bnBNoExactMatch(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return bnBNoExactMatch?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (bnBNoExactMatch != null) { + return bnBNoExactMatch(this); + } + return orElse(); + } +} + +abstract class BdkError_BnBNoExactMatch extends BdkError { + const factory BdkError_BnBNoExactMatch() = _$BdkError_BnBNoExactMatchImpl; + const BdkError_BnBNoExactMatch._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_UnknownUtxoImplCopyWith<$Res> { + factory _$$BdkError_UnknownUtxoImplCopyWith(_$BdkError_UnknownUtxoImpl value, + $Res Function(_$BdkError_UnknownUtxoImpl) then) = + __$$BdkError_UnknownUtxoImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_UnknownUtxoImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_UnknownUtxoImpl> + implements _$$BdkError_UnknownUtxoImplCopyWith<$Res> { + __$$BdkError_UnknownUtxoImplCopyWithImpl(_$BdkError_UnknownUtxoImpl _value, + $Res Function(_$BdkError_UnknownUtxoImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_UnknownUtxoImpl extends BdkError_UnknownUtxo { + const _$BdkError_UnknownUtxoImpl() : super._(); + + @override + String toString() { + return 'BdkError.unknownUtxo()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_UnknownUtxoImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return unknownUtxo(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return unknownUtxo?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (unknownUtxo != null) { + return unknownUtxo(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return unknownUtxo(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return unknownUtxo?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (unknownUtxo != null) { + return unknownUtxo(this); + } + return orElse(); + } +} + +abstract class BdkError_UnknownUtxo extends BdkError { + const factory BdkError_UnknownUtxo() = _$BdkError_UnknownUtxoImpl; + const BdkError_UnknownUtxo._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_TransactionNotFoundImplCopyWith<$Res> { + factory _$$BdkError_TransactionNotFoundImplCopyWith( + _$BdkError_TransactionNotFoundImpl value, + $Res Function(_$BdkError_TransactionNotFoundImpl) then) = + __$$BdkError_TransactionNotFoundImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_TransactionNotFoundImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_TransactionNotFoundImpl> + implements _$$BdkError_TransactionNotFoundImplCopyWith<$Res> { + __$$BdkError_TransactionNotFoundImplCopyWithImpl( + _$BdkError_TransactionNotFoundImpl _value, + $Res Function(_$BdkError_TransactionNotFoundImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_TransactionNotFoundImpl extends BdkError_TransactionNotFound { + const _$BdkError_TransactionNotFoundImpl() : super._(); + + @override + String toString() { + return 'BdkError.transactionNotFound()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_TransactionNotFoundImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return transactionNotFound(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return transactionNotFound?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (transactionNotFound != null) { + return transactionNotFound(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return transactionNotFound(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return transactionNotFound?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (transactionNotFound != null) { + return transactionNotFound(this); + } + return orElse(); + } +} + +abstract class BdkError_TransactionNotFound extends BdkError { + const factory BdkError_TransactionNotFound() = + _$BdkError_TransactionNotFoundImpl; + const BdkError_TransactionNotFound._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_TransactionConfirmedImplCopyWith<$Res> { + factory _$$BdkError_TransactionConfirmedImplCopyWith( + _$BdkError_TransactionConfirmedImpl value, + $Res Function(_$BdkError_TransactionConfirmedImpl) then) = + __$$BdkError_TransactionConfirmedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_TransactionConfirmedImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_TransactionConfirmedImpl> + implements _$$BdkError_TransactionConfirmedImplCopyWith<$Res> { + __$$BdkError_TransactionConfirmedImplCopyWithImpl( + _$BdkError_TransactionConfirmedImpl _value, + $Res Function(_$BdkError_TransactionConfirmedImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_TransactionConfirmedImpl + extends BdkError_TransactionConfirmed { + const _$BdkError_TransactionConfirmedImpl() : super._(); + + @override + String toString() { + return 'BdkError.transactionConfirmed()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_TransactionConfirmedImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return transactionConfirmed(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return transactionConfirmed?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (transactionConfirmed != null) { + return transactionConfirmed(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return transactionConfirmed(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return transactionConfirmed?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (transactionConfirmed != null) { + return transactionConfirmed(this); + } + return orElse(); + } +} + +abstract class BdkError_TransactionConfirmed extends BdkError { + const factory BdkError_TransactionConfirmed() = + _$BdkError_TransactionConfirmedImpl; + const BdkError_TransactionConfirmed._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_IrreplaceableTransactionImplCopyWith<$Res> { + factory _$$BdkError_IrreplaceableTransactionImplCopyWith( + _$BdkError_IrreplaceableTransactionImpl value, + $Res Function(_$BdkError_IrreplaceableTransactionImpl) then) = + __$$BdkError_IrreplaceableTransactionImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_IrreplaceableTransactionImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, + _$BdkError_IrreplaceableTransactionImpl> + implements _$$BdkError_IrreplaceableTransactionImplCopyWith<$Res> { + __$$BdkError_IrreplaceableTransactionImplCopyWithImpl( + _$BdkError_IrreplaceableTransactionImpl _value, + $Res Function(_$BdkError_IrreplaceableTransactionImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_IrreplaceableTransactionImpl + extends BdkError_IrreplaceableTransaction { + const _$BdkError_IrreplaceableTransactionImpl() : super._(); + + @override + String toString() { + return 'BdkError.irreplaceableTransaction()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_IrreplaceableTransactionImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return irreplaceableTransaction(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return irreplaceableTransaction?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (irreplaceableTransaction != null) { + return irreplaceableTransaction(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return irreplaceableTransaction(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return irreplaceableTransaction?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (irreplaceableTransaction != null) { + return irreplaceableTransaction(this); + } + return orElse(); + } +} + +abstract class BdkError_IrreplaceableTransaction extends BdkError { + const factory BdkError_IrreplaceableTransaction() = + _$BdkError_IrreplaceableTransactionImpl; + const BdkError_IrreplaceableTransaction._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_FeeRateTooLowImplCopyWith<$Res> { + factory _$$BdkError_FeeRateTooLowImplCopyWith( + _$BdkError_FeeRateTooLowImpl value, + $Res Function(_$BdkError_FeeRateTooLowImpl) then) = + __$$BdkError_FeeRateTooLowImplCopyWithImpl<$Res>; + @useResult + $Res call({double needed}); +} + +/// @nodoc +class __$$BdkError_FeeRateTooLowImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_FeeRateTooLowImpl> + implements _$$BdkError_FeeRateTooLowImplCopyWith<$Res> { + __$$BdkError_FeeRateTooLowImplCopyWithImpl( + _$BdkError_FeeRateTooLowImpl _value, + $Res Function(_$BdkError_FeeRateTooLowImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? needed = null, + }) { + return _then(_$BdkError_FeeRateTooLowImpl( + needed: null == needed + ? _value.needed + : needed // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc + +class _$BdkError_FeeRateTooLowImpl extends BdkError_FeeRateTooLow { + const _$BdkError_FeeRateTooLowImpl({required this.needed}) : super._(); + + /// Required fee rate (satoshi/vbyte) + @override + final double needed; + + @override + String toString() { + return 'BdkError.feeRateTooLow(needed: $needed)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_FeeRateTooLowImpl && + (identical(other.needed, needed) || other.needed == needed)); + } + + @override + int get hashCode => Object.hash(runtimeType, needed); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_FeeRateTooLowImplCopyWith<_$BdkError_FeeRateTooLowImpl> + get copyWith => __$$BdkError_FeeRateTooLowImplCopyWithImpl< + _$BdkError_FeeRateTooLowImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return feeRateTooLow(needed); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return feeRateTooLow?.call(needed); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (feeRateTooLow != null) { + return feeRateTooLow(needed); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return feeRateTooLow(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return feeRateTooLow?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (feeRateTooLow != null) { + return feeRateTooLow(this); + } + return orElse(); + } +} + +abstract class BdkError_FeeRateTooLow extends BdkError { + const factory BdkError_FeeRateTooLow({required final double needed}) = + _$BdkError_FeeRateTooLowImpl; + const BdkError_FeeRateTooLow._() : super._(); + + /// Required fee rate (satoshi/vbyte) + double get needed; + @JsonKey(ignore: true) + _$$BdkError_FeeRateTooLowImplCopyWith<_$BdkError_FeeRateTooLowImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_FeeTooLowImplCopyWith<$Res> { + factory _$$BdkError_FeeTooLowImplCopyWith(_$BdkError_FeeTooLowImpl value, + $Res Function(_$BdkError_FeeTooLowImpl) then) = + __$$BdkError_FeeTooLowImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt needed}); +} + +/// @nodoc +class __$$BdkError_FeeTooLowImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_FeeTooLowImpl> + implements _$$BdkError_FeeTooLowImplCopyWith<$Res> { + __$$BdkError_FeeTooLowImplCopyWithImpl(_$BdkError_FeeTooLowImpl _value, + $Res Function(_$BdkError_FeeTooLowImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? needed = null, + }) { + return _then(_$BdkError_FeeTooLowImpl( + needed: null == needed + ? _value.needed + : needed // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$BdkError_FeeTooLowImpl extends BdkError_FeeTooLow { + const _$BdkError_FeeTooLowImpl({required this.needed}) : super._(); + + /// Required fee absolute value (satoshi) + @override + final BigInt needed; + + @override + String toString() { + return 'BdkError.feeTooLow(needed: $needed)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_FeeTooLowImpl && + (identical(other.needed, needed) || other.needed == needed)); + } + + @override + int get hashCode => Object.hash(runtimeType, needed); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_FeeTooLowImplCopyWith<_$BdkError_FeeTooLowImpl> get copyWith => + __$$BdkError_FeeTooLowImplCopyWithImpl<_$BdkError_FeeTooLowImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return feeTooLow(needed); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return feeTooLow?.call(needed); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (feeTooLow != null) { + return feeTooLow(needed); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return feeTooLow(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return feeTooLow?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (feeTooLow != null) { + return feeTooLow(this); + } + return orElse(); + } +} + +abstract class BdkError_FeeTooLow extends BdkError { + const factory BdkError_FeeTooLow({required final BigInt needed}) = + _$BdkError_FeeTooLowImpl; + const BdkError_FeeTooLow._() : super._(); + + /// Required fee absolute value (satoshi) + BigInt get needed; + @JsonKey(ignore: true) + _$$BdkError_FeeTooLowImplCopyWith<_$BdkError_FeeTooLowImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_FeeRateUnavailableImplCopyWith<$Res> { + factory _$$BdkError_FeeRateUnavailableImplCopyWith( + _$BdkError_FeeRateUnavailableImpl value, + $Res Function(_$BdkError_FeeRateUnavailableImpl) then) = + __$$BdkError_FeeRateUnavailableImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_FeeRateUnavailableImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_FeeRateUnavailableImpl> + implements _$$BdkError_FeeRateUnavailableImplCopyWith<$Res> { + __$$BdkError_FeeRateUnavailableImplCopyWithImpl( + _$BdkError_FeeRateUnavailableImpl _value, + $Res Function(_$BdkError_FeeRateUnavailableImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { + const _$BdkError_FeeRateUnavailableImpl() : super._(); + + @override + String toString() { + return 'BdkError.feeRateUnavailable()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_FeeRateUnavailableImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return feeRateUnavailable(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return feeRateUnavailable?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (feeRateUnavailable != null) { + return feeRateUnavailable(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return feeRateUnavailable(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return feeRateUnavailable?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (feeRateUnavailable != null) { + return feeRateUnavailable(this); + } + return orElse(); + } +} + +abstract class BdkError_FeeRateUnavailable extends BdkError { + const factory BdkError_FeeRateUnavailable() = + _$BdkError_FeeRateUnavailableImpl; + const BdkError_FeeRateUnavailable._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_MissingKeyOriginImplCopyWith<$Res> { + factory _$$BdkError_MissingKeyOriginImplCopyWith( + _$BdkError_MissingKeyOriginImpl value, + $Res Function(_$BdkError_MissingKeyOriginImpl) then) = + __$$BdkError_MissingKeyOriginImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_MissingKeyOriginImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MissingKeyOriginImpl> + implements _$$BdkError_MissingKeyOriginImplCopyWith<$Res> { + __$$BdkError_MissingKeyOriginImplCopyWithImpl( + _$BdkError_MissingKeyOriginImpl _value, + $Res Function(_$BdkError_MissingKeyOriginImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_MissingKeyOriginImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_MissingKeyOriginImpl extends BdkError_MissingKeyOrigin { + const _$BdkError_MissingKeyOriginImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.missingKeyOrigin(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_MissingKeyOriginImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_MissingKeyOriginImplCopyWith<_$BdkError_MissingKeyOriginImpl> + get copyWith => __$$BdkError_MissingKeyOriginImplCopyWithImpl< + _$BdkError_MissingKeyOriginImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return missingKeyOrigin(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return missingKeyOrigin?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (missingKeyOrigin != null) { + return missingKeyOrigin(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return missingKeyOrigin(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return missingKeyOrigin?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (missingKeyOrigin != null) { + return missingKeyOrigin(this); + } + return orElse(); + } +} + +abstract class BdkError_MissingKeyOrigin extends BdkError { + const factory BdkError_MissingKeyOrigin(final String field0) = + _$BdkError_MissingKeyOriginImpl; + const BdkError_MissingKeyOrigin._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_MissingKeyOriginImplCopyWith<_$BdkError_MissingKeyOriginImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_KeyImplCopyWith<$Res> { + factory _$$BdkError_KeyImplCopyWith( + _$BdkError_KeyImpl value, $Res Function(_$BdkError_KeyImpl) then) = + __$$BdkError_KeyImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_KeyImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_KeyImpl> + implements _$$BdkError_KeyImplCopyWith<$Res> { + __$$BdkError_KeyImplCopyWithImpl( + _$BdkError_KeyImpl _value, $Res Function(_$BdkError_KeyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_KeyImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_KeyImpl extends BdkError_Key { + const _$BdkError_KeyImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.key(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_KeyImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_KeyImplCopyWith<_$BdkError_KeyImpl> get copyWith => + __$$BdkError_KeyImplCopyWithImpl<_$BdkError_KeyImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return key(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return key?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (key != null) { + return key(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return key(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return key?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (key != null) { + return key(this); + } + return orElse(); + } +} + +abstract class BdkError_Key extends BdkError { + const factory BdkError_Key(final String field0) = _$BdkError_KeyImpl; + const BdkError_Key._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_KeyImplCopyWith<_$BdkError_KeyImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_ChecksumMismatchImplCopyWith<$Res> { + factory _$$BdkError_ChecksumMismatchImplCopyWith( + _$BdkError_ChecksumMismatchImpl value, + $Res Function(_$BdkError_ChecksumMismatchImpl) then) = + __$$BdkError_ChecksumMismatchImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BdkError_ChecksumMismatchImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_ChecksumMismatchImpl> + implements _$$BdkError_ChecksumMismatchImplCopyWith<$Res> { + __$$BdkError_ChecksumMismatchImplCopyWithImpl( + _$BdkError_ChecksumMismatchImpl _value, + $Res Function(_$BdkError_ChecksumMismatchImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BdkError_ChecksumMismatchImpl extends BdkError_ChecksumMismatch { + const _$BdkError_ChecksumMismatchImpl() : super._(); + + @override + String toString() { + return 'BdkError.checksumMismatch()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_ChecksumMismatchImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return checksumMismatch(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return checksumMismatch?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (checksumMismatch != null) { + return checksumMismatch(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return checksumMismatch(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return checksumMismatch?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (checksumMismatch != null) { + return checksumMismatch(this); + } + return orElse(); + } +} + +abstract class BdkError_ChecksumMismatch extends BdkError { + const factory BdkError_ChecksumMismatch() = _$BdkError_ChecksumMismatchImpl; + const BdkError_ChecksumMismatch._() : super._(); +} + +/// @nodoc +abstract class _$$BdkError_SpendingPolicyRequiredImplCopyWith<$Res> { + factory _$$BdkError_SpendingPolicyRequiredImplCopyWith( + _$BdkError_SpendingPolicyRequiredImpl value, + $Res Function(_$BdkError_SpendingPolicyRequiredImpl) then) = + __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl<$Res>; + @useResult + $Res call({KeychainKind field0}); +} + +/// @nodoc +class __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_SpendingPolicyRequiredImpl> + implements _$$BdkError_SpendingPolicyRequiredImplCopyWith<$Res> { + __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl( + _$BdkError_SpendingPolicyRequiredImpl _value, + $Res Function(_$BdkError_SpendingPolicyRequiredImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_SpendingPolicyRequiredImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as KeychainKind, + )); + } +} + +/// @nodoc + +class _$BdkError_SpendingPolicyRequiredImpl + extends BdkError_SpendingPolicyRequired { + const _$BdkError_SpendingPolicyRequiredImpl(this.field0) : super._(); + + @override + final KeychainKind field0; + + @override + String toString() { + return 'BdkError.spendingPolicyRequired(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_SpendingPolicyRequiredImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_SpendingPolicyRequiredImplCopyWith< + _$BdkError_SpendingPolicyRequiredImpl> + get copyWith => __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl< + _$BdkError_SpendingPolicyRequiredImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return spendingPolicyRequired(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return spendingPolicyRequired?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (spendingPolicyRequired != null) { + return spendingPolicyRequired(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return spendingPolicyRequired(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return spendingPolicyRequired?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (spendingPolicyRequired != null) { + return spendingPolicyRequired(this); + } + return orElse(); + } +} + +abstract class BdkError_SpendingPolicyRequired extends BdkError { + const factory BdkError_SpendingPolicyRequired(final KeychainKind field0) = + _$BdkError_SpendingPolicyRequiredImpl; + const BdkError_SpendingPolicyRequired._() : super._(); + + KeychainKind get field0; + @JsonKey(ignore: true) + _$$BdkError_SpendingPolicyRequiredImplCopyWith< + _$BdkError_SpendingPolicyRequiredImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_InvalidPolicyPathErrorImplCopyWith<$Res> { + factory _$$BdkError_InvalidPolicyPathErrorImplCopyWith( + _$BdkError_InvalidPolicyPathErrorImpl value, + $Res Function(_$BdkError_InvalidPolicyPathErrorImpl) then) = + __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidPolicyPathErrorImpl> + implements _$$BdkError_InvalidPolicyPathErrorImplCopyWith<$Res> { + __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl( + _$BdkError_InvalidPolicyPathErrorImpl _value, + $Res Function(_$BdkError_InvalidPolicyPathErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_InvalidPolicyPathErrorImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_InvalidPolicyPathErrorImpl + extends BdkError_InvalidPolicyPathError { + const _$BdkError_InvalidPolicyPathErrorImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.invalidPolicyPathError(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_InvalidPolicyPathErrorImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_InvalidPolicyPathErrorImplCopyWith< + _$BdkError_InvalidPolicyPathErrorImpl> + get copyWith => __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl< + _$BdkError_InvalidPolicyPathErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return invalidPolicyPathError(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return invalidPolicyPathError?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidPolicyPathError != null) { + return invalidPolicyPathError(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return invalidPolicyPathError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return invalidPolicyPathError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidPolicyPathError != null) { + return invalidPolicyPathError(this); + } + return orElse(); + } +} + +abstract class BdkError_InvalidPolicyPathError extends BdkError { + const factory BdkError_InvalidPolicyPathError(final String field0) = + _$BdkError_InvalidPolicyPathErrorImpl; + const BdkError_InvalidPolicyPathError._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_InvalidPolicyPathErrorImplCopyWith< + _$BdkError_InvalidPolicyPathErrorImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_SignerImplCopyWith<$Res> { + factory _$$BdkError_SignerImplCopyWith(_$BdkError_SignerImpl value, + $Res Function(_$BdkError_SignerImpl) then) = + __$$BdkError_SignerImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_SignerImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_SignerImpl> + implements _$$BdkError_SignerImplCopyWith<$Res> { + __$$BdkError_SignerImplCopyWithImpl( + _$BdkError_SignerImpl _value, $Res Function(_$BdkError_SignerImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_SignerImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_SignerImpl extends BdkError_Signer { + const _$BdkError_SignerImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.signer(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_SignerImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_SignerImplCopyWith<_$BdkError_SignerImpl> get copyWith => + __$$BdkError_SignerImplCopyWithImpl<_$BdkError_SignerImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return signer(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return signer?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (signer != null) { + return signer(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return signer(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return signer?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (signer != null) { + return signer(this); + } + return orElse(); + } +} + +abstract class BdkError_Signer extends BdkError { + const factory BdkError_Signer(final String field0) = _$BdkError_SignerImpl; + const BdkError_Signer._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_SignerImplCopyWith<_$BdkError_SignerImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_InvalidNetworkImplCopyWith<$Res> { + factory _$$BdkError_InvalidNetworkImplCopyWith( + _$BdkError_InvalidNetworkImpl value, + $Res Function(_$BdkError_InvalidNetworkImpl) then) = + __$$BdkError_InvalidNetworkImplCopyWithImpl<$Res>; + @useResult + $Res call({Network requested, Network found}); +} + +/// @nodoc +class __$$BdkError_InvalidNetworkImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidNetworkImpl> + implements _$$BdkError_InvalidNetworkImplCopyWith<$Res> { + __$$BdkError_InvalidNetworkImplCopyWithImpl( + _$BdkError_InvalidNetworkImpl _value, + $Res Function(_$BdkError_InvalidNetworkImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? requested = null, + Object? found = null, + }) { + return _then(_$BdkError_InvalidNetworkImpl( + requested: null == requested + ? _value.requested + : requested // ignore: cast_nullable_to_non_nullable + as Network, + found: null == found + ? _value.found + : found // ignore: cast_nullable_to_non_nullable + as Network, + )); + } +} + +/// @nodoc + +class _$BdkError_InvalidNetworkImpl extends BdkError_InvalidNetwork { + const _$BdkError_InvalidNetworkImpl( + {required this.requested, required this.found}) + : super._(); + + /// requested network, for example what is given as bdk-cli option + @override + final Network requested; + + /// found network, for example the network of the bitcoin node + @override + final Network found; + + @override + String toString() { + return 'BdkError.invalidNetwork(requested: $requested, found: $found)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_InvalidNetworkImpl && + (identical(other.requested, requested) || + other.requested == requested) && + (identical(other.found, found) || other.found == found)); + } + + @override + int get hashCode => Object.hash(runtimeType, requested, found); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_InvalidNetworkImplCopyWith<_$BdkError_InvalidNetworkImpl> + get copyWith => __$$BdkError_InvalidNetworkImplCopyWithImpl< + _$BdkError_InvalidNetworkImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return invalidNetwork(requested, found); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return invalidNetwork?.call(requested, found); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidNetwork != null) { + return invalidNetwork(requested, found); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return invalidNetwork(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return invalidNetwork?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidNetwork != null) { + return invalidNetwork(this); + } + return orElse(); + } +} + +abstract class BdkError_InvalidNetwork extends BdkError { + const factory BdkError_InvalidNetwork( + {required final Network requested, + required final Network found}) = _$BdkError_InvalidNetworkImpl; + const BdkError_InvalidNetwork._() : super._(); + + /// requested network, for example what is given as bdk-cli option + Network get requested; + + /// found network, for example the network of the bitcoin node + Network get found; + @JsonKey(ignore: true) + _$$BdkError_InvalidNetworkImplCopyWith<_$BdkError_InvalidNetworkImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_InvalidOutpointImplCopyWith<$Res> { + factory _$$BdkError_InvalidOutpointImplCopyWith( + _$BdkError_InvalidOutpointImpl value, + $Res Function(_$BdkError_InvalidOutpointImpl) then) = + __$$BdkError_InvalidOutpointImplCopyWithImpl<$Res>; + @useResult + $Res call({OutPoint field0}); +} + +/// @nodoc +class __$$BdkError_InvalidOutpointImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidOutpointImpl> + implements _$$BdkError_InvalidOutpointImplCopyWith<$Res> { + __$$BdkError_InvalidOutpointImplCopyWithImpl( + _$BdkError_InvalidOutpointImpl _value, + $Res Function(_$BdkError_InvalidOutpointImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_InvalidOutpointImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as OutPoint, + )); + } +} + +/// @nodoc + +class _$BdkError_InvalidOutpointImpl extends BdkError_InvalidOutpoint { + const _$BdkError_InvalidOutpointImpl(this.field0) : super._(); + + @override + final OutPoint field0; + + @override + String toString() { + return 'BdkError.invalidOutpoint(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_InvalidOutpointImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_InvalidOutpointImplCopyWith<_$BdkError_InvalidOutpointImpl> + get copyWith => __$$BdkError_InvalidOutpointImplCopyWithImpl< + _$BdkError_InvalidOutpointImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return invalidOutpoint(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return invalidOutpoint?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidOutpoint != null) { + return invalidOutpoint(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return invalidOutpoint(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return invalidOutpoint?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidOutpoint != null) { + return invalidOutpoint(this); + } + return orElse(); + } +} + +abstract class BdkError_InvalidOutpoint extends BdkError { + const factory BdkError_InvalidOutpoint(final OutPoint field0) = + _$BdkError_InvalidOutpointImpl; + const BdkError_InvalidOutpoint._() : super._(); + + OutPoint get field0; + @JsonKey(ignore: true) + _$$BdkError_InvalidOutpointImplCopyWith<_$BdkError_InvalidOutpointImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_EncodeImplCopyWith<$Res> { + factory _$$BdkError_EncodeImplCopyWith(_$BdkError_EncodeImpl value, + $Res Function(_$BdkError_EncodeImpl) then) = + __$$BdkError_EncodeImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_EncodeImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_EncodeImpl> + implements _$$BdkError_EncodeImplCopyWith<$Res> { + __$$BdkError_EncodeImplCopyWithImpl( + _$BdkError_EncodeImpl _value, $Res Function(_$BdkError_EncodeImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_EncodeImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_EncodeImpl extends BdkError_Encode { + const _$BdkError_EncodeImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.encode(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_EncodeImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_EncodeImplCopyWith<_$BdkError_EncodeImpl> get copyWith => + __$$BdkError_EncodeImplCopyWithImpl<_$BdkError_EncodeImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return encode(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return encode?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (encode != null) { + return encode(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return encode(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return encode?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (encode != null) { + return encode(this); + } + return orElse(); + } +} + +abstract class BdkError_Encode extends BdkError { + const factory BdkError_Encode(final String field0) = _$BdkError_EncodeImpl; + const BdkError_Encode._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_EncodeImplCopyWith<_$BdkError_EncodeImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_MiniscriptImplCopyWith<$Res> { + factory _$$BdkError_MiniscriptImplCopyWith(_$BdkError_MiniscriptImpl value, + $Res Function(_$BdkError_MiniscriptImpl) then) = + __$$BdkError_MiniscriptImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_MiniscriptImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MiniscriptImpl> + implements _$$BdkError_MiniscriptImplCopyWith<$Res> { + __$$BdkError_MiniscriptImplCopyWithImpl(_$BdkError_MiniscriptImpl _value, + $Res Function(_$BdkError_MiniscriptImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_MiniscriptImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_MiniscriptImpl extends BdkError_Miniscript { + const _$BdkError_MiniscriptImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.miniscript(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_MiniscriptImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_MiniscriptImplCopyWith<_$BdkError_MiniscriptImpl> get copyWith => + __$$BdkError_MiniscriptImplCopyWithImpl<_$BdkError_MiniscriptImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return miniscript(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return miniscript?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (miniscript != null) { + return miniscript(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return miniscript(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return miniscript?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (miniscript != null) { + return miniscript(this); + } + return orElse(); + } +} + +abstract class BdkError_Miniscript extends BdkError { + const factory BdkError_Miniscript(final String field0) = + _$BdkError_MiniscriptImpl; + const BdkError_Miniscript._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_MiniscriptImplCopyWith<_$BdkError_MiniscriptImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_MiniscriptPsbtImplCopyWith<$Res> { + factory _$$BdkError_MiniscriptPsbtImplCopyWith( + _$BdkError_MiniscriptPsbtImpl value, + $Res Function(_$BdkError_MiniscriptPsbtImpl) then) = + __$$BdkError_MiniscriptPsbtImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_MiniscriptPsbtImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MiniscriptPsbtImpl> + implements _$$BdkError_MiniscriptPsbtImplCopyWith<$Res> { + __$$BdkError_MiniscriptPsbtImplCopyWithImpl( + _$BdkError_MiniscriptPsbtImpl _value, + $Res Function(_$BdkError_MiniscriptPsbtImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_MiniscriptPsbtImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_MiniscriptPsbtImpl extends BdkError_MiniscriptPsbt { + const _$BdkError_MiniscriptPsbtImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.miniscriptPsbt(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_MiniscriptPsbtImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_MiniscriptPsbtImplCopyWith<_$BdkError_MiniscriptPsbtImpl> + get copyWith => __$$BdkError_MiniscriptPsbtImplCopyWithImpl< + _$BdkError_MiniscriptPsbtImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return miniscriptPsbt(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return miniscriptPsbt?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (miniscriptPsbt != null) { + return miniscriptPsbt(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return miniscriptPsbt(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return miniscriptPsbt?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (miniscriptPsbt != null) { + return miniscriptPsbt(this); + } + return orElse(); + } +} + +abstract class BdkError_MiniscriptPsbt extends BdkError { + const factory BdkError_MiniscriptPsbt(final String field0) = + _$BdkError_MiniscriptPsbtImpl; + const BdkError_MiniscriptPsbt._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_MiniscriptPsbtImplCopyWith<_$BdkError_MiniscriptPsbtImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_Bip32ImplCopyWith<$Res> { + factory _$$BdkError_Bip32ImplCopyWith(_$BdkError_Bip32Impl value, + $Res Function(_$BdkError_Bip32Impl) then) = + __$$BdkError_Bip32ImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_Bip32ImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_Bip32Impl> + implements _$$BdkError_Bip32ImplCopyWith<$Res> { + __$$BdkError_Bip32ImplCopyWithImpl( + _$BdkError_Bip32Impl _value, $Res Function(_$BdkError_Bip32Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_Bip32Impl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_Bip32Impl extends BdkError_Bip32 { + const _$BdkError_Bip32Impl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.bip32(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_Bip32Impl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_Bip32ImplCopyWith<_$BdkError_Bip32Impl> get copyWith => + __$$BdkError_Bip32ImplCopyWithImpl<_$BdkError_Bip32Impl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return bip32(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return bip32?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (bip32 != null) { + return bip32(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return bip32(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return bip32?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (bip32 != null) { + return bip32(this); + } + return orElse(); + } +} + +abstract class BdkError_Bip32 extends BdkError { + const factory BdkError_Bip32(final String field0) = _$BdkError_Bip32Impl; + const BdkError_Bip32._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_Bip32ImplCopyWith<_$BdkError_Bip32Impl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_Bip39ImplCopyWith<$Res> { + factory _$$BdkError_Bip39ImplCopyWith(_$BdkError_Bip39Impl value, + $Res Function(_$BdkError_Bip39Impl) then) = + __$$BdkError_Bip39ImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_Bip39ImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_Bip39Impl> + implements _$$BdkError_Bip39ImplCopyWith<$Res> { + __$$BdkError_Bip39ImplCopyWithImpl( + _$BdkError_Bip39Impl _value, $Res Function(_$BdkError_Bip39Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_Bip39Impl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_Bip39Impl extends BdkError_Bip39 { + const _$BdkError_Bip39Impl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.bip39(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_Bip39Impl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_Bip39ImplCopyWith<_$BdkError_Bip39Impl> get copyWith => + __$$BdkError_Bip39ImplCopyWithImpl<_$BdkError_Bip39Impl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return bip39(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return bip39?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (bip39 != null) { + return bip39(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return bip39(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return bip39?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (bip39 != null) { + return bip39(this); + } + return orElse(); + } +} + +abstract class BdkError_Bip39 extends BdkError { + const factory BdkError_Bip39(final String field0) = _$BdkError_Bip39Impl; + const BdkError_Bip39._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_Bip39ImplCopyWith<_$BdkError_Bip39Impl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_Secp256k1ImplCopyWith<$Res> { + factory _$$BdkError_Secp256k1ImplCopyWith(_$BdkError_Secp256k1Impl value, + $Res Function(_$BdkError_Secp256k1Impl) then) = + __$$BdkError_Secp256k1ImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_Secp256k1ImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_Secp256k1Impl> + implements _$$BdkError_Secp256k1ImplCopyWith<$Res> { + __$$BdkError_Secp256k1ImplCopyWithImpl(_$BdkError_Secp256k1Impl _value, + $Res Function(_$BdkError_Secp256k1Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_Secp256k1Impl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_Secp256k1Impl extends BdkError_Secp256k1 { + const _$BdkError_Secp256k1Impl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.secp256K1(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_Secp256k1Impl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_Secp256k1ImplCopyWith<_$BdkError_Secp256k1Impl> get copyWith => + __$$BdkError_Secp256k1ImplCopyWithImpl<_$BdkError_Secp256k1Impl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return secp256K1(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return secp256K1?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (secp256K1 != null) { + return secp256K1(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return secp256K1(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return secp256K1?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (secp256K1 != null) { + return secp256K1(this); + } + return orElse(); + } +} + +abstract class BdkError_Secp256k1 extends BdkError { + const factory BdkError_Secp256k1(final String field0) = + _$BdkError_Secp256k1Impl; + const BdkError_Secp256k1._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_Secp256k1ImplCopyWith<_$BdkError_Secp256k1Impl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_JsonImplCopyWith<$Res> { + factory _$$BdkError_JsonImplCopyWith( + _$BdkError_JsonImpl value, $Res Function(_$BdkError_JsonImpl) then) = + __$$BdkError_JsonImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_JsonImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_JsonImpl> + implements _$$BdkError_JsonImplCopyWith<$Res> { + __$$BdkError_JsonImplCopyWithImpl( + _$BdkError_JsonImpl _value, $Res Function(_$BdkError_JsonImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_JsonImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_JsonImpl extends BdkError_Json { + const _$BdkError_JsonImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.json(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_JsonImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_JsonImplCopyWith<_$BdkError_JsonImpl> get copyWith => + __$$BdkError_JsonImplCopyWithImpl<_$BdkError_JsonImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return json(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return json?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (json != null) { + return json(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return json(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return json?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (json != null) { + return json(this); + } + return orElse(); + } +} + +abstract class BdkError_Json extends BdkError { + const factory BdkError_Json(final String field0) = _$BdkError_JsonImpl; + const BdkError_Json._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_JsonImplCopyWith<_$BdkError_JsonImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_PsbtImplCopyWith<$Res> { + factory _$$BdkError_PsbtImplCopyWith( + _$BdkError_PsbtImpl value, $Res Function(_$BdkError_PsbtImpl) then) = + __$$BdkError_PsbtImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_PsbtImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_PsbtImpl> + implements _$$BdkError_PsbtImplCopyWith<$Res> { + __$$BdkError_PsbtImplCopyWithImpl( + _$BdkError_PsbtImpl _value, $Res Function(_$BdkError_PsbtImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_PsbtImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_PsbtImpl extends BdkError_Psbt { + const _$BdkError_PsbtImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.psbt(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_PsbtImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_PsbtImplCopyWith<_$BdkError_PsbtImpl> get copyWith => + __$$BdkError_PsbtImplCopyWithImpl<_$BdkError_PsbtImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return psbt(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return psbt?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (psbt != null) { + return psbt(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return psbt(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return psbt?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (psbt != null) { + return psbt(this); + } + return orElse(); + } +} + +abstract class BdkError_Psbt extends BdkError { + const factory BdkError_Psbt(final String field0) = _$BdkError_PsbtImpl; + const BdkError_Psbt._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_PsbtImplCopyWith<_$BdkError_PsbtImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_PsbtParseImplCopyWith<$Res> { + factory _$$BdkError_PsbtParseImplCopyWith(_$BdkError_PsbtParseImpl value, + $Res Function(_$BdkError_PsbtParseImpl) then) = + __$$BdkError_PsbtParseImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_PsbtParseImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_PsbtParseImpl> + implements _$$BdkError_PsbtParseImplCopyWith<$Res> { + __$$BdkError_PsbtParseImplCopyWithImpl(_$BdkError_PsbtParseImpl _value, + $Res Function(_$BdkError_PsbtParseImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_PsbtParseImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_PsbtParseImpl extends BdkError_PsbtParse { + const _$BdkError_PsbtParseImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.psbtParse(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_PsbtParseImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_PsbtParseImplCopyWith<_$BdkError_PsbtParseImpl> get copyWith => + __$$BdkError_PsbtParseImplCopyWithImpl<_$BdkError_PsbtParseImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return psbtParse(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return psbtParse?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (psbtParse != null) { + return psbtParse(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return psbtParse(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return psbtParse?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (psbtParse != null) { + return psbtParse(this); + } + return orElse(); + } +} + +abstract class BdkError_PsbtParse extends BdkError { + const factory BdkError_PsbtParse(final String field0) = + _$BdkError_PsbtParseImpl; + const BdkError_PsbtParse._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_PsbtParseImplCopyWith<_$BdkError_PsbtParseImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_MissingCachedScriptsImplCopyWith<$Res> { + factory _$$BdkError_MissingCachedScriptsImplCopyWith( + _$BdkError_MissingCachedScriptsImpl value, + $Res Function(_$BdkError_MissingCachedScriptsImpl) then) = + __$$BdkError_MissingCachedScriptsImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt field0, BigInt field1}); +} + +/// @nodoc +class __$$BdkError_MissingCachedScriptsImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MissingCachedScriptsImpl> + implements _$$BdkError_MissingCachedScriptsImplCopyWith<$Res> { + __$$BdkError_MissingCachedScriptsImplCopyWithImpl( + _$BdkError_MissingCachedScriptsImpl _value, + $Res Function(_$BdkError_MissingCachedScriptsImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + Object? field1 = null, + }) { + return _then(_$BdkError_MissingCachedScriptsImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as BigInt, + null == field1 + ? _value.field1 + : field1 // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$BdkError_MissingCachedScriptsImpl + extends BdkError_MissingCachedScripts { + const _$BdkError_MissingCachedScriptsImpl(this.field0, this.field1) + : super._(); + + @override + final BigInt field0; + @override + final BigInt field1; + + @override + String toString() { + return 'BdkError.missingCachedScripts(field0: $field0, field1: $field1)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_MissingCachedScriptsImpl && + (identical(other.field0, field0) || other.field0 == field0) && + (identical(other.field1, field1) || other.field1 == field1)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0, field1); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_MissingCachedScriptsImplCopyWith< + _$BdkError_MissingCachedScriptsImpl> + get copyWith => __$$BdkError_MissingCachedScriptsImplCopyWithImpl< + _$BdkError_MissingCachedScriptsImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return missingCachedScripts(field0, field1); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return missingCachedScripts?.call(field0, field1); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (missingCachedScripts != null) { + return missingCachedScripts(field0, field1); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return missingCachedScripts(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return missingCachedScripts?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (missingCachedScripts != null) { + return missingCachedScripts(this); + } + return orElse(); + } +} + +abstract class BdkError_MissingCachedScripts extends BdkError { + const factory BdkError_MissingCachedScripts( + final BigInt field0, final BigInt field1) = + _$BdkError_MissingCachedScriptsImpl; + const BdkError_MissingCachedScripts._() : super._(); + + BigInt get field0; + BigInt get field1; + @JsonKey(ignore: true) + _$$BdkError_MissingCachedScriptsImplCopyWith< + _$BdkError_MissingCachedScriptsImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_ElectrumImplCopyWith<$Res> { + factory _$$BdkError_ElectrumImplCopyWith(_$BdkError_ElectrumImpl value, + $Res Function(_$BdkError_ElectrumImpl) then) = + __$$BdkError_ElectrumImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_ElectrumImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_ElectrumImpl> + implements _$$BdkError_ElectrumImplCopyWith<$Res> { + __$$BdkError_ElectrumImplCopyWithImpl(_$BdkError_ElectrumImpl _value, + $Res Function(_$BdkError_ElectrumImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_ElectrumImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_ElectrumImpl extends BdkError_Electrum { + const _$BdkError_ElectrumImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.electrum(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_ElectrumImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_ElectrumImplCopyWith<_$BdkError_ElectrumImpl> get copyWith => + __$$BdkError_ElectrumImplCopyWithImpl<_$BdkError_ElectrumImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return electrum(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return electrum?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (electrum != null) { + return electrum(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return electrum(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return electrum?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (electrum != null) { + return electrum(this); + } + return orElse(); + } +} + +abstract class BdkError_Electrum extends BdkError { + const factory BdkError_Electrum(final String field0) = + _$BdkError_ElectrumImpl; + const BdkError_Electrum._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_ElectrumImplCopyWith<_$BdkError_ElectrumImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_EsploraImplCopyWith<$Res> { + factory _$$BdkError_EsploraImplCopyWith(_$BdkError_EsploraImpl value, + $Res Function(_$BdkError_EsploraImpl) then) = + __$$BdkError_EsploraImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_EsploraImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_EsploraImpl> + implements _$$BdkError_EsploraImplCopyWith<$Res> { + __$$BdkError_EsploraImplCopyWithImpl(_$BdkError_EsploraImpl _value, + $Res Function(_$BdkError_EsploraImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_EsploraImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_EsploraImpl extends BdkError_Esplora { + const _$BdkError_EsploraImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.esplora(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_EsploraImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_EsploraImplCopyWith<_$BdkError_EsploraImpl> get copyWith => + __$$BdkError_EsploraImplCopyWithImpl<_$BdkError_EsploraImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return esplora(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return esplora?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (esplora != null) { + return esplora(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return esplora(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return esplora?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (esplora != null) { + return esplora(this); + } + return orElse(); + } +} + +abstract class BdkError_Esplora extends BdkError { + const factory BdkError_Esplora(final String field0) = _$BdkError_EsploraImpl; + const BdkError_Esplora._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_EsploraImplCopyWith<_$BdkError_EsploraImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_SledImplCopyWith<$Res> { + factory _$$BdkError_SledImplCopyWith( + _$BdkError_SledImpl value, $Res Function(_$BdkError_SledImpl) then) = + __$$BdkError_SledImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_SledImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_SledImpl> + implements _$$BdkError_SledImplCopyWith<$Res> { + __$$BdkError_SledImplCopyWithImpl( + _$BdkError_SledImpl _value, $Res Function(_$BdkError_SledImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_SledImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_SledImpl extends BdkError_Sled { + const _$BdkError_SledImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.sled(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_SledImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_SledImplCopyWith<_$BdkError_SledImpl> get copyWith => + __$$BdkError_SledImplCopyWithImpl<_$BdkError_SledImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return sled(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return sled?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (sled != null) { + return sled(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return sled(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return sled?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (sled != null) { + return sled(this); + } + return orElse(); + } +} + +abstract class BdkError_Sled extends BdkError { + const factory BdkError_Sled(final String field0) = _$BdkError_SledImpl; + const BdkError_Sled._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_SledImplCopyWith<_$BdkError_SledImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_RpcImplCopyWith<$Res> { + factory _$$BdkError_RpcImplCopyWith( + _$BdkError_RpcImpl value, $Res Function(_$BdkError_RpcImpl) then) = + __$$BdkError_RpcImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_RpcImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_RpcImpl> + implements _$$BdkError_RpcImplCopyWith<$Res> { + __$$BdkError_RpcImplCopyWithImpl( + _$BdkError_RpcImpl _value, $Res Function(_$BdkError_RpcImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_RpcImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_RpcImpl extends BdkError_Rpc { + const _$BdkError_RpcImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.rpc(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_RpcImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_RpcImplCopyWith<_$BdkError_RpcImpl> get copyWith => + __$$BdkError_RpcImplCopyWithImpl<_$BdkError_RpcImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return rpc(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return rpc?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (rpc != null) { + return rpc(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return rpc(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return rpc?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (rpc != null) { + return rpc(this); + } + return orElse(); + } +} + +abstract class BdkError_Rpc extends BdkError { + const factory BdkError_Rpc(final String field0) = _$BdkError_RpcImpl; + const BdkError_Rpc._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_RpcImplCopyWith<_$BdkError_RpcImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_RusqliteImplCopyWith<$Res> { + factory _$$BdkError_RusqliteImplCopyWith(_$BdkError_RusqliteImpl value, + $Res Function(_$BdkError_RusqliteImpl) then) = + __$$BdkError_RusqliteImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_RusqliteImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_RusqliteImpl> + implements _$$BdkError_RusqliteImplCopyWith<$Res> { + __$$BdkError_RusqliteImplCopyWithImpl(_$BdkError_RusqliteImpl _value, + $Res Function(_$BdkError_RusqliteImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_RusqliteImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_RusqliteImpl extends BdkError_Rusqlite { + const _$BdkError_RusqliteImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.rusqlite(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_RusqliteImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_RusqliteImplCopyWith<_$BdkError_RusqliteImpl> get copyWith => + __$$BdkError_RusqliteImplCopyWithImpl<_$BdkError_RusqliteImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return rusqlite(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return rusqlite?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (rusqlite != null) { + return rusqlite(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return rusqlite(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return rusqlite?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (rusqlite != null) { + return rusqlite(this); + } + return orElse(); + } +} + +abstract class BdkError_Rusqlite extends BdkError { + const factory BdkError_Rusqlite(final String field0) = + _$BdkError_RusqliteImpl; + const BdkError_Rusqlite._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_RusqliteImplCopyWith<_$BdkError_RusqliteImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_InvalidInputImplCopyWith<$Res> { + factory _$$BdkError_InvalidInputImplCopyWith( + _$BdkError_InvalidInputImpl value, + $Res Function(_$BdkError_InvalidInputImpl) then) = + __$$BdkError_InvalidInputImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_InvalidInputImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidInputImpl> + implements _$$BdkError_InvalidInputImplCopyWith<$Res> { + __$$BdkError_InvalidInputImplCopyWithImpl(_$BdkError_InvalidInputImpl _value, + $Res Function(_$BdkError_InvalidInputImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_InvalidInputImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_InvalidInputImpl extends BdkError_InvalidInput { + const _$BdkError_InvalidInputImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.invalidInput(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_InvalidInputImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_InvalidInputImplCopyWith<_$BdkError_InvalidInputImpl> + get copyWith => __$$BdkError_InvalidInputImplCopyWithImpl< + _$BdkError_InvalidInputImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return invalidInput(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return invalidInput?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidInput != null) { + return invalidInput(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return invalidInput(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return invalidInput?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidInput != null) { + return invalidInput(this); + } + return orElse(); + } +} + +abstract class BdkError_InvalidInput extends BdkError { + const factory BdkError_InvalidInput(final String field0) = + _$BdkError_InvalidInputImpl; + const BdkError_InvalidInput._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_InvalidInputImplCopyWith<_$BdkError_InvalidInputImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_InvalidLockTimeImplCopyWith<$Res> { + factory _$$BdkError_InvalidLockTimeImplCopyWith( + _$BdkError_InvalidLockTimeImpl value, + $Res Function(_$BdkError_InvalidLockTimeImpl) then) = + __$$BdkError_InvalidLockTimeImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_InvalidLockTimeImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidLockTimeImpl> + implements _$$BdkError_InvalidLockTimeImplCopyWith<$Res> { + __$$BdkError_InvalidLockTimeImplCopyWithImpl( + _$BdkError_InvalidLockTimeImpl _value, + $Res Function(_$BdkError_InvalidLockTimeImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_InvalidLockTimeImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_InvalidLockTimeImpl extends BdkError_InvalidLockTime { + const _$BdkError_InvalidLockTimeImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.invalidLockTime(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_InvalidLockTimeImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_InvalidLockTimeImplCopyWith<_$BdkError_InvalidLockTimeImpl> + get copyWith => __$$BdkError_InvalidLockTimeImplCopyWithImpl< + _$BdkError_InvalidLockTimeImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return invalidLockTime(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return invalidLockTime?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidLockTime != null) { + return invalidLockTime(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return invalidLockTime(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return invalidLockTime?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidLockTime != null) { + return invalidLockTime(this); + } + return orElse(); + } +} + +abstract class BdkError_InvalidLockTime extends BdkError { + const factory BdkError_InvalidLockTime(final String field0) = + _$BdkError_InvalidLockTimeImpl; + const BdkError_InvalidLockTime._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_InvalidLockTimeImplCopyWith<_$BdkError_InvalidLockTimeImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BdkError_InvalidTransactionImplCopyWith<$Res> { + factory _$$BdkError_InvalidTransactionImplCopyWith( + _$BdkError_InvalidTransactionImpl value, + $Res Function(_$BdkError_InvalidTransactionImpl) then) = + __$$BdkError_InvalidTransactionImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$BdkError_InvalidTransactionImplCopyWithImpl<$Res> + extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidTransactionImpl> + implements _$$BdkError_InvalidTransactionImplCopyWith<$Res> { + __$$BdkError_InvalidTransactionImplCopyWithImpl( + _$BdkError_InvalidTransactionImpl _value, + $Res Function(_$BdkError_InvalidTransactionImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$BdkError_InvalidTransactionImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$BdkError_InvalidTransactionImpl extends BdkError_InvalidTransaction { + const _$BdkError_InvalidTransactionImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'BdkError.invalidTransaction(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BdkError_InvalidTransactionImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BdkError_InvalidTransactionImplCopyWith<_$BdkError_InvalidTransactionImpl> + get copyWith => __$$BdkError_InvalidTransactionImplCopyWithImpl< + _$BdkError_InvalidTransactionImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(HexError field0) hex, + required TResult Function(ConsensusError field0) consensus, + required TResult Function(String field0) verifyTransaction, + required TResult Function(AddressError field0) address, + required TResult Function(DescriptorError field0) descriptor, + required TResult Function(Uint8List field0) invalidU32Bytes, + required TResult Function(String field0) generic, + required TResult Function() scriptDoesntHaveAddressForm, + required TResult Function() noRecipients, + required TResult Function() noUtxosSelected, + required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt needed, BigInt available) + insufficientFunds, + required TResult Function() bnBTotalTriesExceeded, + required TResult Function() bnBNoExactMatch, + required TResult Function() unknownUtxo, + required TResult Function() transactionNotFound, + required TResult Function() transactionConfirmed, + required TResult Function() irreplaceableTransaction, + required TResult Function(double needed) feeRateTooLow, + required TResult Function(BigInt needed) feeTooLow, + required TResult Function() feeRateUnavailable, + required TResult Function(String field0) missingKeyOrigin, + required TResult Function(String field0) key, + required TResult Function() checksumMismatch, + required TResult Function(KeychainKind field0) spendingPolicyRequired, + required TResult Function(String field0) invalidPolicyPathError, + required TResult Function(String field0) signer, + required TResult Function(Network requested, Network found) invalidNetwork, + required TResult Function(OutPoint field0) invalidOutpoint, + required TResult Function(String field0) encode, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) miniscriptPsbt, + required TResult Function(String field0) bip32, + required TResult Function(String field0) bip39, + required TResult Function(String field0) secp256K1, + required TResult Function(String field0) json, + required TResult Function(String field0) psbt, + required TResult Function(String field0) psbtParse, + required TResult Function(BigInt field0, BigInt field1) + missingCachedScripts, + required TResult Function(String field0) electrum, + required TResult Function(String field0) esplora, + required TResult Function(String field0) sled, + required TResult Function(String field0) rpc, + required TResult Function(String field0) rusqlite, + required TResult Function(String field0) invalidInput, + required TResult Function(String field0) invalidLockTime, + required TResult Function(String field0) invalidTransaction, + }) { + return invalidTransaction(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(HexError field0)? hex, + TResult? Function(ConsensusError field0)? consensus, + TResult? Function(String field0)? verifyTransaction, + TResult? Function(AddressError field0)? address, + TResult? Function(DescriptorError field0)? descriptor, + TResult? Function(Uint8List field0)? invalidU32Bytes, + TResult? Function(String field0)? generic, + TResult? Function()? scriptDoesntHaveAddressForm, + TResult? Function()? noRecipients, + TResult? Function()? noUtxosSelected, + TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt needed, BigInt available)? insufficientFunds, + TResult? Function()? bnBTotalTriesExceeded, + TResult? Function()? bnBNoExactMatch, + TResult? Function()? unknownUtxo, + TResult? Function()? transactionNotFound, + TResult? Function()? transactionConfirmed, + TResult? Function()? irreplaceableTransaction, + TResult? Function(double needed)? feeRateTooLow, + TResult? Function(BigInt needed)? feeTooLow, + TResult? Function()? feeRateUnavailable, + TResult? Function(String field0)? missingKeyOrigin, + TResult? Function(String field0)? key, + TResult? Function()? checksumMismatch, + TResult? Function(KeychainKind field0)? spendingPolicyRequired, + TResult? Function(String field0)? invalidPolicyPathError, + TResult? Function(String field0)? signer, + TResult? Function(Network requested, Network found)? invalidNetwork, + TResult? Function(OutPoint field0)? invalidOutpoint, + TResult? Function(String field0)? encode, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? miniscriptPsbt, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? bip39, + TResult? Function(String field0)? secp256K1, + TResult? Function(String field0)? json, + TResult? Function(String field0)? psbt, + TResult? Function(String field0)? psbtParse, + TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult? Function(String field0)? electrum, + TResult? Function(String field0)? esplora, + TResult? Function(String field0)? sled, + TResult? Function(String field0)? rpc, + TResult? Function(String field0)? rusqlite, + TResult? Function(String field0)? invalidInput, + TResult? Function(String field0)? invalidLockTime, + TResult? Function(String field0)? invalidTransaction, + }) { + return invalidTransaction?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(HexError field0)? hex, + TResult Function(ConsensusError field0)? consensus, + TResult Function(String field0)? verifyTransaction, + TResult Function(AddressError field0)? address, + TResult Function(DescriptorError field0)? descriptor, + TResult Function(Uint8List field0)? invalidU32Bytes, + TResult Function(String field0)? generic, + TResult Function()? scriptDoesntHaveAddressForm, + TResult Function()? noRecipients, + TResult Function()? noUtxosSelected, + TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt needed, BigInt available)? insufficientFunds, + TResult Function()? bnBTotalTriesExceeded, + TResult Function()? bnBNoExactMatch, + TResult Function()? unknownUtxo, + TResult Function()? transactionNotFound, + TResult Function()? transactionConfirmed, + TResult Function()? irreplaceableTransaction, + TResult Function(double needed)? feeRateTooLow, + TResult Function(BigInt needed)? feeTooLow, + TResult Function()? feeRateUnavailable, + TResult Function(String field0)? missingKeyOrigin, + TResult Function(String field0)? key, + TResult Function()? checksumMismatch, + TResult Function(KeychainKind field0)? spendingPolicyRequired, + TResult Function(String field0)? invalidPolicyPathError, + TResult Function(String field0)? signer, + TResult Function(Network requested, Network found)? invalidNetwork, + TResult Function(OutPoint field0)? invalidOutpoint, + TResult Function(String field0)? encode, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? miniscriptPsbt, + TResult Function(String field0)? bip32, + TResult Function(String field0)? bip39, + TResult Function(String field0)? secp256K1, + TResult Function(String field0)? json, + TResult Function(String field0)? psbt, + TResult Function(String field0)? psbtParse, + TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, + TResult Function(String field0)? electrum, + TResult Function(String field0)? esplora, + TResult Function(String field0)? sled, + TResult Function(String field0)? rpc, + TResult Function(String field0)? rusqlite, + TResult Function(String field0)? invalidInput, + TResult Function(String field0)? invalidLockTime, + TResult Function(String field0)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidTransaction != null) { + return invalidTransaction(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BdkError_Hex value) hex, + required TResult Function(BdkError_Consensus value) consensus, + required TResult Function(BdkError_VerifyTransaction value) + verifyTransaction, + required TResult Function(BdkError_Address value) address, + required TResult Function(BdkError_Descriptor value) descriptor, + required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, + required TResult Function(BdkError_Generic value) generic, + required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) + scriptDoesntHaveAddressForm, + required TResult Function(BdkError_NoRecipients value) noRecipients, + required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, + required TResult Function(BdkError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(BdkError_InsufficientFunds value) + insufficientFunds, + required TResult Function(BdkError_BnBTotalTriesExceeded value) + bnBTotalTriesExceeded, + required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, + required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, + required TResult Function(BdkError_TransactionNotFound value) + transactionNotFound, + required TResult Function(BdkError_TransactionConfirmed value) + transactionConfirmed, + required TResult Function(BdkError_IrreplaceableTransaction value) + irreplaceableTransaction, + required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(BdkError_FeeTooLow value) feeTooLow, + required TResult Function(BdkError_FeeRateUnavailable value) + feeRateUnavailable, + required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, + required TResult Function(BdkError_Key value) key, + required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, + required TResult Function(BdkError_SpendingPolicyRequired value) + spendingPolicyRequired, + required TResult Function(BdkError_InvalidPolicyPathError value) + invalidPolicyPathError, + required TResult Function(BdkError_Signer value) signer, + required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, + required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, + required TResult Function(BdkError_Encode value) encode, + required TResult Function(BdkError_Miniscript value) miniscript, + required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(BdkError_Bip32 value) bip32, + required TResult Function(BdkError_Bip39 value) bip39, + required TResult Function(BdkError_Secp256k1 value) secp256K1, + required TResult Function(BdkError_Json value) json, + required TResult Function(BdkError_Psbt value) psbt, + required TResult Function(BdkError_PsbtParse value) psbtParse, + required TResult Function(BdkError_MissingCachedScripts value) + missingCachedScripts, + required TResult Function(BdkError_Electrum value) electrum, + required TResult Function(BdkError_Esplora value) esplora, + required TResult Function(BdkError_Sled value) sled, + required TResult Function(BdkError_Rpc value) rpc, + required TResult Function(BdkError_Rusqlite value) rusqlite, + required TResult Function(BdkError_InvalidInput value) invalidInput, + required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, + required TResult Function(BdkError_InvalidTransaction value) + invalidTransaction, + }) { + return invalidTransaction(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BdkError_Hex value)? hex, + TResult? Function(BdkError_Consensus value)? consensus, + TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult? Function(BdkError_Address value)? address, + TResult? Function(BdkError_Descriptor value)? descriptor, + TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult? Function(BdkError_Generic value)? generic, + TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult? Function(BdkError_NoRecipients value)? noRecipients, + TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(BdkError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult? Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult? Function(BdkError_TransactionConfirmed value)? + transactionConfirmed, + TResult? Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(BdkError_FeeTooLow value)? feeTooLow, + TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(BdkError_Key value)? key, + TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult? Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult? Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult? Function(BdkError_Signer value)? signer, + TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult? Function(BdkError_Encode value)? encode, + TResult? Function(BdkError_Miniscript value)? miniscript, + TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(BdkError_Bip32 value)? bip32, + TResult? Function(BdkError_Bip39 value)? bip39, + TResult? Function(BdkError_Secp256k1 value)? secp256K1, + TResult? Function(BdkError_Json value)? json, + TResult? Function(BdkError_Psbt value)? psbt, + TResult? Function(BdkError_PsbtParse value)? psbtParse, + TResult? Function(BdkError_MissingCachedScripts value)? + missingCachedScripts, + TResult? Function(BdkError_Electrum value)? electrum, + TResult? Function(BdkError_Esplora value)? esplora, + TResult? Function(BdkError_Sled value)? sled, + TResult? Function(BdkError_Rpc value)? rpc, + TResult? Function(BdkError_Rusqlite value)? rusqlite, + TResult? Function(BdkError_InvalidInput value)? invalidInput, + TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + }) { + return invalidTransaction?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BdkError_Hex value)? hex, + TResult Function(BdkError_Consensus value)? consensus, + TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, + TResult Function(BdkError_Address value)? address, + TResult Function(BdkError_Descriptor value)? descriptor, + TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, + TResult Function(BdkError_Generic value)? generic, + TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? + scriptDoesntHaveAddressForm, + TResult Function(BdkError_NoRecipients value)? noRecipients, + TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, + TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, + TResult Function(BdkError_BnBTotalTriesExceeded value)? + bnBTotalTriesExceeded, + TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, + TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, + TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, + TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, + TResult Function(BdkError_IrreplaceableTransaction value)? + irreplaceableTransaction, + TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(BdkError_FeeTooLow value)? feeTooLow, + TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, + TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(BdkError_Key value)? key, + TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, + TResult Function(BdkError_SpendingPolicyRequired value)? + spendingPolicyRequired, + TResult Function(BdkError_InvalidPolicyPathError value)? + invalidPolicyPathError, + TResult Function(BdkError_Signer value)? signer, + TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, + TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, + TResult Function(BdkError_Encode value)? encode, + TResult Function(BdkError_Miniscript value)? miniscript, + TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(BdkError_Bip32 value)? bip32, + TResult Function(BdkError_Bip39 value)? bip39, + TResult Function(BdkError_Secp256k1 value)? secp256K1, + TResult Function(BdkError_Json value)? json, + TResult Function(BdkError_Psbt value)? psbt, + TResult Function(BdkError_PsbtParse value)? psbtParse, + TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, + TResult Function(BdkError_Electrum value)? electrum, + TResult Function(BdkError_Esplora value)? esplora, + TResult Function(BdkError_Sled value)? sled, + TResult Function(BdkError_Rpc value)? rpc, + TResult Function(BdkError_Rusqlite value)? rusqlite, + TResult Function(BdkError_InvalidInput value)? invalidInput, + TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, + TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + required TResult orElse(), + }) { + if (invalidTransaction != null) { + return invalidTransaction(this); + } + return orElse(); + } +} + +abstract class BdkError_InvalidTransaction extends BdkError { + const factory BdkError_InvalidTransaction(final String field0) = + _$BdkError_InvalidTransactionImpl; + const BdkError_InvalidTransaction._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$BdkError_InvalidTransactionImplCopyWith<_$BdkError_InvalidTransactionImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$ConsensusError { + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) io, + required TResult Function(BigInt requested, BigInt max) + oversizedVectorAllocation, + required TResult Function(U8Array4 expected, U8Array4 actual) + invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function(String field0) parseFailed, + required TResult Function(int field0) unsupportedSegwitFlag, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? io, + TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function(String field0)? parseFailed, + TResult? Function(int field0)? unsupportedSegwitFlag, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? io, + TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function(String field0)? parseFailed, + TResult Function(int field0)? unsupportedSegwitFlag, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(ConsensusError_Io value) io, + required TResult Function(ConsensusError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(ConsensusError_InvalidChecksum value) + invalidChecksum, + required TResult Function(ConsensusError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(ConsensusError_ParseFailed value) parseFailed, + required TResult Function(ConsensusError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConsensusError_Io value)? io, + TResult? Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult? Function(ConsensusError_ParseFailed value)? parseFailed, + TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConsensusError_Io value)? io, + TResult Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(ConsensusError_ParseFailed value)? parseFailed, + TResult Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ConsensusErrorCopyWith<$Res> { + factory $ConsensusErrorCopyWith( + ConsensusError value, $Res Function(ConsensusError) then) = + _$ConsensusErrorCopyWithImpl<$Res, ConsensusError>; +} + +/// @nodoc +class _$ConsensusErrorCopyWithImpl<$Res, $Val extends ConsensusError> + implements $ConsensusErrorCopyWith<$Res> { + _$ConsensusErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$ConsensusError_IoImplCopyWith<$Res> { + factory _$$ConsensusError_IoImplCopyWith(_$ConsensusError_IoImpl value, + $Res Function(_$ConsensusError_IoImpl) then) = + __$$ConsensusError_IoImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$ConsensusError_IoImplCopyWithImpl<$Res> + extends _$ConsensusErrorCopyWithImpl<$Res, _$ConsensusError_IoImpl> + implements _$$ConsensusError_IoImplCopyWith<$Res> { + __$$ConsensusError_IoImplCopyWithImpl(_$ConsensusError_IoImpl _value, + $Res Function(_$ConsensusError_IoImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$ConsensusError_IoImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ConsensusError_IoImpl extends ConsensusError_Io { + const _$ConsensusError_IoImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'ConsensusError.io(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConsensusError_IoImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConsensusError_IoImplCopyWith<_$ConsensusError_IoImpl> get copyWith => + __$$ConsensusError_IoImplCopyWithImpl<_$ConsensusError_IoImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) io, + required TResult Function(BigInt requested, BigInt max) + oversizedVectorAllocation, + required TResult Function(U8Array4 expected, U8Array4 actual) + invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function(String field0) parseFailed, + required TResult Function(int field0) unsupportedSegwitFlag, + }) { + return io(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? io, + TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function(String field0)? parseFailed, + TResult? Function(int field0)? unsupportedSegwitFlag, + }) { + return io?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? io, + TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function(String field0)? parseFailed, + TResult Function(int field0)? unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (io != null) { + return io(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConsensusError_Io value) io, + required TResult Function(ConsensusError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(ConsensusError_InvalidChecksum value) + invalidChecksum, + required TResult Function(ConsensusError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(ConsensusError_ParseFailed value) parseFailed, + required TResult Function(ConsensusError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + }) { + return io(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConsensusError_Io value)? io, + TResult? Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult? Function(ConsensusError_ParseFailed value)? parseFailed, + TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + }) { + return io?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConsensusError_Io value)? io, + TResult Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(ConsensusError_ParseFailed value)? parseFailed, + TResult Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (io != null) { + return io(this); + } + return orElse(); + } +} + +abstract class ConsensusError_Io extends ConsensusError { + const factory ConsensusError_Io(final String field0) = + _$ConsensusError_IoImpl; + const ConsensusError_Io._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$ConsensusError_IoImplCopyWith<_$ConsensusError_IoImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ConsensusError_OversizedVectorAllocationImplCopyWith<$Res> { + factory _$$ConsensusError_OversizedVectorAllocationImplCopyWith( + _$ConsensusError_OversizedVectorAllocationImpl value, + $Res Function(_$ConsensusError_OversizedVectorAllocationImpl) then) = + __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt requested, BigInt max}); +} + +/// @nodoc +class __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl<$Res> + extends _$ConsensusErrorCopyWithImpl<$Res, + _$ConsensusError_OversizedVectorAllocationImpl> + implements _$$ConsensusError_OversizedVectorAllocationImplCopyWith<$Res> { + __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl( + _$ConsensusError_OversizedVectorAllocationImpl _value, + $Res Function(_$ConsensusError_OversizedVectorAllocationImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? requested = null, + Object? max = null, + }) { + return _then(_$ConsensusError_OversizedVectorAllocationImpl( + requested: null == requested + ? _value.requested + : requested // ignore: cast_nullable_to_non_nullable + as BigInt, + max: null == max + ? _value.max + : max // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$ConsensusError_OversizedVectorAllocationImpl + extends ConsensusError_OversizedVectorAllocation { + const _$ConsensusError_OversizedVectorAllocationImpl( + {required this.requested, required this.max}) + : super._(); + + @override + final BigInt requested; + @override + final BigInt max; + + @override + String toString() { + return 'ConsensusError.oversizedVectorAllocation(requested: $requested, max: $max)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConsensusError_OversizedVectorAllocationImpl && + (identical(other.requested, requested) || + other.requested == requested) && + (identical(other.max, max) || other.max == max)); + } + + @override + int get hashCode => Object.hash(runtimeType, requested, max); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConsensusError_OversizedVectorAllocationImplCopyWith< + _$ConsensusError_OversizedVectorAllocationImpl> + get copyWith => + __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl< + _$ConsensusError_OversizedVectorAllocationImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) io, + required TResult Function(BigInt requested, BigInt max) + oversizedVectorAllocation, + required TResult Function(U8Array4 expected, U8Array4 actual) + invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function(String field0) parseFailed, + required TResult Function(int field0) unsupportedSegwitFlag, + }) { + return oversizedVectorAllocation(requested, max); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? io, + TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function(String field0)? parseFailed, + TResult? Function(int field0)? unsupportedSegwitFlag, + }) { + return oversizedVectorAllocation?.call(requested, max); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? io, + TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function(String field0)? parseFailed, + TResult Function(int field0)? unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (oversizedVectorAllocation != null) { + return oversizedVectorAllocation(requested, max); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConsensusError_Io value) io, + required TResult Function(ConsensusError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(ConsensusError_InvalidChecksum value) + invalidChecksum, + required TResult Function(ConsensusError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(ConsensusError_ParseFailed value) parseFailed, + required TResult Function(ConsensusError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + }) { + return oversizedVectorAllocation(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConsensusError_Io value)? io, + TResult? Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult? Function(ConsensusError_ParseFailed value)? parseFailed, + TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + }) { + return oversizedVectorAllocation?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConsensusError_Io value)? io, + TResult Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(ConsensusError_ParseFailed value)? parseFailed, + TResult Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (oversizedVectorAllocation != null) { + return oversizedVectorAllocation(this); + } + return orElse(); + } +} + +abstract class ConsensusError_OversizedVectorAllocation extends ConsensusError { + const factory ConsensusError_OversizedVectorAllocation( + {required final BigInt requested, required final BigInt max}) = + _$ConsensusError_OversizedVectorAllocationImpl; + const ConsensusError_OversizedVectorAllocation._() : super._(); + + BigInt get requested; + BigInt get max; + @JsonKey(ignore: true) + _$$ConsensusError_OversizedVectorAllocationImplCopyWith< + _$ConsensusError_OversizedVectorAllocationImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ConsensusError_InvalidChecksumImplCopyWith<$Res> { + factory _$$ConsensusError_InvalidChecksumImplCopyWith( + _$ConsensusError_InvalidChecksumImpl value, + $Res Function(_$ConsensusError_InvalidChecksumImpl) then) = + __$$ConsensusError_InvalidChecksumImplCopyWithImpl<$Res>; + @useResult + $Res call({U8Array4 expected, U8Array4 actual}); +} + +/// @nodoc +class __$$ConsensusError_InvalidChecksumImplCopyWithImpl<$Res> + extends _$ConsensusErrorCopyWithImpl<$Res, + _$ConsensusError_InvalidChecksumImpl> + implements _$$ConsensusError_InvalidChecksumImplCopyWith<$Res> { + __$$ConsensusError_InvalidChecksumImplCopyWithImpl( + _$ConsensusError_InvalidChecksumImpl _value, + $Res Function(_$ConsensusError_InvalidChecksumImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? expected = null, + Object? actual = null, + }) { + return _then(_$ConsensusError_InvalidChecksumImpl( + expected: null == expected + ? _value.expected + : expected // ignore: cast_nullable_to_non_nullable + as U8Array4, + actual: null == actual + ? _value.actual + : actual // ignore: cast_nullable_to_non_nullable + as U8Array4, + )); + } +} + +/// @nodoc + +class _$ConsensusError_InvalidChecksumImpl + extends ConsensusError_InvalidChecksum { + const _$ConsensusError_InvalidChecksumImpl( + {required this.expected, required this.actual}) + : super._(); + + @override + final U8Array4 expected; + @override + final U8Array4 actual; + + @override + String toString() { + return 'ConsensusError.invalidChecksum(expected: $expected, actual: $actual)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConsensusError_InvalidChecksumImpl && + const DeepCollectionEquality().equals(other.expected, expected) && + const DeepCollectionEquality().equals(other.actual, actual)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(expected), + const DeepCollectionEquality().hash(actual)); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConsensusError_InvalidChecksumImplCopyWith< + _$ConsensusError_InvalidChecksumImpl> + get copyWith => __$$ConsensusError_InvalidChecksumImplCopyWithImpl< + _$ConsensusError_InvalidChecksumImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) io, + required TResult Function(BigInt requested, BigInt max) + oversizedVectorAllocation, + required TResult Function(U8Array4 expected, U8Array4 actual) + invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function(String field0) parseFailed, + required TResult Function(int field0) unsupportedSegwitFlag, + }) { + return invalidChecksum(expected, actual); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? io, + TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function(String field0)? parseFailed, + TResult? Function(int field0)? unsupportedSegwitFlag, + }) { + return invalidChecksum?.call(expected, actual); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? io, + TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function(String field0)? parseFailed, + TResult Function(int field0)? unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (invalidChecksum != null) { + return invalidChecksum(expected, actual); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConsensusError_Io value) io, + required TResult Function(ConsensusError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(ConsensusError_InvalidChecksum value) + invalidChecksum, + required TResult Function(ConsensusError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(ConsensusError_ParseFailed value) parseFailed, + required TResult Function(ConsensusError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + }) { + return invalidChecksum(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConsensusError_Io value)? io, + TResult? Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult? Function(ConsensusError_ParseFailed value)? parseFailed, + TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + }) { + return invalidChecksum?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConsensusError_Io value)? io, + TResult Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(ConsensusError_ParseFailed value)? parseFailed, + TResult Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (invalidChecksum != null) { + return invalidChecksum(this); + } + return orElse(); + } +} + +abstract class ConsensusError_InvalidChecksum extends ConsensusError { + const factory ConsensusError_InvalidChecksum( + {required final U8Array4 expected, + required final U8Array4 actual}) = _$ConsensusError_InvalidChecksumImpl; + const ConsensusError_InvalidChecksum._() : super._(); + + U8Array4 get expected; + U8Array4 get actual; + @JsonKey(ignore: true) + _$$ConsensusError_InvalidChecksumImplCopyWith< + _$ConsensusError_InvalidChecksumImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ConsensusError_NonMinimalVarIntImplCopyWith<$Res> { + factory _$$ConsensusError_NonMinimalVarIntImplCopyWith( + _$ConsensusError_NonMinimalVarIntImpl value, + $Res Function(_$ConsensusError_NonMinimalVarIntImpl) then) = + __$$ConsensusError_NonMinimalVarIntImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ConsensusError_NonMinimalVarIntImplCopyWithImpl<$Res> + extends _$ConsensusErrorCopyWithImpl<$Res, + _$ConsensusError_NonMinimalVarIntImpl> + implements _$$ConsensusError_NonMinimalVarIntImplCopyWith<$Res> { + __$$ConsensusError_NonMinimalVarIntImplCopyWithImpl( + _$ConsensusError_NonMinimalVarIntImpl _value, + $Res Function(_$ConsensusError_NonMinimalVarIntImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ConsensusError_NonMinimalVarIntImpl + extends ConsensusError_NonMinimalVarInt { + const _$ConsensusError_NonMinimalVarIntImpl() : super._(); + + @override + String toString() { + return 'ConsensusError.nonMinimalVarInt()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConsensusError_NonMinimalVarIntImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) io, + required TResult Function(BigInt requested, BigInt max) + oversizedVectorAllocation, + required TResult Function(U8Array4 expected, U8Array4 actual) + invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function(String field0) parseFailed, + required TResult Function(int field0) unsupportedSegwitFlag, + }) { + return nonMinimalVarInt(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? io, + TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function(String field0)? parseFailed, + TResult? Function(int field0)? unsupportedSegwitFlag, + }) { + return nonMinimalVarInt?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? io, + TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function(String field0)? parseFailed, + TResult Function(int field0)? unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (nonMinimalVarInt != null) { + return nonMinimalVarInt(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConsensusError_Io value) io, + required TResult Function(ConsensusError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(ConsensusError_InvalidChecksum value) + invalidChecksum, + required TResult Function(ConsensusError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(ConsensusError_ParseFailed value) parseFailed, + required TResult Function(ConsensusError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + }) { + return nonMinimalVarInt(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConsensusError_Io value)? io, + TResult? Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult? Function(ConsensusError_ParseFailed value)? parseFailed, + TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + }) { + return nonMinimalVarInt?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConsensusError_Io value)? io, + TResult Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(ConsensusError_ParseFailed value)? parseFailed, + TResult Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (nonMinimalVarInt != null) { + return nonMinimalVarInt(this); + } + return orElse(); + } +} + +abstract class ConsensusError_NonMinimalVarInt extends ConsensusError { + const factory ConsensusError_NonMinimalVarInt() = + _$ConsensusError_NonMinimalVarIntImpl; + const ConsensusError_NonMinimalVarInt._() : super._(); +} + +/// @nodoc +abstract class _$$ConsensusError_ParseFailedImplCopyWith<$Res> { + factory _$$ConsensusError_ParseFailedImplCopyWith( + _$ConsensusError_ParseFailedImpl value, + $Res Function(_$ConsensusError_ParseFailedImpl) then) = + __$$ConsensusError_ParseFailedImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$ConsensusError_ParseFailedImplCopyWithImpl<$Res> + extends _$ConsensusErrorCopyWithImpl<$Res, _$ConsensusError_ParseFailedImpl> + implements _$$ConsensusError_ParseFailedImplCopyWith<$Res> { + __$$ConsensusError_ParseFailedImplCopyWithImpl( + _$ConsensusError_ParseFailedImpl _value, + $Res Function(_$ConsensusError_ParseFailedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$ConsensusError_ParseFailedImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ConsensusError_ParseFailedImpl extends ConsensusError_ParseFailed { + const _$ConsensusError_ParseFailedImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'ConsensusError.parseFailed(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConsensusError_ParseFailedImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConsensusError_ParseFailedImplCopyWith<_$ConsensusError_ParseFailedImpl> + get copyWith => __$$ConsensusError_ParseFailedImplCopyWithImpl< + _$ConsensusError_ParseFailedImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) io, + required TResult Function(BigInt requested, BigInt max) + oversizedVectorAllocation, + required TResult Function(U8Array4 expected, U8Array4 actual) + invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function(String field0) parseFailed, + required TResult Function(int field0) unsupportedSegwitFlag, + }) { + return parseFailed(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? io, + TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function(String field0)? parseFailed, + TResult? Function(int field0)? unsupportedSegwitFlag, + }) { + return parseFailed?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? io, + TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function(String field0)? parseFailed, + TResult Function(int field0)? unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (parseFailed != null) { + return parseFailed(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConsensusError_Io value) io, + required TResult Function(ConsensusError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(ConsensusError_InvalidChecksum value) + invalidChecksum, + required TResult Function(ConsensusError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(ConsensusError_ParseFailed value) parseFailed, + required TResult Function(ConsensusError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + }) { + return parseFailed(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConsensusError_Io value)? io, + TResult? Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult? Function(ConsensusError_ParseFailed value)? parseFailed, + TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + }) { + return parseFailed?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConsensusError_Io value)? io, + TResult Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(ConsensusError_ParseFailed value)? parseFailed, + TResult Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (parseFailed != null) { + return parseFailed(this); + } + return orElse(); + } +} + +abstract class ConsensusError_ParseFailed extends ConsensusError { + const factory ConsensusError_ParseFailed(final String field0) = + _$ConsensusError_ParseFailedImpl; + const ConsensusError_ParseFailed._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$ConsensusError_ParseFailedImplCopyWith<_$ConsensusError_ParseFailedImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith<$Res> { + factory _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith( + _$ConsensusError_UnsupportedSegwitFlagImpl value, + $Res Function(_$ConsensusError_UnsupportedSegwitFlagImpl) then) = + __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl<$Res>; + @useResult + $Res call({int field0}); +} + +/// @nodoc +class __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl<$Res> + extends _$ConsensusErrorCopyWithImpl<$Res, + _$ConsensusError_UnsupportedSegwitFlagImpl> + implements _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith<$Res> { + __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl( + _$ConsensusError_UnsupportedSegwitFlagImpl _value, + $Res Function(_$ConsensusError_UnsupportedSegwitFlagImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$ConsensusError_UnsupportedSegwitFlagImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$ConsensusError_UnsupportedSegwitFlagImpl + extends ConsensusError_UnsupportedSegwitFlag { + const _$ConsensusError_UnsupportedSegwitFlagImpl(this.field0) : super._(); + + @override + final int field0; + + @override + String toString() { + return 'ConsensusError.unsupportedSegwitFlag(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConsensusError_UnsupportedSegwitFlagImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith< + _$ConsensusError_UnsupportedSegwitFlagImpl> + get copyWith => __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl< + _$ConsensusError_UnsupportedSegwitFlagImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String field0) io, + required TResult Function(BigInt requested, BigInt max) + oversizedVectorAllocation, + required TResult Function(U8Array4 expected, U8Array4 actual) + invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function(String field0) parseFailed, + required TResult Function(int field0) unsupportedSegwitFlag, + }) { + return unsupportedSegwitFlag(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String field0)? io, + TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function(String field0)? parseFailed, + TResult? Function(int field0)? unsupportedSegwitFlag, + }) { + return unsupportedSegwitFlag?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String field0)? io, + TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, + TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function(String field0)? parseFailed, + TResult Function(int field0)? unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (unsupportedSegwitFlag != null) { + return unsupportedSegwitFlag(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConsensusError_Io value) io, + required TResult Function(ConsensusError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(ConsensusError_InvalidChecksum value) + invalidChecksum, + required TResult Function(ConsensusError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(ConsensusError_ParseFailed value) parseFailed, + required TResult Function(ConsensusError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + }) { + return unsupportedSegwitFlag(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConsensusError_Io value)? io, + TResult? Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult? Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult? Function(ConsensusError_ParseFailed value)? parseFailed, + TResult? Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + }) { + return unsupportedSegwitFlag?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConsensusError_Io value)? io, + TResult Function(ConsensusError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(ConsensusError_InvalidChecksum value)? invalidChecksum, + TResult Function(ConsensusError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(ConsensusError_ParseFailed value)? parseFailed, + TResult Function(ConsensusError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + required TResult orElse(), + }) { + if (unsupportedSegwitFlag != null) { + return unsupportedSegwitFlag(this); + } + return orElse(); + } +} + +abstract class ConsensusError_UnsupportedSegwitFlag extends ConsensusError { + const factory ConsensusError_UnsupportedSegwitFlag(final int field0) = + _$ConsensusError_UnsupportedSegwitFlagImpl; + const ConsensusError_UnsupportedSegwitFlag._() : super._(); + + int get field0; + @JsonKey(ignore: true) + _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith< + _$ConsensusError_UnsupportedSegwitFlagImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$DescriptorError { + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $DescriptorErrorCopyWith<$Res> { + factory $DescriptorErrorCopyWith( + DescriptorError value, $Res Function(DescriptorError) then) = + _$DescriptorErrorCopyWithImpl<$Res, DescriptorError>; +} + +/// @nodoc +class _$DescriptorErrorCopyWithImpl<$Res, $Val extends DescriptorError> + implements $DescriptorErrorCopyWith<$Res> { + _$DescriptorErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$DescriptorError_InvalidHdKeyPathImplCopyWith<$Res> { + factory _$$DescriptorError_InvalidHdKeyPathImplCopyWith( + _$DescriptorError_InvalidHdKeyPathImpl value, + $Res Function(_$DescriptorError_InvalidHdKeyPathImpl) then) = + __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, + _$DescriptorError_InvalidHdKeyPathImpl> + implements _$$DescriptorError_InvalidHdKeyPathImplCopyWith<$Res> { + __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl( + _$DescriptorError_InvalidHdKeyPathImpl _value, + $Res Function(_$DescriptorError_InvalidHdKeyPathImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$DescriptorError_InvalidHdKeyPathImpl + extends DescriptorError_InvalidHdKeyPath { + const _$DescriptorError_InvalidHdKeyPathImpl() : super._(); + + @override + String toString() { + return 'DescriptorError.invalidHdKeyPath()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_InvalidHdKeyPathImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return invalidHdKeyPath(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return invalidHdKeyPath?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (invalidHdKeyPath != null) { + return invalidHdKeyPath(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return invalidHdKeyPath(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return invalidHdKeyPath?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (invalidHdKeyPath != null) { + return invalidHdKeyPath(this); + } + return orElse(); + } +} + +abstract class DescriptorError_InvalidHdKeyPath extends DescriptorError { + const factory DescriptorError_InvalidHdKeyPath() = + _$DescriptorError_InvalidHdKeyPathImpl; + const DescriptorError_InvalidHdKeyPath._() : super._(); +} + +/// @nodoc +abstract class _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith<$Res> { + factory _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith( + _$DescriptorError_InvalidDescriptorChecksumImpl value, + $Res Function(_$DescriptorError_InvalidDescriptorChecksumImpl) then) = + __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, + _$DescriptorError_InvalidDescriptorChecksumImpl> + implements _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith<$Res> { + __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl( + _$DescriptorError_InvalidDescriptorChecksumImpl _value, + $Res Function(_$DescriptorError_InvalidDescriptorChecksumImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$DescriptorError_InvalidDescriptorChecksumImpl + extends DescriptorError_InvalidDescriptorChecksum { + const _$DescriptorError_InvalidDescriptorChecksumImpl() : super._(); + + @override + String toString() { + return 'DescriptorError.invalidDescriptorChecksum()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_InvalidDescriptorChecksumImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return invalidDescriptorChecksum(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return invalidDescriptorChecksum?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (invalidDescriptorChecksum != null) { + return invalidDescriptorChecksum(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return invalidDescriptorChecksum(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return invalidDescriptorChecksum?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (invalidDescriptorChecksum != null) { + return invalidDescriptorChecksum(this); + } + return orElse(); + } +} + +abstract class DescriptorError_InvalidDescriptorChecksum + extends DescriptorError { + const factory DescriptorError_InvalidDescriptorChecksum() = + _$DescriptorError_InvalidDescriptorChecksumImpl; + const DescriptorError_InvalidDescriptorChecksum._() : super._(); +} + +/// @nodoc +abstract class _$$DescriptorError_HardenedDerivationXpubImplCopyWith<$Res> { + factory _$$DescriptorError_HardenedDerivationXpubImplCopyWith( + _$DescriptorError_HardenedDerivationXpubImpl value, + $Res Function(_$DescriptorError_HardenedDerivationXpubImpl) then) = + __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, + _$DescriptorError_HardenedDerivationXpubImpl> + implements _$$DescriptorError_HardenedDerivationXpubImplCopyWith<$Res> { + __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl( + _$DescriptorError_HardenedDerivationXpubImpl _value, + $Res Function(_$DescriptorError_HardenedDerivationXpubImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$DescriptorError_HardenedDerivationXpubImpl + extends DescriptorError_HardenedDerivationXpub { + const _$DescriptorError_HardenedDerivationXpubImpl() : super._(); + + @override + String toString() { + return 'DescriptorError.hardenedDerivationXpub()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_HardenedDerivationXpubImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return hardenedDerivationXpub(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return hardenedDerivationXpub?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (hardenedDerivationXpub != null) { + return hardenedDerivationXpub(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return hardenedDerivationXpub(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return hardenedDerivationXpub?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (hardenedDerivationXpub != null) { + return hardenedDerivationXpub(this); + } + return orElse(); + } +} + +abstract class DescriptorError_HardenedDerivationXpub extends DescriptorError { + const factory DescriptorError_HardenedDerivationXpub() = + _$DescriptorError_HardenedDerivationXpubImpl; + const DescriptorError_HardenedDerivationXpub._() : super._(); +} + +/// @nodoc +abstract class _$$DescriptorError_MultiPathImplCopyWith<$Res> { + factory _$$DescriptorError_MultiPathImplCopyWith( + _$DescriptorError_MultiPathImpl value, + $Res Function(_$DescriptorError_MultiPathImpl) then) = + __$$DescriptorError_MultiPathImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$DescriptorError_MultiPathImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_MultiPathImpl> + implements _$$DescriptorError_MultiPathImplCopyWith<$Res> { + __$$DescriptorError_MultiPathImplCopyWithImpl( + _$DescriptorError_MultiPathImpl _value, + $Res Function(_$DescriptorError_MultiPathImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$DescriptorError_MultiPathImpl extends DescriptorError_MultiPath { + const _$DescriptorError_MultiPathImpl() : super._(); + + @override + String toString() { + return 'DescriptorError.multiPath()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_MultiPathImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return multiPath(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return multiPath?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (multiPath != null) { + return multiPath(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return multiPath(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return multiPath?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (multiPath != null) { + return multiPath(this); + } + return orElse(); + } +} + +abstract class DescriptorError_MultiPath extends DescriptorError { + const factory DescriptorError_MultiPath() = _$DescriptorError_MultiPathImpl; + const DescriptorError_MultiPath._() : super._(); +} + +/// @nodoc +abstract class _$$DescriptorError_KeyImplCopyWith<$Res> { + factory _$$DescriptorError_KeyImplCopyWith(_$DescriptorError_KeyImpl value, + $Res Function(_$DescriptorError_KeyImpl) then) = + __$$DescriptorError_KeyImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$DescriptorError_KeyImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_KeyImpl> + implements _$$DescriptorError_KeyImplCopyWith<$Res> { + __$$DescriptorError_KeyImplCopyWithImpl(_$DescriptorError_KeyImpl _value, + $Res Function(_$DescriptorError_KeyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$DescriptorError_KeyImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$DescriptorError_KeyImpl extends DescriptorError_Key { + const _$DescriptorError_KeyImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'DescriptorError.key(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_KeyImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorError_KeyImplCopyWith<_$DescriptorError_KeyImpl> get copyWith => + __$$DescriptorError_KeyImplCopyWithImpl<_$DescriptorError_KeyImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return key(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return key?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (key != null) { + return key(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return key(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return key?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (key != null) { + return key(this); + } + return orElse(); + } +} + +abstract class DescriptorError_Key extends DescriptorError { + const factory DescriptorError_Key(final String field0) = + _$DescriptorError_KeyImpl; + const DescriptorError_Key._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$DescriptorError_KeyImplCopyWith<_$DescriptorError_KeyImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$DescriptorError_PolicyImplCopyWith<$Res> { + factory _$$DescriptorError_PolicyImplCopyWith( + _$DescriptorError_PolicyImpl value, + $Res Function(_$DescriptorError_PolicyImpl) then) = + __$$DescriptorError_PolicyImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$DescriptorError_PolicyImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_PolicyImpl> + implements _$$DescriptorError_PolicyImplCopyWith<$Res> { + __$$DescriptorError_PolicyImplCopyWithImpl( + _$DescriptorError_PolicyImpl _value, + $Res Function(_$DescriptorError_PolicyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$DescriptorError_PolicyImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$DescriptorError_PolicyImpl extends DescriptorError_Policy { + const _$DescriptorError_PolicyImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'DescriptorError.policy(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_PolicyImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorError_PolicyImplCopyWith<_$DescriptorError_PolicyImpl> + get copyWith => __$$DescriptorError_PolicyImplCopyWithImpl< + _$DescriptorError_PolicyImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return policy(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return policy?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (policy != null) { + return policy(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return policy(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return policy?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (policy != null) { + return policy(this); + } + return orElse(); + } +} + +abstract class DescriptorError_Policy extends DescriptorError { + const factory DescriptorError_Policy(final String field0) = + _$DescriptorError_PolicyImpl; + const DescriptorError_Policy._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$DescriptorError_PolicyImplCopyWith<_$DescriptorError_PolicyImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith<$Res> { + factory _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith( + _$DescriptorError_InvalidDescriptorCharacterImpl value, + $Res Function(_$DescriptorError_InvalidDescriptorCharacterImpl) + then) = + __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl<$Res>; + @useResult + $Res call({int field0}); +} + +/// @nodoc +class __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, + _$DescriptorError_InvalidDescriptorCharacterImpl> + implements _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith<$Res> { + __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl( + _$DescriptorError_InvalidDescriptorCharacterImpl _value, + $Res Function(_$DescriptorError_InvalidDescriptorCharacterImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$DescriptorError_InvalidDescriptorCharacterImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$DescriptorError_InvalidDescriptorCharacterImpl + extends DescriptorError_InvalidDescriptorCharacter { + const _$DescriptorError_InvalidDescriptorCharacterImpl(this.field0) + : super._(); + + @override + final int field0; + + @override + String toString() { + return 'DescriptorError.invalidDescriptorCharacter(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_InvalidDescriptorCharacterImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith< + _$DescriptorError_InvalidDescriptorCharacterImpl> + get copyWith => + __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl< + _$DescriptorError_InvalidDescriptorCharacterImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return invalidDescriptorCharacter(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return invalidDescriptorCharacter?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (invalidDescriptorCharacter != null) { + return invalidDescriptorCharacter(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return invalidDescriptorCharacter(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return invalidDescriptorCharacter?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (invalidDescriptorCharacter != null) { + return invalidDescriptorCharacter(this); + } + return orElse(); + } +} + +abstract class DescriptorError_InvalidDescriptorCharacter + extends DescriptorError { + const factory DescriptorError_InvalidDescriptorCharacter(final int field0) = + _$DescriptorError_InvalidDescriptorCharacterImpl; + const DescriptorError_InvalidDescriptorCharacter._() : super._(); + + int get field0; + @JsonKey(ignore: true) + _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith< + _$DescriptorError_InvalidDescriptorCharacterImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$DescriptorError_Bip32ImplCopyWith<$Res> { + factory _$$DescriptorError_Bip32ImplCopyWith( + _$DescriptorError_Bip32Impl value, + $Res Function(_$DescriptorError_Bip32Impl) then) = + __$$DescriptorError_Bip32ImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$DescriptorError_Bip32ImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_Bip32Impl> + implements _$$DescriptorError_Bip32ImplCopyWith<$Res> { + __$$DescriptorError_Bip32ImplCopyWithImpl(_$DescriptorError_Bip32Impl _value, + $Res Function(_$DescriptorError_Bip32Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$DescriptorError_Bip32Impl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$DescriptorError_Bip32Impl extends DescriptorError_Bip32 { + const _$DescriptorError_Bip32Impl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'DescriptorError.bip32(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_Bip32Impl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorError_Bip32ImplCopyWith<_$DescriptorError_Bip32Impl> + get copyWith => __$$DescriptorError_Bip32ImplCopyWithImpl< + _$DescriptorError_Bip32Impl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return bip32(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return bip32?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (bip32 != null) { + return bip32(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return bip32(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return bip32?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (bip32 != null) { + return bip32(this); + } + return orElse(); + } +} + +abstract class DescriptorError_Bip32 extends DescriptorError { + const factory DescriptorError_Bip32(final String field0) = + _$DescriptorError_Bip32Impl; + const DescriptorError_Bip32._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$DescriptorError_Bip32ImplCopyWith<_$DescriptorError_Bip32Impl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$DescriptorError_Base58ImplCopyWith<$Res> { + factory _$$DescriptorError_Base58ImplCopyWith( + _$DescriptorError_Base58Impl value, + $Res Function(_$DescriptorError_Base58Impl) then) = + __$$DescriptorError_Base58ImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$DescriptorError_Base58ImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_Base58Impl> + implements _$$DescriptorError_Base58ImplCopyWith<$Res> { + __$$DescriptorError_Base58ImplCopyWithImpl( + _$DescriptorError_Base58Impl _value, + $Res Function(_$DescriptorError_Base58Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$DescriptorError_Base58Impl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$DescriptorError_Base58Impl extends DescriptorError_Base58 { + const _$DescriptorError_Base58Impl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'DescriptorError.base58(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_Base58Impl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorError_Base58ImplCopyWith<_$DescriptorError_Base58Impl> + get copyWith => __$$DescriptorError_Base58ImplCopyWithImpl< + _$DescriptorError_Base58Impl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return base58(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return base58?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (base58 != null) { + return base58(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return base58(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return base58?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (base58 != null) { + return base58(this); + } + return orElse(); + } +} + +abstract class DescriptorError_Base58 extends DescriptorError { + const factory DescriptorError_Base58(final String field0) = + _$DescriptorError_Base58Impl; + const DescriptorError_Base58._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$DescriptorError_Base58ImplCopyWith<_$DescriptorError_Base58Impl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$DescriptorError_PkImplCopyWith<$Res> { + factory _$$DescriptorError_PkImplCopyWith(_$DescriptorError_PkImpl value, + $Res Function(_$DescriptorError_PkImpl) then) = + __$$DescriptorError_PkImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$DescriptorError_PkImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_PkImpl> + implements _$$DescriptorError_PkImplCopyWith<$Res> { + __$$DescriptorError_PkImplCopyWithImpl(_$DescriptorError_PkImpl _value, + $Res Function(_$DescriptorError_PkImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$DescriptorError_PkImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$DescriptorError_PkImpl extends DescriptorError_Pk { + const _$DescriptorError_PkImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'DescriptorError.pk(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_PkImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorError_PkImplCopyWith<_$DescriptorError_PkImpl> get copyWith => + __$$DescriptorError_PkImplCopyWithImpl<_$DescriptorError_PkImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return pk(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return pk?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (pk != null) { + return pk(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return pk(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return pk?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (pk != null) { + return pk(this); + } + return orElse(); + } +} + +abstract class DescriptorError_Pk extends DescriptorError { + const factory DescriptorError_Pk(final String field0) = + _$DescriptorError_PkImpl; + const DescriptorError_Pk._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$DescriptorError_PkImplCopyWith<_$DescriptorError_PkImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$DescriptorError_MiniscriptImplCopyWith<$Res> { + factory _$$DescriptorError_MiniscriptImplCopyWith( + _$DescriptorError_MiniscriptImpl value, + $Res Function(_$DescriptorError_MiniscriptImpl) then) = + __$$DescriptorError_MiniscriptImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$DescriptorError_MiniscriptImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, + _$DescriptorError_MiniscriptImpl> + implements _$$DescriptorError_MiniscriptImplCopyWith<$Res> { + __$$DescriptorError_MiniscriptImplCopyWithImpl( + _$DescriptorError_MiniscriptImpl _value, + $Res Function(_$DescriptorError_MiniscriptImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$DescriptorError_MiniscriptImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$DescriptorError_MiniscriptImpl extends DescriptorError_Miniscript { + const _$DescriptorError_MiniscriptImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'DescriptorError.miniscript(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_MiniscriptImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorError_MiniscriptImplCopyWith<_$DescriptorError_MiniscriptImpl> + get copyWith => __$$DescriptorError_MiniscriptImplCopyWithImpl< + _$DescriptorError_MiniscriptImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return miniscript(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return miniscript?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (miniscript != null) { + return miniscript(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return miniscript(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return miniscript?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (miniscript != null) { + return miniscript(this); + } + return orElse(); + } +} + +abstract class DescriptorError_Miniscript extends DescriptorError { + const factory DescriptorError_Miniscript(final String field0) = + _$DescriptorError_MiniscriptImpl; + const DescriptorError_Miniscript._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$DescriptorError_MiniscriptImplCopyWith<_$DescriptorError_MiniscriptImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$DescriptorError_HexImplCopyWith<$Res> { + factory _$$DescriptorError_HexImplCopyWith(_$DescriptorError_HexImpl value, + $Res Function(_$DescriptorError_HexImpl) then) = + __$$DescriptorError_HexImplCopyWithImpl<$Res>; + @useResult + $Res call({String field0}); +} + +/// @nodoc +class __$$DescriptorError_HexImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_HexImpl> + implements _$$DescriptorError_HexImplCopyWith<$Res> { + __$$DescriptorError_HexImplCopyWithImpl(_$DescriptorError_HexImpl _value, + $Res Function(_$DescriptorError_HexImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$DescriptorError_HexImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$DescriptorError_HexImpl extends DescriptorError_Hex { + const _$DescriptorError_HexImpl(this.field0) : super._(); + + @override + final String field0; + + @override + String toString() { + return 'DescriptorError.hex(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorError_HexImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorError_HexImplCopyWith<_$DescriptorError_HexImpl> get copyWith => + __$$DescriptorError_HexImplCopyWithImpl<_$DescriptorError_HexImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidHdKeyPath, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String field0) key, + required TResult Function(String field0) policy, + required TResult Function(int field0) invalidDescriptorCharacter, + required TResult Function(String field0) bip32, + required TResult Function(String field0) base58, + required TResult Function(String field0) pk, + required TResult Function(String field0) miniscript, + required TResult Function(String field0) hex, + }) { + return hex(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidHdKeyPath, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String field0)? key, + TResult? Function(String field0)? policy, + TResult? Function(int field0)? invalidDescriptorCharacter, + TResult? Function(String field0)? bip32, + TResult? Function(String field0)? base58, + TResult? Function(String field0)? pk, + TResult? Function(String field0)? miniscript, + TResult? Function(String field0)? hex, + }) { + return hex?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidHdKeyPath, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String field0)? key, + TResult Function(String field0)? policy, + TResult Function(int field0)? invalidDescriptorCharacter, + TResult Function(String field0)? bip32, + TResult Function(String field0)? base58, + TResult Function(String field0)? pk, + TResult Function(String field0)? miniscript, + TResult Function(String field0)? hex, + required TResult orElse(), + }) { + if (hex != null) { + return hex(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_InvalidDescriptorChecksum value) + invalidDescriptorChecksum, + required TResult Function(DescriptorError_HardenedDerivationXpub value) + hardenedDerivationXpub, + required TResult Function(DescriptorError_MultiPath value) multiPath, + required TResult Function(DescriptorError_Key value) key, + required TResult Function(DescriptorError_Policy value) policy, + required TResult Function(DescriptorError_InvalidDescriptorCharacter value) + invalidDescriptorCharacter, + required TResult Function(DescriptorError_Bip32 value) bip32, + required TResult Function(DescriptorError_Base58 value) base58, + required TResult Function(DescriptorError_Pk value) pk, + required TResult Function(DescriptorError_Miniscript value) miniscript, + required TResult Function(DescriptorError_Hex value) hex, + }) { + return hex(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult? Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult? Function(DescriptorError_MultiPath value)? multiPath, + TResult? Function(DescriptorError_Key value)? key, + TResult? Function(DescriptorError_Policy value)? policy, + TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult? Function(DescriptorError_Bip32 value)? bip32, + TResult? Function(DescriptorError_Base58 value)? base58, + TResult? Function(DescriptorError_Pk value)? pk, + TResult? Function(DescriptorError_Miniscript value)? miniscript, + TResult? Function(DescriptorError_Hex value)? hex, + }) { + return hex?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_InvalidDescriptorChecksum value)? + invalidDescriptorChecksum, + TResult Function(DescriptorError_HardenedDerivationXpub value)? + hardenedDerivationXpub, + TResult Function(DescriptorError_MultiPath value)? multiPath, + TResult Function(DescriptorError_Key value)? key, + TResult Function(DescriptorError_Policy value)? policy, + TResult Function(DescriptorError_InvalidDescriptorCharacter value)? + invalidDescriptorCharacter, + TResult Function(DescriptorError_Bip32 value)? bip32, + TResult Function(DescriptorError_Base58 value)? base58, + TResult Function(DescriptorError_Pk value)? pk, + TResult Function(DescriptorError_Miniscript value)? miniscript, + TResult Function(DescriptorError_Hex value)? hex, + required TResult orElse(), + }) { + if (hex != null) { + return hex(this); + } + return orElse(); + } +} + +abstract class DescriptorError_Hex extends DescriptorError { + const factory DescriptorError_Hex(final String field0) = + _$DescriptorError_HexImpl; + const DescriptorError_Hex._() : super._(); + + String get field0; + @JsonKey(ignore: true) + _$$DescriptorError_HexImplCopyWith<_$DescriptorError_HexImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$HexError { + Object get field0 => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(int field0) invalidChar, + required TResult Function(BigInt field0) oddLengthString, + required TResult Function(BigInt field0, BigInt field1) invalidLength, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? invalidChar, + TResult? Function(BigInt field0)? oddLengthString, + TResult? Function(BigInt field0, BigInt field1)? invalidLength, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? invalidChar, + TResult Function(BigInt field0)? oddLengthString, + TResult Function(BigInt field0, BigInt field1)? invalidLength, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(HexError_InvalidChar value) invalidChar, + required TResult Function(HexError_OddLengthString value) oddLengthString, + required TResult Function(HexError_InvalidLength value) invalidLength, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(HexError_InvalidChar value)? invalidChar, + TResult? Function(HexError_OddLengthString value)? oddLengthString, + TResult? Function(HexError_InvalidLength value)? invalidLength, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(HexError_InvalidChar value)? invalidChar, + TResult Function(HexError_OddLengthString value)? oddLengthString, + TResult Function(HexError_InvalidLength value)? invalidLength, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $HexErrorCopyWith<$Res> { + factory $HexErrorCopyWith(HexError value, $Res Function(HexError) then) = + _$HexErrorCopyWithImpl<$Res, HexError>; +} + +/// @nodoc +class _$HexErrorCopyWithImpl<$Res, $Val extends HexError> + implements $HexErrorCopyWith<$Res> { + _$HexErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$HexError_InvalidCharImplCopyWith<$Res> { + factory _$$HexError_InvalidCharImplCopyWith(_$HexError_InvalidCharImpl value, + $Res Function(_$HexError_InvalidCharImpl) then) = + __$$HexError_InvalidCharImplCopyWithImpl<$Res>; + @useResult + $Res call({int field0}); +} + +/// @nodoc +class __$$HexError_InvalidCharImplCopyWithImpl<$Res> + extends _$HexErrorCopyWithImpl<$Res, _$HexError_InvalidCharImpl> + implements _$$HexError_InvalidCharImplCopyWith<$Res> { + __$$HexError_InvalidCharImplCopyWithImpl(_$HexError_InvalidCharImpl _value, + $Res Function(_$HexError_InvalidCharImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$HexError_InvalidCharImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$HexError_InvalidCharImpl extends HexError_InvalidChar { + const _$HexError_InvalidCharImpl(this.field0) : super._(); + + @override + final int field0; + + @override + String toString() { + return 'HexError.invalidChar(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$HexError_InvalidCharImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$HexError_InvalidCharImplCopyWith<_$HexError_InvalidCharImpl> + get copyWith => + __$$HexError_InvalidCharImplCopyWithImpl<_$HexError_InvalidCharImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int field0) invalidChar, + required TResult Function(BigInt field0) oddLengthString, + required TResult Function(BigInt field0, BigInt field1) invalidLength, + }) { + return invalidChar(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? invalidChar, + TResult? Function(BigInt field0)? oddLengthString, + TResult? Function(BigInt field0, BigInt field1)? invalidLength, + }) { + return invalidChar?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? invalidChar, + TResult Function(BigInt field0)? oddLengthString, + TResult Function(BigInt field0, BigInt field1)? invalidLength, + required TResult orElse(), + }) { + if (invalidChar != null) { + return invalidChar(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(HexError_InvalidChar value) invalidChar, + required TResult Function(HexError_OddLengthString value) oddLengthString, + required TResult Function(HexError_InvalidLength value) invalidLength, + }) { + return invalidChar(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(HexError_InvalidChar value)? invalidChar, + TResult? Function(HexError_OddLengthString value)? oddLengthString, + TResult? Function(HexError_InvalidLength value)? invalidLength, + }) { + return invalidChar?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(HexError_InvalidChar value)? invalidChar, + TResult Function(HexError_OddLengthString value)? oddLengthString, + TResult Function(HexError_InvalidLength value)? invalidLength, + required TResult orElse(), + }) { + if (invalidChar != null) { + return invalidChar(this); + } + return orElse(); + } +} + +abstract class HexError_InvalidChar extends HexError { + const factory HexError_InvalidChar(final int field0) = + _$HexError_InvalidCharImpl; + const HexError_InvalidChar._() : super._(); + + @override + int get field0; + @JsonKey(ignore: true) + _$$HexError_InvalidCharImplCopyWith<_$HexError_InvalidCharImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$HexError_OddLengthStringImplCopyWith<$Res> { + factory _$$HexError_OddLengthStringImplCopyWith( + _$HexError_OddLengthStringImpl value, + $Res Function(_$HexError_OddLengthStringImpl) then) = + __$$HexError_OddLengthStringImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt field0}); +} + +/// @nodoc +class __$$HexError_OddLengthStringImplCopyWithImpl<$Res> + extends _$HexErrorCopyWithImpl<$Res, _$HexError_OddLengthStringImpl> + implements _$$HexError_OddLengthStringImplCopyWith<$Res> { + __$$HexError_OddLengthStringImplCopyWithImpl( + _$HexError_OddLengthStringImpl _value, + $Res Function(_$HexError_OddLengthStringImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$HexError_OddLengthStringImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$HexError_OddLengthStringImpl extends HexError_OddLengthString { + const _$HexError_OddLengthStringImpl(this.field0) : super._(); + + @override + final BigInt field0; + + @override + String toString() { + return 'HexError.oddLengthString(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$HexError_OddLengthStringImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$HexError_OddLengthStringImplCopyWith<_$HexError_OddLengthStringImpl> + get copyWith => __$$HexError_OddLengthStringImplCopyWithImpl< + _$HexError_OddLengthStringImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int field0) invalidChar, + required TResult Function(BigInt field0) oddLengthString, + required TResult Function(BigInt field0, BigInt field1) invalidLength, + }) { + return oddLengthString(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? invalidChar, + TResult? Function(BigInt field0)? oddLengthString, + TResult? Function(BigInt field0, BigInt field1)? invalidLength, + }) { + return oddLengthString?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? invalidChar, + TResult Function(BigInt field0)? oddLengthString, + TResult Function(BigInt field0, BigInt field1)? invalidLength, + required TResult orElse(), + }) { + if (oddLengthString != null) { + return oddLengthString(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(HexError_InvalidChar value) invalidChar, + required TResult Function(HexError_OddLengthString value) oddLengthString, + required TResult Function(HexError_InvalidLength value) invalidLength, + }) { + return oddLengthString(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(HexError_InvalidChar value)? invalidChar, + TResult? Function(HexError_OddLengthString value)? oddLengthString, + TResult? Function(HexError_InvalidLength value)? invalidLength, + }) { + return oddLengthString?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(HexError_InvalidChar value)? invalidChar, + TResult Function(HexError_OddLengthString value)? oddLengthString, + TResult Function(HexError_InvalidLength value)? invalidLength, + required TResult orElse(), + }) { + if (oddLengthString != null) { + return oddLengthString(this); + } + return orElse(); + } +} + +abstract class HexError_OddLengthString extends HexError { + const factory HexError_OddLengthString(final BigInt field0) = + _$HexError_OddLengthStringImpl; + const HexError_OddLengthString._() : super._(); + + @override + BigInt get field0; + @JsonKey(ignore: true) + _$$HexError_OddLengthStringImplCopyWith<_$HexError_OddLengthStringImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$HexError_InvalidLengthImplCopyWith<$Res> { + factory _$$HexError_InvalidLengthImplCopyWith( + _$HexError_InvalidLengthImpl value, + $Res Function(_$HexError_InvalidLengthImpl) then) = + __$$HexError_InvalidLengthImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt field0, BigInt field1}); +} + +/// @nodoc +class __$$HexError_InvalidLengthImplCopyWithImpl<$Res> + extends _$HexErrorCopyWithImpl<$Res, _$HexError_InvalidLengthImpl> + implements _$$HexError_InvalidLengthImplCopyWith<$Res> { + __$$HexError_InvalidLengthImplCopyWithImpl( + _$HexError_InvalidLengthImpl _value, + $Res Function(_$HexError_InvalidLengthImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + Object? field1 = null, + }) { + return _then(_$HexError_InvalidLengthImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as BigInt, + null == field1 + ? _value.field1 + : field1 // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$HexError_InvalidLengthImpl extends HexError_InvalidLength { + const _$HexError_InvalidLengthImpl(this.field0, this.field1) : super._(); + + @override + final BigInt field0; + @override + final BigInt field1; + + @override + String toString() { + return 'HexError.invalidLength(field0: $field0, field1: $field1)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$HexError_InvalidLengthImpl && + (identical(other.field0, field0) || other.field0 == field0) && + (identical(other.field1, field1) || other.field1 == field1)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0, field1); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$HexError_InvalidLengthImplCopyWith<_$HexError_InvalidLengthImpl> + get copyWith => __$$HexError_InvalidLengthImplCopyWithImpl< + _$HexError_InvalidLengthImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int field0) invalidChar, + required TResult Function(BigInt field0) oddLengthString, + required TResult Function(BigInt field0, BigInt field1) invalidLength, + }) { + return invalidLength(field0, field1); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? invalidChar, + TResult? Function(BigInt field0)? oddLengthString, + TResult? Function(BigInt field0, BigInt field1)? invalidLength, + }) { + return invalidLength?.call(field0, field1); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? invalidChar, + TResult Function(BigInt field0)? oddLengthString, + TResult Function(BigInt field0, BigInt field1)? invalidLength, + required TResult orElse(), + }) { + if (invalidLength != null) { + return invalidLength(field0, field1); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(HexError_InvalidChar value) invalidChar, + required TResult Function(HexError_OddLengthString value) oddLengthString, + required TResult Function(HexError_InvalidLength value) invalidLength, + }) { + return invalidLength(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(HexError_InvalidChar value)? invalidChar, + TResult? Function(HexError_OddLengthString value)? oddLengthString, + TResult? Function(HexError_InvalidLength value)? invalidLength, + }) { + return invalidLength?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(HexError_InvalidChar value)? invalidChar, + TResult Function(HexError_OddLengthString value)? oddLengthString, + TResult Function(HexError_InvalidLength value)? invalidLength, + required TResult orElse(), + }) { + if (invalidLength != null) { + return invalidLength(this); + } + return orElse(); + } +} + +abstract class HexError_InvalidLength extends HexError { + const factory HexError_InvalidLength( + final BigInt field0, final BigInt field1) = _$HexError_InvalidLengthImpl; + const HexError_InvalidLength._() : super._(); + + @override + BigInt get field0; + BigInt get field1; + @JsonKey(ignore: true) + _$$HexError_InvalidLengthImplCopyWith<_$HexError_InvalidLengthImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/lib/src/generated/api/key.dart b/lib/src/generated/api/key.dart new file mode 100644 index 00000000..627cde71 --- /dev/null +++ b/lib/src/generated/api/key.dart @@ -0,0 +1,170 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; + +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `fmt`, `from`, `from`, `from`, `from` + +class BdkDerivationPath { + final DerivationPath ptr; + + const BdkDerivationPath({ + required this.ptr, + }); + + String asString() => core.instance.api.crateApiKeyBdkDerivationPathAsString( + that: this, + ); + + static Future fromString({required String path}) => + core.instance.api.crateApiKeyBdkDerivationPathFromString(path: path); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkDerivationPath && + runtimeType == other.runtimeType && + ptr == other.ptr; +} + +class BdkDescriptorPublicKey { + final DescriptorPublicKey ptr; + + const BdkDescriptorPublicKey({ + required this.ptr, + }); + + String asString() => + core.instance.api.crateApiKeyBdkDescriptorPublicKeyAsString( + that: this, + ); + + static Future derive( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path}) => + core.instance.api + .crateApiKeyBdkDescriptorPublicKeyDerive(ptr: ptr, path: path); + + static Future extend( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path}) => + core.instance.api + .crateApiKeyBdkDescriptorPublicKeyExtend(ptr: ptr, path: path); + + static Future fromString( + {required String publicKey}) => + core.instance.api + .crateApiKeyBdkDescriptorPublicKeyFromString(publicKey: publicKey); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkDescriptorPublicKey && + runtimeType == other.runtimeType && + ptr == other.ptr; +} + +class BdkDescriptorSecretKey { + final DescriptorSecretKey ptr; + + const BdkDescriptorSecretKey({ + required this.ptr, + }); + + static BdkDescriptorPublicKey asPublic( + {required BdkDescriptorSecretKey ptr}) => + core.instance.api.crateApiKeyBdkDescriptorSecretKeyAsPublic(ptr: ptr); + + String asString() => + core.instance.api.crateApiKeyBdkDescriptorSecretKeyAsString( + that: this, + ); + + static Future create( + {required Network network, + required BdkMnemonic mnemonic, + String? password}) => + core.instance.api.crateApiKeyBdkDescriptorSecretKeyCreate( + network: network, mnemonic: mnemonic, password: password); + + static Future derive( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path}) => + core.instance.api + .crateApiKeyBdkDescriptorSecretKeyDerive(ptr: ptr, path: path); + + static Future extend( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path}) => + core.instance.api + .crateApiKeyBdkDescriptorSecretKeyExtend(ptr: ptr, path: path); + + static Future fromString( + {required String secretKey}) => + core.instance.api + .crateApiKeyBdkDescriptorSecretKeyFromString(secretKey: secretKey); + + /// Get the private key as bytes. + Uint8List secretBytes() => + core.instance.api.crateApiKeyBdkDescriptorSecretKeySecretBytes( + that: this, + ); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkDescriptorSecretKey && + runtimeType == other.runtimeType && + ptr == other.ptr; +} + +class BdkMnemonic { + final Mnemonic ptr; + + const BdkMnemonic({ + required this.ptr, + }); + + String asString() => core.instance.api.crateApiKeyBdkMnemonicAsString( + that: this, + ); + + /// Create a new Mnemonic in the specified language from the given entropy. + /// Entropy must be a multiple of 32 bits (4 bytes) and 128-256 bits in length. + static Future fromEntropy({required List entropy}) => + core.instance.api.crateApiKeyBdkMnemonicFromEntropy(entropy: entropy); + + /// Parse a Mnemonic with given string + static Future fromString({required String mnemonic}) => + core.instance.api.crateApiKeyBdkMnemonicFromString(mnemonic: mnemonic); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + /// Generates Mnemonic with a random entropy + static Future newInstance({required WordCount wordCount}) => + core.instance.api.crateApiKeyBdkMnemonicNew(wordCount: wordCount); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkMnemonic && + runtimeType == other.runtimeType && + ptr == other.ptr; +} diff --git a/lib/src/generated/api/psbt.dart b/lib/src/generated/api/psbt.dart new file mode 100644 index 00000000..2ca20acf --- /dev/null +++ b/lib/src/generated/api/psbt.dart @@ -0,0 +1,77 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; + +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `from` + +class BdkPsbt { + final MutexPartiallySignedTransaction ptr; + + const BdkPsbt({ + required this.ptr, + }); + + String asString() => core.instance.api.crateApiPsbtBdkPsbtAsString( + that: this, + ); + + /// Combines this PartiallySignedTransaction with other PSBT as described by BIP 174. + /// + /// In accordance with BIP 174 this function is commutative i.e., `A.combine(B) == B.combine(A)` + static Future combine( + {required BdkPsbt ptr, required BdkPsbt other}) => + core.instance.api.crateApiPsbtBdkPsbtCombine(ptr: ptr, other: other); + + /// Return the transaction. + static BdkTransaction extractTx({required BdkPsbt ptr}) => + core.instance.api.crateApiPsbtBdkPsbtExtractTx(ptr: ptr); + + /// The total transaction fee amount, sum of input amounts minus sum of output amounts, in Sats. + /// If the PSBT is missing a TxOut for an input returns None. + BigInt? feeAmount() => core.instance.api.crateApiPsbtBdkPsbtFeeAmount( + that: this, + ); + + /// The transaction's fee rate. This value will only be accurate if calculated AFTER the + /// `PartiallySignedTransaction` is finalized and all witness/signature data is added to the + /// transaction. + /// If the PSBT is missing a TxOut for an input returns None. + FeeRate? feeRate() => core.instance.api.crateApiPsbtBdkPsbtFeeRate( + that: this, + ); + + static Future fromStr({required String psbtBase64}) => + core.instance.api.crateApiPsbtBdkPsbtFromStr(psbtBase64: psbtBase64); + + /// Serialize the PSBT data structure as a String of JSON. + String jsonSerialize() => core.instance.api.crateApiPsbtBdkPsbtJsonSerialize( + that: this, + ); + + ///Serialize as raw binary data + Uint8List serialize() => core.instance.api.crateApiPsbtBdkPsbtSerialize( + that: this, + ); + + ///Computes the `Txid`. + /// Hashes the transaction excluding the segwit data (i. e. the marker, flag bytes, and the witness fields themselves). + /// For non-segwit transactions which do not have any segwit data, this will be equal to transaction.wtxid(). + String txid() => core.instance.api.crateApiPsbtBdkPsbtTxid( + that: this, + ); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkPsbt && runtimeType == other.runtimeType && ptr == other.ptr; +} diff --git a/lib/src/generated/api/types.dart b/lib/src/generated/api/types.dart new file mode 100644 index 00000000..1b642cb0 --- /dev/null +++ b/lib/src/generated/api/types.dart @@ -0,0 +1,991 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'types.freezed.dart'; + +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `default`, `default`, `eq`, `eq`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `hash`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from` + +@freezed +sealed class AddressIndex with _$AddressIndex { + const AddressIndex._(); + + ///Return a new address after incrementing the current descriptor index. + const factory AddressIndex.increase() = AddressIndex_Increase; + + ///Return the address for the current descriptor index if it has not been used in a received transaction. Otherwise return a new address as with AddressIndex.New. + ///Use with caution, if the wallet has not yet detected an address has been used it could return an already used address. This function is primarily meant for situations where the caller is untrusted; for example when deriving donation addresses on-demand for a public web page. + const factory AddressIndex.lastUnused() = AddressIndex_LastUnused; + + /// Return the address for a specific descriptor index. Does not change the current descriptor + /// index used by `AddressIndex` and `AddressIndex.LastUsed`. + /// Use with caution, if an index is given that is less than the current descriptor index + /// then the returned address may have already been used. + const factory AddressIndex.peek({ + required int index, + }) = AddressIndex_Peek; + + /// Return the address for a specific descriptor index and reset the current descriptor index + /// used by `AddressIndex` and `AddressIndex.LastUsed` to this value. + /// Use with caution, if an index is given that is less than the current descriptor index + /// then the returned address and subsequent addresses returned by calls to `AddressIndex` + /// and `AddressIndex.LastUsed` may have already been used. Also if the index is reset to a + /// value earlier than the Blockchain stopGap (default is 20) then a + /// larger stopGap should be used to monitor for all possibly used addresses. + const factory AddressIndex.reset({ + required int index, + }) = AddressIndex_Reset; +} + +/// Local Wallet's Balance +class Balance { + final BigInt immature; + + /// Unconfirmed UTXOs generated by a wallet tx + final BigInt trustedPending; + + /// Unconfirmed UTXOs received from an external wallet + final BigInt untrustedPending; + + /// Confirmed and immediately spendable balance + final BigInt confirmed; + + /// Get sum of trusted_pending and confirmed coins + final BigInt spendable; + + /// Get the whole balance visible to the wallet + final BigInt total; + + const Balance({ + required this.immature, + required this.trustedPending, + required this.untrustedPending, + required this.confirmed, + required this.spendable, + required this.total, + }); + + @override + int get hashCode => + immature.hashCode ^ + trustedPending.hashCode ^ + untrustedPending.hashCode ^ + confirmed.hashCode ^ + spendable.hashCode ^ + total.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Balance && + runtimeType == other.runtimeType && + immature == other.immature && + trustedPending == other.trustedPending && + untrustedPending == other.untrustedPending && + confirmed == other.confirmed && + spendable == other.spendable && + total == other.total; +} + +class BdkAddress { + final Address ptr; + + const BdkAddress({ + required this.ptr, + }); + + String asString() => core.instance.api.crateApiTypesBdkAddressAsString( + that: this, + ); + + static Future fromScript( + {required BdkScriptBuf script, required Network network}) => + core.instance.api + .crateApiTypesBdkAddressFromScript(script: script, network: network); + + static Future fromString( + {required String address, required Network network}) => + core.instance.api.crateApiTypesBdkAddressFromString( + address: address, network: network); + + bool isValidForNetwork({required Network network}) => core.instance.api + .crateApiTypesBdkAddressIsValidForNetwork(that: this, network: network); + + Network network() => core.instance.api.crateApiTypesBdkAddressNetwork( + that: this, + ); + + Payload payload() => core.instance.api.crateApiTypesBdkAddressPayload( + that: this, + ); + + static BdkScriptBuf script({required BdkAddress ptr}) => + core.instance.api.crateApiTypesBdkAddressScript(ptr: ptr); + + String toQrUri() => core.instance.api.crateApiTypesBdkAddressToQrUri( + that: this, + ); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkAddress && + runtimeType == other.runtimeType && + ptr == other.ptr; +} + +class BdkPolicy { + final Policy ptr; + + const BdkPolicy({ + required this.ptr, + }); + + String asString() => core.instance.api.crateApiTypesBdkPolicyAsString( + that: this, + ); + + Satisfaction contribution() => + core.instance.api.crateApiTypesBdkPolicyContribution( + that: this, + ); + + String id() => core.instance.api.crateApiTypesBdkPolicyId( + that: this, + ); + + SatisfiableItem item() => core.instance.api.crateApiTypesBdkPolicyItem( + that: this, + ); + + bool requiresPath() => core.instance.api.crateApiTypesBdkPolicyRequiresPath( + that: this, + ); + + Satisfaction satisfaction() => + core.instance.api.crateApiTypesBdkPolicySatisfaction( + that: this, + ); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkPolicy && + runtimeType == other.runtimeType && + ptr == other.ptr; +} + +class BdkScriptBuf { + final Uint8List bytes; + + const BdkScriptBuf({ + required this.bytes, + }); + + String asString() => core.instance.api.crateApiTypesBdkScriptBufAsString( + that: this, + ); + + ///Creates a new empty script. + static BdkScriptBuf empty() => + core.instance.api.crateApiTypesBdkScriptBufEmpty(); + + static Future fromHex({required String s}) => + core.instance.api.crateApiTypesBdkScriptBufFromHex(s: s); + + ///Creates a new empty script with pre-allocated capacity. + static Future withCapacity({required BigInt capacity}) => + core.instance.api + .crateApiTypesBdkScriptBufWithCapacity(capacity: capacity); + + @override + int get hashCode => bytes.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkScriptBuf && + runtimeType == other.runtimeType && + bytes == other.bytes; +} + +class BdkTransaction { + final String s; + + const BdkTransaction({ + required this.s, + }); + + static Future fromBytes( + {required List transactionBytes}) => + core.instance.api.crateApiTypesBdkTransactionFromBytes( + transactionBytes: transactionBytes); + + ///List of transaction inputs. + Future> input() => + core.instance.api.crateApiTypesBdkTransactionInput( + that: this, + ); + + ///Is this a coin base transaction? + Future isCoinBase() => + core.instance.api.crateApiTypesBdkTransactionIsCoinBase( + that: this, + ); + + ///Returns true if the transaction itself opted in to be BIP-125-replaceable (RBF). + /// This does not cover the case where a transaction becomes replaceable due to ancestors being RBF. + Future isExplicitlyRbf() => + core.instance.api.crateApiTypesBdkTransactionIsExplicitlyRbf( + that: this, + ); + + ///Returns true if this transactions nLockTime is enabled (BIP-65 ). + Future isLockTimeEnabled() => + core.instance.api.crateApiTypesBdkTransactionIsLockTimeEnabled( + that: this, + ); + + ///Block height or timestamp. Transaction cannot be included in a block until this height/time. + Future lockTime() => + core.instance.api.crateApiTypesBdkTransactionLockTime( + that: this, + ); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance( + {required int version, + required LockTime lockTime, + required List input, + required List output}) => + core.instance.api.crateApiTypesBdkTransactionNew( + version: version, lockTime: lockTime, input: input, output: output); + + ///List of transaction outputs. + Future> output() => + core.instance.api.crateApiTypesBdkTransactionOutput( + that: this, + ); + + ///Encodes an object into a vector. + Future serialize() => + core.instance.api.crateApiTypesBdkTransactionSerialize( + that: this, + ); + + ///Returns the regular byte-wise consensus-serialized size of this transaction. + Future size() => core.instance.api.crateApiTypesBdkTransactionSize( + that: this, + ); + + ///Computes the txid. For non-segwit transactions this will be identical to the output of wtxid(), + /// but for segwit transactions, this will give the correct txid (not including witnesses) while wtxid will also hash witnesses. + Future txid() => core.instance.api.crateApiTypesBdkTransactionTxid( + that: this, + ); + + ///The protocol version, is currently expected to be 1 or 2 (BIP 68). + Future version() => core.instance.api.crateApiTypesBdkTransactionVersion( + that: this, + ); + + ///Returns the “virtual size†(vsize) of this transaction. + /// + Future vsize() => core.instance.api.crateApiTypesBdkTransactionVsize( + that: this, + ); + + ///Returns the regular byte-wise consensus-serialized size of this transaction. + Future weight() => + core.instance.api.crateApiTypesBdkTransactionWeight( + that: this, + ); + + @override + int get hashCode => s.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkTransaction && + runtimeType == other.runtimeType && + s == other.s; +} + +///Block height and timestamp of a block +class BlockTime { + ///Confirmation block height + final int height; + + ///Confirmation block timestamp + final BigInt timestamp; + + const BlockTime({ + required this.height, + required this.timestamp, + }); + + @override + int get hashCode => height.hashCode ^ timestamp.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BlockTime && + runtimeType == other.runtimeType && + height == other.height && + timestamp == other.timestamp; +} + +enum ChangeSpendPolicy { + changeAllowed, + onlyChange, + changeForbidden, + ; +} + +class Condition { + final int? csv; + final LockTime? timelock; + + const Condition({ + this.csv, + this.timelock, + }); + + @override + int get hashCode => csv.hashCode ^ timelock.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Condition && + runtimeType == other.runtimeType && + csv == other.csv && + timelock == other.timelock; +} + +@freezed +sealed class DatabaseConfig with _$DatabaseConfig { + const DatabaseConfig._(); + + const factory DatabaseConfig.memory() = DatabaseConfig_Memory; + + ///Simple key-value embedded database based on sled + const factory DatabaseConfig.sqlite({ + required SqliteDbConfiguration config, + }) = DatabaseConfig_Sqlite; + + ///Sqlite embedded database using rusqlite + const factory DatabaseConfig.sled({ + required SledDbConfiguration config, + }) = DatabaseConfig_Sled; +} + +class FeeRate { + final double satPerVb; + + const FeeRate({ + required this.satPerVb, + }); + + @override + int get hashCode => satPerVb.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FeeRate && + runtimeType == other.runtimeType && + satPerVb == other.satPerVb; +} + +/// A key-value map for an input of the corresponding index in the unsigned +class Input { + final String s; + + const Input({ + required this.s, + }); + + @override + int get hashCode => s.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Input && runtimeType == other.runtimeType && s == other.s; +} + +///Types of keychains +enum KeychainKind { + externalChain, + + ///Internal, usually used for change outputs + internalChain, + ; +} + +///Unspent outputs of this wallet +class LocalUtxo { + final OutPoint outpoint; + final TxOut txout; + final KeychainKind keychain; + final bool isSpent; + + const LocalUtxo({ + required this.outpoint, + required this.txout, + required this.keychain, + required this.isSpent, + }); + + @override + int get hashCode => + outpoint.hashCode ^ txout.hashCode ^ keychain.hashCode ^ isSpent.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LocalUtxo && + runtimeType == other.runtimeType && + outpoint == other.outpoint && + txout == other.txout && + keychain == other.keychain && + isSpent == other.isSpent; +} + +@freezed +sealed class LockTime with _$LockTime { + const LockTime._(); + + const factory LockTime.blocks( + int field0, + ) = LockTime_Blocks; + const factory LockTime.seconds( + int field0, + ) = LockTime_Seconds; +} + +///The cryptocurrency to act on +enum Network { + ///Bitcoin’s testnet + testnet, + + ///Bitcoin’s regtest + regtest, + + ///Classic Bitcoin + bitcoin, + + ///Bitcoin’s signet + signet, + ; +} + +/// A reference to a transaction output. +class OutPoint { + /// The referenced transaction's txid. + final String txid; + + /// The index of the referenced output in its transaction's vout. + final int vout; + + const OutPoint({ + required this.txid, + required this.vout, + }); + + @override + int get hashCode => txid.hashCode ^ vout.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is OutPoint && + runtimeType == other.runtimeType && + txid == other.txid && + vout == other.vout; +} + +@freezed +sealed class Payload with _$Payload { + const Payload._(); + + /// P2PKH address. + const factory Payload.pubkeyHash({ + required String pubkeyHash, + }) = Payload_PubkeyHash; + + /// P2SH address. + const factory Payload.scriptHash({ + required String scriptHash, + }) = Payload_ScriptHash; + + /// Segwit address. + const factory Payload.witnessProgram({ + /// The witness program version. + required WitnessVersion version, + + /// The witness program. + required Uint8List program, + }) = Payload_WitnessProgram; +} + +@freezed +sealed class PkOrF with _$PkOrF { + const PkOrF._(); + + const factory PkOrF.pubkey({ + required String value, + }) = PkOrF_Pubkey; + const factory PkOrF.xOnlyPubkey({ + required String value, + }) = PkOrF_XOnlyPubkey; + const factory PkOrF.fingerprint({ + required String value, + }) = PkOrF_Fingerprint; +} + +class PsbtSigHashType { + final int inner; + + const PsbtSigHashType({ + required this.inner, + }); + + @override + int get hashCode => inner.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PsbtSigHashType && + runtimeType == other.runtimeType && + inner == other.inner; +} + +@freezed +sealed class RbfValue with _$RbfValue { + const RbfValue._(); + + const factory RbfValue.rbfDefault() = RbfValue_RbfDefault; + const factory RbfValue.value( + int field0, + ) = RbfValue_Value; +} + +@freezed +sealed class Satisfaction with _$Satisfaction { + const Satisfaction._(); + + const factory Satisfaction.partial({ + required BigInt n, + required BigInt m, + required Uint64List items, + bool? sorted, + required Map> conditions, + }) = Satisfaction_Partial; + const factory Satisfaction.partialComplete({ + required BigInt n, + required BigInt m, + required Uint64List items, + bool? sorted, + required Map> conditions, + }) = Satisfaction_PartialComplete; + const factory Satisfaction.complete({ + required Condition condition, + }) = Satisfaction_Complete; + const factory Satisfaction.none({ + required String msg, + }) = Satisfaction_None; +} + +@freezed +sealed class SatisfiableItem with _$SatisfiableItem { + const SatisfiableItem._(); + + const factory SatisfiableItem.ecdsaSignature({ + required PkOrF key, + }) = SatisfiableItem_EcdsaSignature; + const factory SatisfiableItem.schnorrSignature({ + required PkOrF key, + }) = SatisfiableItem_SchnorrSignature; + const factory SatisfiableItem.sha256Preimage({ + required String hash, + }) = SatisfiableItem_Sha256Preimage; + const factory SatisfiableItem.hash256Preimage({ + required String hash, + }) = SatisfiableItem_Hash256Preimage; + const factory SatisfiableItem.ripemd160Preimage({ + required String hash, + }) = SatisfiableItem_Ripemd160Preimage; + const factory SatisfiableItem.hash160Preimage({ + required String hash, + }) = SatisfiableItem_Hash160Preimage; + const factory SatisfiableItem.absoluteTimelock({ + required LockTime value, + }) = SatisfiableItem_AbsoluteTimelock; + const factory SatisfiableItem.relativeTimelock({ + required int value, + }) = SatisfiableItem_RelativeTimelock; + const factory SatisfiableItem.multisig({ + required List keys, + required BigInt threshold, + }) = SatisfiableItem_Multisig; + const factory SatisfiableItem.thresh({ + required List items, + required BigInt threshold, + }) = SatisfiableItem_Thresh; +} + +/// A output script and an amount of satoshis. +class ScriptAmount { + final BdkScriptBuf script; + final BigInt amount; + + const ScriptAmount({ + required this.script, + required this.amount, + }); + + @override + int get hashCode => script.hashCode ^ amount.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ScriptAmount && + runtimeType == other.runtimeType && + script == other.script && + amount == other.amount; +} + +/// Options for a software signer +/// +/// Adjust the behavior of our software signers and the way a transaction is finalized +class SignOptions { + /// Whether the signer should trust the `witness_utxo`, if the `non_witness_utxo` hasn't been + /// provided + /// + /// Defaults to `false` to mitigate the "SegWit bug" which should trick the wallet into + /// paying a fee larger than expected. + /// + /// Some wallets, especially if relatively old, might not provide the `non_witness_utxo` for + /// SegWit transactions in the PSBT they generate: in those cases setting this to `true` + /// should correctly produce a signature, at the expense of an increased trust in the creator + /// of the PSBT. + /// + /// For more details see: + final bool trustWitnessUtxo; + + /// Whether the wallet should assume a specific height has been reached when trying to finalize + /// a transaction + /// + /// The wallet will only "use" a timelock to satisfy the spending policy of an input if the + /// timelock height has already been reached. This option allows overriding the "current height" to let the + /// wallet use timelocks in the future to spend a coin. + final int? assumeHeight; + + /// Whether the signer should use the `sighash_type` set in the PSBT when signing, no matter + /// what its value is + /// + /// Defaults to `false` which will only allow signing using `SIGHASH_ALL`. + final bool allowAllSighashes; + + /// Whether to remove partial signatures from the PSBT inputs while finalizing PSBT. + /// + /// Defaults to `true` which will remove partial signatures during finalization. + final bool removePartialSigs; + + /// Whether to try finalizing the PSBT after the inputs are signed. + /// + /// Defaults to `true` which will try finalizing PSBT after inputs are signed. + final bool tryFinalize; + + /// Whether we should try to sign a taproot transaction with the taproot internal key + /// or not. This option is ignored if we're signing a non-taproot PSBT. + /// + /// Defaults to `true`, i.e., we always try to sign with the taproot internal key. + final bool signWithTapInternalKey; + + /// Whether we should grind ECDSA signature to ensure signing with low r + /// or not. + /// Defaults to `true`, i.e., we always grind ECDSA signature to sign with low r. + final bool allowGrinding; + + const SignOptions({ + required this.trustWitnessUtxo, + this.assumeHeight, + required this.allowAllSighashes, + required this.removePartialSigs, + required this.tryFinalize, + required this.signWithTapInternalKey, + required this.allowGrinding, + }); + + @override + int get hashCode => + trustWitnessUtxo.hashCode ^ + assumeHeight.hashCode ^ + allowAllSighashes.hashCode ^ + removePartialSigs.hashCode ^ + tryFinalize.hashCode ^ + signWithTapInternalKey.hashCode ^ + allowGrinding.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SignOptions && + runtimeType == other.runtimeType && + trustWitnessUtxo == other.trustWitnessUtxo && + assumeHeight == other.assumeHeight && + allowAllSighashes == other.allowAllSighashes && + removePartialSigs == other.removePartialSigs && + tryFinalize == other.tryFinalize && + signWithTapInternalKey == other.signWithTapInternalKey && + allowGrinding == other.allowGrinding; +} + +///Configuration type for a sled Tree database +class SledDbConfiguration { + ///Main directory of the db + final String path; + + ///Name of the database tree, a separated namespace for the data + final String treeName; + + const SledDbConfiguration({ + required this.path, + required this.treeName, + }); + + @override + int get hashCode => path.hashCode ^ treeName.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SledDbConfiguration && + runtimeType == other.runtimeType && + path == other.path && + treeName == other.treeName; +} + +///Configuration type for a SqliteDatabase database +class SqliteDbConfiguration { + ///Main directory of the db + final String path; + + const SqliteDbConfiguration({ + required this.path, + }); + + @override + int get hashCode => path.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SqliteDbConfiguration && + runtimeType == other.runtimeType && + path == other.path; +} + +///A wallet transaction +class TransactionDetails { + final BdkTransaction? transaction; + + /// Transaction id. + final String txid; + + /// Received value (sats) + /// Sum of owned outputs of this transaction. + final BigInt received; + + /// Sent value (sats) + /// Sum of owned inputs of this transaction. + final BigInt sent; + + /// Fee value (sats) if confirmed. + /// The availability of the fee depends on the backend. It's never None with an Electrum + /// Server backend, but it could be None with a Bitcoin RPC node without txindex that receive + /// funds while offline. + final BigInt? fee; + + /// If the transaction is confirmed, contains height and timestamp of the block containing the + /// transaction, unconfirmed transaction contains `None`. + final BlockTime? confirmationTime; + + const TransactionDetails({ + this.transaction, + required this.txid, + required this.received, + required this.sent, + this.fee, + this.confirmationTime, + }); + + @override + int get hashCode => + transaction.hashCode ^ + txid.hashCode ^ + received.hashCode ^ + sent.hashCode ^ + fee.hashCode ^ + confirmationTime.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is TransactionDetails && + runtimeType == other.runtimeType && + transaction == other.transaction && + txid == other.txid && + received == other.received && + sent == other.sent && + fee == other.fee && + confirmationTime == other.confirmationTime; +} + +class TxIn { + final OutPoint previousOutput; + final BdkScriptBuf scriptSig; + final int sequence; + final List witness; + + const TxIn({ + required this.previousOutput, + required this.scriptSig, + required this.sequence, + required this.witness, + }); + + @override + int get hashCode => + previousOutput.hashCode ^ + scriptSig.hashCode ^ + sequence.hashCode ^ + witness.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is TxIn && + runtimeType == other.runtimeType && + previousOutput == other.previousOutput && + scriptSig == other.scriptSig && + sequence == other.sequence && + witness == other.witness; +} + +///A transaction output, which defines new coins to be created from old ones. +class TxOut { + /// The value of the output, in satoshis. + final BigInt value; + + /// The address of the output. + final BdkScriptBuf scriptPubkey; + + const TxOut({ + required this.value, + required this.scriptPubkey, + }); + + @override + int get hashCode => value.hashCode ^ scriptPubkey.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is TxOut && + runtimeType == other.runtimeType && + value == other.value && + scriptPubkey == other.scriptPubkey; +} + +enum Variant { + bech32, + bech32M, + ; +} + +enum WitnessVersion { + /// Initial version of witness program. Used for P2WPKH and P2WPK outputs + v0, + + /// Version of witness program used for Taproot P2TR outputs. + v1, + + /// Future (unsupported) version of witness program. + v2, + + /// Future (unsupported) version of witness program. + v3, + + /// Future (unsupported) version of witness program. + v4, + + /// Future (unsupported) version of witness program. + v5, + + /// Future (unsupported) version of witness program. + v6, + + /// Future (unsupported) version of witness program. + v7, + + /// Future (unsupported) version of witness program. + v8, + + /// Future (unsupported) version of witness program. + v9, + + /// Future (unsupported) version of witness program. + v10, + + /// Future (unsupported) version of witness program. + v11, + + /// Future (unsupported) version of witness program. + v12, + + /// Future (unsupported) version of witness program. + v13, + + /// Future (unsupported) version of witness program. + v14, + + /// Future (unsupported) version of witness program. + v15, + + /// Future (unsupported) version of witness program. + v16, + ; +} + +///Type describing entropy length (aka word count) in the mnemonic +enum WordCount { + ///12 words mnemonic (128 bits entropy) + words12, + + ///18 words mnemonic (192 bits entropy) + words18, + + ///24 words mnemonic (256 bits entropy) + words24, + ; +} diff --git a/lib/src/generated/api/types.freezed.dart b/lib/src/generated/api/types.freezed.dart new file mode 100644 index 00000000..fee5cdaf --- /dev/null +++ b/lib/src/generated/api/types.freezed.dart @@ -0,0 +1,5830 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'types.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$AddressIndex { + @optionalTypeArgs + TResult when({ + required TResult Function() increase, + required TResult Function() lastUnused, + required TResult Function(int index) peek, + required TResult Function(int index) reset, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? increase, + TResult? Function()? lastUnused, + TResult? Function(int index)? peek, + TResult? Function(int index)? reset, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? increase, + TResult Function()? lastUnused, + TResult Function(int index)? peek, + TResult Function(int index)? reset, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(AddressIndex_Increase value) increase, + required TResult Function(AddressIndex_LastUnused value) lastUnused, + required TResult Function(AddressIndex_Peek value) peek, + required TResult Function(AddressIndex_Reset value) reset, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressIndex_Increase value)? increase, + TResult? Function(AddressIndex_LastUnused value)? lastUnused, + TResult? Function(AddressIndex_Peek value)? peek, + TResult? Function(AddressIndex_Reset value)? reset, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressIndex_Increase value)? increase, + TResult Function(AddressIndex_LastUnused value)? lastUnused, + TResult Function(AddressIndex_Peek value)? peek, + TResult Function(AddressIndex_Reset value)? reset, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $AddressIndexCopyWith<$Res> { + factory $AddressIndexCopyWith( + AddressIndex value, $Res Function(AddressIndex) then) = + _$AddressIndexCopyWithImpl<$Res, AddressIndex>; +} + +/// @nodoc +class _$AddressIndexCopyWithImpl<$Res, $Val extends AddressIndex> + implements $AddressIndexCopyWith<$Res> { + _$AddressIndexCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$AddressIndex_IncreaseImplCopyWith<$Res> { + factory _$$AddressIndex_IncreaseImplCopyWith( + _$AddressIndex_IncreaseImpl value, + $Res Function(_$AddressIndex_IncreaseImpl) then) = + __$$AddressIndex_IncreaseImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$AddressIndex_IncreaseImplCopyWithImpl<$Res> + extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_IncreaseImpl> + implements _$$AddressIndex_IncreaseImplCopyWith<$Res> { + __$$AddressIndex_IncreaseImplCopyWithImpl(_$AddressIndex_IncreaseImpl _value, + $Res Function(_$AddressIndex_IncreaseImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$AddressIndex_IncreaseImpl extends AddressIndex_Increase { + const _$AddressIndex_IncreaseImpl() : super._(); + + @override + String toString() { + return 'AddressIndex.increase()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressIndex_IncreaseImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() increase, + required TResult Function() lastUnused, + required TResult Function(int index) peek, + required TResult Function(int index) reset, + }) { + return increase(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? increase, + TResult? Function()? lastUnused, + TResult? Function(int index)? peek, + TResult? Function(int index)? reset, + }) { + return increase?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? increase, + TResult Function()? lastUnused, + TResult Function(int index)? peek, + TResult Function(int index)? reset, + required TResult orElse(), + }) { + if (increase != null) { + return increase(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressIndex_Increase value) increase, + required TResult Function(AddressIndex_LastUnused value) lastUnused, + required TResult Function(AddressIndex_Peek value) peek, + required TResult Function(AddressIndex_Reset value) reset, + }) { + return increase(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressIndex_Increase value)? increase, + TResult? Function(AddressIndex_LastUnused value)? lastUnused, + TResult? Function(AddressIndex_Peek value)? peek, + TResult? Function(AddressIndex_Reset value)? reset, + }) { + return increase?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressIndex_Increase value)? increase, + TResult Function(AddressIndex_LastUnused value)? lastUnused, + TResult Function(AddressIndex_Peek value)? peek, + TResult Function(AddressIndex_Reset value)? reset, + required TResult orElse(), + }) { + if (increase != null) { + return increase(this); + } + return orElse(); + } +} + +abstract class AddressIndex_Increase extends AddressIndex { + const factory AddressIndex_Increase() = _$AddressIndex_IncreaseImpl; + const AddressIndex_Increase._() : super._(); +} + +/// @nodoc +abstract class _$$AddressIndex_LastUnusedImplCopyWith<$Res> { + factory _$$AddressIndex_LastUnusedImplCopyWith( + _$AddressIndex_LastUnusedImpl value, + $Res Function(_$AddressIndex_LastUnusedImpl) then) = + __$$AddressIndex_LastUnusedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$AddressIndex_LastUnusedImplCopyWithImpl<$Res> + extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_LastUnusedImpl> + implements _$$AddressIndex_LastUnusedImplCopyWith<$Res> { + __$$AddressIndex_LastUnusedImplCopyWithImpl( + _$AddressIndex_LastUnusedImpl _value, + $Res Function(_$AddressIndex_LastUnusedImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$AddressIndex_LastUnusedImpl extends AddressIndex_LastUnused { + const _$AddressIndex_LastUnusedImpl() : super._(); + + @override + String toString() { + return 'AddressIndex.lastUnused()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressIndex_LastUnusedImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() increase, + required TResult Function() lastUnused, + required TResult Function(int index) peek, + required TResult Function(int index) reset, + }) { + return lastUnused(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? increase, + TResult? Function()? lastUnused, + TResult? Function(int index)? peek, + TResult? Function(int index)? reset, + }) { + return lastUnused?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? increase, + TResult Function()? lastUnused, + TResult Function(int index)? peek, + TResult Function(int index)? reset, + required TResult orElse(), + }) { + if (lastUnused != null) { + return lastUnused(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressIndex_Increase value) increase, + required TResult Function(AddressIndex_LastUnused value) lastUnused, + required TResult Function(AddressIndex_Peek value) peek, + required TResult Function(AddressIndex_Reset value) reset, + }) { + return lastUnused(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressIndex_Increase value)? increase, + TResult? Function(AddressIndex_LastUnused value)? lastUnused, + TResult? Function(AddressIndex_Peek value)? peek, + TResult? Function(AddressIndex_Reset value)? reset, + }) { + return lastUnused?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressIndex_Increase value)? increase, + TResult Function(AddressIndex_LastUnused value)? lastUnused, + TResult Function(AddressIndex_Peek value)? peek, + TResult Function(AddressIndex_Reset value)? reset, + required TResult orElse(), + }) { + if (lastUnused != null) { + return lastUnused(this); + } + return orElse(); + } +} + +abstract class AddressIndex_LastUnused extends AddressIndex { + const factory AddressIndex_LastUnused() = _$AddressIndex_LastUnusedImpl; + const AddressIndex_LastUnused._() : super._(); +} + +/// @nodoc +abstract class _$$AddressIndex_PeekImplCopyWith<$Res> { + factory _$$AddressIndex_PeekImplCopyWith(_$AddressIndex_PeekImpl value, + $Res Function(_$AddressIndex_PeekImpl) then) = + __$$AddressIndex_PeekImplCopyWithImpl<$Res>; + @useResult + $Res call({int index}); +} + +/// @nodoc +class __$$AddressIndex_PeekImplCopyWithImpl<$Res> + extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_PeekImpl> + implements _$$AddressIndex_PeekImplCopyWith<$Res> { + __$$AddressIndex_PeekImplCopyWithImpl(_$AddressIndex_PeekImpl _value, + $Res Function(_$AddressIndex_PeekImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? index = null, + }) { + return _then(_$AddressIndex_PeekImpl( + index: null == index + ? _value.index + : index // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$AddressIndex_PeekImpl extends AddressIndex_Peek { + const _$AddressIndex_PeekImpl({required this.index}) : super._(); + + @override + final int index; + + @override + String toString() { + return 'AddressIndex.peek(index: $index)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressIndex_PeekImpl && + (identical(other.index, index) || other.index == index)); + } + + @override + int get hashCode => Object.hash(runtimeType, index); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressIndex_PeekImplCopyWith<_$AddressIndex_PeekImpl> get copyWith => + __$$AddressIndex_PeekImplCopyWithImpl<_$AddressIndex_PeekImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() increase, + required TResult Function() lastUnused, + required TResult Function(int index) peek, + required TResult Function(int index) reset, + }) { + return peek(index); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? increase, + TResult? Function()? lastUnused, + TResult? Function(int index)? peek, + TResult? Function(int index)? reset, + }) { + return peek?.call(index); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? increase, + TResult Function()? lastUnused, + TResult Function(int index)? peek, + TResult Function(int index)? reset, + required TResult orElse(), + }) { + if (peek != null) { + return peek(index); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressIndex_Increase value) increase, + required TResult Function(AddressIndex_LastUnused value) lastUnused, + required TResult Function(AddressIndex_Peek value) peek, + required TResult Function(AddressIndex_Reset value) reset, + }) { + return peek(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressIndex_Increase value)? increase, + TResult? Function(AddressIndex_LastUnused value)? lastUnused, + TResult? Function(AddressIndex_Peek value)? peek, + TResult? Function(AddressIndex_Reset value)? reset, + }) { + return peek?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressIndex_Increase value)? increase, + TResult Function(AddressIndex_LastUnused value)? lastUnused, + TResult Function(AddressIndex_Peek value)? peek, + TResult Function(AddressIndex_Reset value)? reset, + required TResult orElse(), + }) { + if (peek != null) { + return peek(this); + } + return orElse(); + } +} + +abstract class AddressIndex_Peek extends AddressIndex { + const factory AddressIndex_Peek({required final int index}) = + _$AddressIndex_PeekImpl; + const AddressIndex_Peek._() : super._(); + + int get index; + @JsonKey(ignore: true) + _$$AddressIndex_PeekImplCopyWith<_$AddressIndex_PeekImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AddressIndex_ResetImplCopyWith<$Res> { + factory _$$AddressIndex_ResetImplCopyWith(_$AddressIndex_ResetImpl value, + $Res Function(_$AddressIndex_ResetImpl) then) = + __$$AddressIndex_ResetImplCopyWithImpl<$Res>; + @useResult + $Res call({int index}); +} + +/// @nodoc +class __$$AddressIndex_ResetImplCopyWithImpl<$Res> + extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_ResetImpl> + implements _$$AddressIndex_ResetImplCopyWith<$Res> { + __$$AddressIndex_ResetImplCopyWithImpl(_$AddressIndex_ResetImpl _value, + $Res Function(_$AddressIndex_ResetImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? index = null, + }) { + return _then(_$AddressIndex_ResetImpl( + index: null == index + ? _value.index + : index // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$AddressIndex_ResetImpl extends AddressIndex_Reset { + const _$AddressIndex_ResetImpl({required this.index}) : super._(); + + @override + final int index; + + @override + String toString() { + return 'AddressIndex.reset(index: $index)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressIndex_ResetImpl && + (identical(other.index, index) || other.index == index)); + } + + @override + int get hashCode => Object.hash(runtimeType, index); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressIndex_ResetImplCopyWith<_$AddressIndex_ResetImpl> get copyWith => + __$$AddressIndex_ResetImplCopyWithImpl<_$AddressIndex_ResetImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() increase, + required TResult Function() lastUnused, + required TResult Function(int index) peek, + required TResult Function(int index) reset, + }) { + return reset(index); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? increase, + TResult? Function()? lastUnused, + TResult? Function(int index)? peek, + TResult? Function(int index)? reset, + }) { + return reset?.call(index); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? increase, + TResult Function()? lastUnused, + TResult Function(int index)? peek, + TResult Function(int index)? reset, + required TResult orElse(), + }) { + if (reset != null) { + return reset(index); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AddressIndex_Increase value) increase, + required TResult Function(AddressIndex_LastUnused value) lastUnused, + required TResult Function(AddressIndex_Peek value) peek, + required TResult Function(AddressIndex_Reset value) reset, + }) { + return reset(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AddressIndex_Increase value)? increase, + TResult? Function(AddressIndex_LastUnused value)? lastUnused, + TResult? Function(AddressIndex_Peek value)? peek, + TResult? Function(AddressIndex_Reset value)? reset, + }) { + return reset?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AddressIndex_Increase value)? increase, + TResult Function(AddressIndex_LastUnused value)? lastUnused, + TResult Function(AddressIndex_Peek value)? peek, + TResult Function(AddressIndex_Reset value)? reset, + required TResult orElse(), + }) { + if (reset != null) { + return reset(this); + } + return orElse(); + } +} + +abstract class AddressIndex_Reset extends AddressIndex { + const factory AddressIndex_Reset({required final int index}) = + _$AddressIndex_ResetImpl; + const AddressIndex_Reset._() : super._(); + + int get index; + @JsonKey(ignore: true) + _$$AddressIndex_ResetImplCopyWith<_$AddressIndex_ResetImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$DatabaseConfig { + @optionalTypeArgs + TResult when({ + required TResult Function() memory, + required TResult Function(SqliteDbConfiguration config) sqlite, + required TResult Function(SledDbConfiguration config) sled, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? memory, + TResult? Function(SqliteDbConfiguration config)? sqlite, + TResult? Function(SledDbConfiguration config)? sled, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? memory, + TResult Function(SqliteDbConfiguration config)? sqlite, + TResult Function(SledDbConfiguration config)? sled, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(DatabaseConfig_Memory value) memory, + required TResult Function(DatabaseConfig_Sqlite value) sqlite, + required TResult Function(DatabaseConfig_Sled value) sled, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DatabaseConfig_Memory value)? memory, + TResult? Function(DatabaseConfig_Sqlite value)? sqlite, + TResult? Function(DatabaseConfig_Sled value)? sled, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DatabaseConfig_Memory value)? memory, + TResult Function(DatabaseConfig_Sqlite value)? sqlite, + TResult Function(DatabaseConfig_Sled value)? sled, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $DatabaseConfigCopyWith<$Res> { + factory $DatabaseConfigCopyWith( + DatabaseConfig value, $Res Function(DatabaseConfig) then) = + _$DatabaseConfigCopyWithImpl<$Res, DatabaseConfig>; +} + +/// @nodoc +class _$DatabaseConfigCopyWithImpl<$Res, $Val extends DatabaseConfig> + implements $DatabaseConfigCopyWith<$Res> { + _$DatabaseConfigCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$DatabaseConfig_MemoryImplCopyWith<$Res> { + factory _$$DatabaseConfig_MemoryImplCopyWith( + _$DatabaseConfig_MemoryImpl value, + $Res Function(_$DatabaseConfig_MemoryImpl) then) = + __$$DatabaseConfig_MemoryImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$DatabaseConfig_MemoryImplCopyWithImpl<$Res> + extends _$DatabaseConfigCopyWithImpl<$Res, _$DatabaseConfig_MemoryImpl> + implements _$$DatabaseConfig_MemoryImplCopyWith<$Res> { + __$$DatabaseConfig_MemoryImplCopyWithImpl(_$DatabaseConfig_MemoryImpl _value, + $Res Function(_$DatabaseConfig_MemoryImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$DatabaseConfig_MemoryImpl extends DatabaseConfig_Memory { + const _$DatabaseConfig_MemoryImpl() : super._(); + + @override + String toString() { + return 'DatabaseConfig.memory()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DatabaseConfig_MemoryImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() memory, + required TResult Function(SqliteDbConfiguration config) sqlite, + required TResult Function(SledDbConfiguration config) sled, + }) { + return memory(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? memory, + TResult? Function(SqliteDbConfiguration config)? sqlite, + TResult? Function(SledDbConfiguration config)? sled, + }) { + return memory?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? memory, + TResult Function(SqliteDbConfiguration config)? sqlite, + TResult Function(SledDbConfiguration config)? sled, + required TResult orElse(), + }) { + if (memory != null) { + return memory(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DatabaseConfig_Memory value) memory, + required TResult Function(DatabaseConfig_Sqlite value) sqlite, + required TResult Function(DatabaseConfig_Sled value) sled, + }) { + return memory(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DatabaseConfig_Memory value)? memory, + TResult? Function(DatabaseConfig_Sqlite value)? sqlite, + TResult? Function(DatabaseConfig_Sled value)? sled, + }) { + return memory?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DatabaseConfig_Memory value)? memory, + TResult Function(DatabaseConfig_Sqlite value)? sqlite, + TResult Function(DatabaseConfig_Sled value)? sled, + required TResult orElse(), + }) { + if (memory != null) { + return memory(this); + } + return orElse(); + } +} + +abstract class DatabaseConfig_Memory extends DatabaseConfig { + const factory DatabaseConfig_Memory() = _$DatabaseConfig_MemoryImpl; + const DatabaseConfig_Memory._() : super._(); +} + +/// @nodoc +abstract class _$$DatabaseConfig_SqliteImplCopyWith<$Res> { + factory _$$DatabaseConfig_SqliteImplCopyWith( + _$DatabaseConfig_SqliteImpl value, + $Res Function(_$DatabaseConfig_SqliteImpl) then) = + __$$DatabaseConfig_SqliteImplCopyWithImpl<$Res>; + @useResult + $Res call({SqliteDbConfiguration config}); +} + +/// @nodoc +class __$$DatabaseConfig_SqliteImplCopyWithImpl<$Res> + extends _$DatabaseConfigCopyWithImpl<$Res, _$DatabaseConfig_SqliteImpl> + implements _$$DatabaseConfig_SqliteImplCopyWith<$Res> { + __$$DatabaseConfig_SqliteImplCopyWithImpl(_$DatabaseConfig_SqliteImpl _value, + $Res Function(_$DatabaseConfig_SqliteImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? config = null, + }) { + return _then(_$DatabaseConfig_SqliteImpl( + config: null == config + ? _value.config + : config // ignore: cast_nullable_to_non_nullable + as SqliteDbConfiguration, + )); + } +} + +/// @nodoc + +class _$DatabaseConfig_SqliteImpl extends DatabaseConfig_Sqlite { + const _$DatabaseConfig_SqliteImpl({required this.config}) : super._(); + + @override + final SqliteDbConfiguration config; + + @override + String toString() { + return 'DatabaseConfig.sqlite(config: $config)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DatabaseConfig_SqliteImpl && + (identical(other.config, config) || other.config == config)); + } + + @override + int get hashCode => Object.hash(runtimeType, config); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DatabaseConfig_SqliteImplCopyWith<_$DatabaseConfig_SqliteImpl> + get copyWith => __$$DatabaseConfig_SqliteImplCopyWithImpl< + _$DatabaseConfig_SqliteImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() memory, + required TResult Function(SqliteDbConfiguration config) sqlite, + required TResult Function(SledDbConfiguration config) sled, + }) { + return sqlite(config); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? memory, + TResult? Function(SqliteDbConfiguration config)? sqlite, + TResult? Function(SledDbConfiguration config)? sled, + }) { + return sqlite?.call(config); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? memory, + TResult Function(SqliteDbConfiguration config)? sqlite, + TResult Function(SledDbConfiguration config)? sled, + required TResult orElse(), + }) { + if (sqlite != null) { + return sqlite(config); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DatabaseConfig_Memory value) memory, + required TResult Function(DatabaseConfig_Sqlite value) sqlite, + required TResult Function(DatabaseConfig_Sled value) sled, + }) { + return sqlite(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DatabaseConfig_Memory value)? memory, + TResult? Function(DatabaseConfig_Sqlite value)? sqlite, + TResult? Function(DatabaseConfig_Sled value)? sled, + }) { + return sqlite?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DatabaseConfig_Memory value)? memory, + TResult Function(DatabaseConfig_Sqlite value)? sqlite, + TResult Function(DatabaseConfig_Sled value)? sled, + required TResult orElse(), + }) { + if (sqlite != null) { + return sqlite(this); + } + return orElse(); + } +} + +abstract class DatabaseConfig_Sqlite extends DatabaseConfig { + const factory DatabaseConfig_Sqlite( + {required final SqliteDbConfiguration config}) = + _$DatabaseConfig_SqliteImpl; + const DatabaseConfig_Sqlite._() : super._(); + + SqliteDbConfiguration get config; + @JsonKey(ignore: true) + _$$DatabaseConfig_SqliteImplCopyWith<_$DatabaseConfig_SqliteImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$DatabaseConfig_SledImplCopyWith<$Res> { + factory _$$DatabaseConfig_SledImplCopyWith(_$DatabaseConfig_SledImpl value, + $Res Function(_$DatabaseConfig_SledImpl) then) = + __$$DatabaseConfig_SledImplCopyWithImpl<$Res>; + @useResult + $Res call({SledDbConfiguration config}); +} + +/// @nodoc +class __$$DatabaseConfig_SledImplCopyWithImpl<$Res> + extends _$DatabaseConfigCopyWithImpl<$Res, _$DatabaseConfig_SledImpl> + implements _$$DatabaseConfig_SledImplCopyWith<$Res> { + __$$DatabaseConfig_SledImplCopyWithImpl(_$DatabaseConfig_SledImpl _value, + $Res Function(_$DatabaseConfig_SledImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? config = null, + }) { + return _then(_$DatabaseConfig_SledImpl( + config: null == config + ? _value.config + : config // ignore: cast_nullable_to_non_nullable + as SledDbConfiguration, + )); + } +} + +/// @nodoc + +class _$DatabaseConfig_SledImpl extends DatabaseConfig_Sled { + const _$DatabaseConfig_SledImpl({required this.config}) : super._(); + + @override + final SledDbConfiguration config; + + @override + String toString() { + return 'DatabaseConfig.sled(config: $config)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DatabaseConfig_SledImpl && + (identical(other.config, config) || other.config == config)); + } + + @override + int get hashCode => Object.hash(runtimeType, config); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DatabaseConfig_SledImplCopyWith<_$DatabaseConfig_SledImpl> get copyWith => + __$$DatabaseConfig_SledImplCopyWithImpl<_$DatabaseConfig_SledImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() memory, + required TResult Function(SqliteDbConfiguration config) sqlite, + required TResult Function(SledDbConfiguration config) sled, + }) { + return sled(config); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? memory, + TResult? Function(SqliteDbConfiguration config)? sqlite, + TResult? Function(SledDbConfiguration config)? sled, + }) { + return sled?.call(config); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? memory, + TResult Function(SqliteDbConfiguration config)? sqlite, + TResult Function(SledDbConfiguration config)? sled, + required TResult orElse(), + }) { + if (sled != null) { + return sled(config); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DatabaseConfig_Memory value) memory, + required TResult Function(DatabaseConfig_Sqlite value) sqlite, + required TResult Function(DatabaseConfig_Sled value) sled, + }) { + return sled(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DatabaseConfig_Memory value)? memory, + TResult? Function(DatabaseConfig_Sqlite value)? sqlite, + TResult? Function(DatabaseConfig_Sled value)? sled, + }) { + return sled?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DatabaseConfig_Memory value)? memory, + TResult Function(DatabaseConfig_Sqlite value)? sqlite, + TResult Function(DatabaseConfig_Sled value)? sled, + required TResult orElse(), + }) { + if (sled != null) { + return sled(this); + } + return orElse(); + } +} + +abstract class DatabaseConfig_Sled extends DatabaseConfig { + const factory DatabaseConfig_Sled( + {required final SledDbConfiguration config}) = _$DatabaseConfig_SledImpl; + const DatabaseConfig_Sled._() : super._(); + + SledDbConfiguration get config; + @JsonKey(ignore: true) + _$$DatabaseConfig_SledImplCopyWith<_$DatabaseConfig_SledImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$LockTime { + int get field0 => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(int field0) blocks, + required TResult Function(int field0) seconds, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? blocks, + TResult? Function(int field0)? seconds, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? blocks, + TResult Function(int field0)? seconds, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(LockTime_Blocks value) blocks, + required TResult Function(LockTime_Seconds value) seconds, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LockTime_Blocks value)? blocks, + TResult? Function(LockTime_Seconds value)? seconds, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LockTime_Blocks value)? blocks, + TResult Function(LockTime_Seconds value)? seconds, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $LockTimeCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LockTimeCopyWith<$Res> { + factory $LockTimeCopyWith(LockTime value, $Res Function(LockTime) then) = + _$LockTimeCopyWithImpl<$Res, LockTime>; + @useResult + $Res call({int field0}); +} + +/// @nodoc +class _$LockTimeCopyWithImpl<$Res, $Val extends LockTime> + implements $LockTimeCopyWith<$Res> { + _$LockTimeCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_value.copyWith( + field0: null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$LockTime_BlocksImplCopyWith<$Res> + implements $LockTimeCopyWith<$Res> { + factory _$$LockTime_BlocksImplCopyWith(_$LockTime_BlocksImpl value, + $Res Function(_$LockTime_BlocksImpl) then) = + __$$LockTime_BlocksImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int field0}); +} + +/// @nodoc +class __$$LockTime_BlocksImplCopyWithImpl<$Res> + extends _$LockTimeCopyWithImpl<$Res, _$LockTime_BlocksImpl> + implements _$$LockTime_BlocksImplCopyWith<$Res> { + __$$LockTime_BlocksImplCopyWithImpl( + _$LockTime_BlocksImpl _value, $Res Function(_$LockTime_BlocksImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$LockTime_BlocksImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$LockTime_BlocksImpl extends LockTime_Blocks { + const _$LockTime_BlocksImpl(this.field0) : super._(); + + @override + final int field0; + + @override + String toString() { + return 'LockTime.blocks(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LockTime_BlocksImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LockTime_BlocksImplCopyWith<_$LockTime_BlocksImpl> get copyWith => + __$$LockTime_BlocksImplCopyWithImpl<_$LockTime_BlocksImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int field0) blocks, + required TResult Function(int field0) seconds, + }) { + return blocks(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? blocks, + TResult? Function(int field0)? seconds, + }) { + return blocks?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? blocks, + TResult Function(int field0)? seconds, + required TResult orElse(), + }) { + if (blocks != null) { + return blocks(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LockTime_Blocks value) blocks, + required TResult Function(LockTime_Seconds value) seconds, + }) { + return blocks(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LockTime_Blocks value)? blocks, + TResult? Function(LockTime_Seconds value)? seconds, + }) { + return blocks?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LockTime_Blocks value)? blocks, + TResult Function(LockTime_Seconds value)? seconds, + required TResult orElse(), + }) { + if (blocks != null) { + return blocks(this); + } + return orElse(); + } +} + +abstract class LockTime_Blocks extends LockTime { + const factory LockTime_Blocks(final int field0) = _$LockTime_BlocksImpl; + const LockTime_Blocks._() : super._(); + + @override + int get field0; + @override + @JsonKey(ignore: true) + _$$LockTime_BlocksImplCopyWith<_$LockTime_BlocksImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$LockTime_SecondsImplCopyWith<$Res> + implements $LockTimeCopyWith<$Res> { + factory _$$LockTime_SecondsImplCopyWith(_$LockTime_SecondsImpl value, + $Res Function(_$LockTime_SecondsImpl) then) = + __$$LockTime_SecondsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int field0}); +} + +/// @nodoc +class __$$LockTime_SecondsImplCopyWithImpl<$Res> + extends _$LockTimeCopyWithImpl<$Res, _$LockTime_SecondsImpl> + implements _$$LockTime_SecondsImplCopyWith<$Res> { + __$$LockTime_SecondsImplCopyWithImpl(_$LockTime_SecondsImpl _value, + $Res Function(_$LockTime_SecondsImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$LockTime_SecondsImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$LockTime_SecondsImpl extends LockTime_Seconds { + const _$LockTime_SecondsImpl(this.field0) : super._(); + + @override + final int field0; + + @override + String toString() { + return 'LockTime.seconds(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LockTime_SecondsImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LockTime_SecondsImplCopyWith<_$LockTime_SecondsImpl> get copyWith => + __$$LockTime_SecondsImplCopyWithImpl<_$LockTime_SecondsImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int field0) blocks, + required TResult Function(int field0) seconds, + }) { + return seconds(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? blocks, + TResult? Function(int field0)? seconds, + }) { + return seconds?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? blocks, + TResult Function(int field0)? seconds, + required TResult orElse(), + }) { + if (seconds != null) { + return seconds(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LockTime_Blocks value) blocks, + required TResult Function(LockTime_Seconds value) seconds, + }) { + return seconds(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LockTime_Blocks value)? blocks, + TResult? Function(LockTime_Seconds value)? seconds, + }) { + return seconds?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LockTime_Blocks value)? blocks, + TResult Function(LockTime_Seconds value)? seconds, + required TResult orElse(), + }) { + if (seconds != null) { + return seconds(this); + } + return orElse(); + } +} + +abstract class LockTime_Seconds extends LockTime { + const factory LockTime_Seconds(final int field0) = _$LockTime_SecondsImpl; + const LockTime_Seconds._() : super._(); + + @override + int get field0; + @override + @JsonKey(ignore: true) + _$$LockTime_SecondsImplCopyWith<_$LockTime_SecondsImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$Payload { + @optionalTypeArgs + TResult when({ + required TResult Function(String pubkeyHash) pubkeyHash, + required TResult Function(String scriptHash) scriptHash, + required TResult Function(WitnessVersion version, Uint8List program) + witnessProgram, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String pubkeyHash)? pubkeyHash, + TResult? Function(String scriptHash)? scriptHash, + TResult? Function(WitnessVersion version, Uint8List program)? + witnessProgram, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String pubkeyHash)? pubkeyHash, + TResult Function(String scriptHash)? scriptHash, + TResult Function(WitnessVersion version, Uint8List program)? witnessProgram, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(Payload_PubkeyHash value) pubkeyHash, + required TResult Function(Payload_ScriptHash value) scriptHash, + required TResult Function(Payload_WitnessProgram value) witnessProgram, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Payload_PubkeyHash value)? pubkeyHash, + TResult? Function(Payload_ScriptHash value)? scriptHash, + TResult? Function(Payload_WitnessProgram value)? witnessProgram, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Payload_PubkeyHash value)? pubkeyHash, + TResult Function(Payload_ScriptHash value)? scriptHash, + TResult Function(Payload_WitnessProgram value)? witnessProgram, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PayloadCopyWith<$Res> { + factory $PayloadCopyWith(Payload value, $Res Function(Payload) then) = + _$PayloadCopyWithImpl<$Res, Payload>; +} + +/// @nodoc +class _$PayloadCopyWithImpl<$Res, $Val extends Payload> + implements $PayloadCopyWith<$Res> { + _$PayloadCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$Payload_PubkeyHashImplCopyWith<$Res> { + factory _$$Payload_PubkeyHashImplCopyWith(_$Payload_PubkeyHashImpl value, + $Res Function(_$Payload_PubkeyHashImpl) then) = + __$$Payload_PubkeyHashImplCopyWithImpl<$Res>; + @useResult + $Res call({String pubkeyHash}); +} + +/// @nodoc +class __$$Payload_PubkeyHashImplCopyWithImpl<$Res> + extends _$PayloadCopyWithImpl<$Res, _$Payload_PubkeyHashImpl> + implements _$$Payload_PubkeyHashImplCopyWith<$Res> { + __$$Payload_PubkeyHashImplCopyWithImpl(_$Payload_PubkeyHashImpl _value, + $Res Function(_$Payload_PubkeyHashImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? pubkeyHash = null, + }) { + return _then(_$Payload_PubkeyHashImpl( + pubkeyHash: null == pubkeyHash + ? _value.pubkeyHash + : pubkeyHash // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$Payload_PubkeyHashImpl extends Payload_PubkeyHash { + const _$Payload_PubkeyHashImpl({required this.pubkeyHash}) : super._(); + + @override + final String pubkeyHash; + + @override + String toString() { + return 'Payload.pubkeyHash(pubkeyHash: $pubkeyHash)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Payload_PubkeyHashImpl && + (identical(other.pubkeyHash, pubkeyHash) || + other.pubkeyHash == pubkeyHash)); + } + + @override + int get hashCode => Object.hash(runtimeType, pubkeyHash); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Payload_PubkeyHashImplCopyWith<_$Payload_PubkeyHashImpl> get copyWith => + __$$Payload_PubkeyHashImplCopyWithImpl<_$Payload_PubkeyHashImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String pubkeyHash) pubkeyHash, + required TResult Function(String scriptHash) scriptHash, + required TResult Function(WitnessVersion version, Uint8List program) + witnessProgram, + }) { + return pubkeyHash(this.pubkeyHash); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String pubkeyHash)? pubkeyHash, + TResult? Function(String scriptHash)? scriptHash, + TResult? Function(WitnessVersion version, Uint8List program)? + witnessProgram, + }) { + return pubkeyHash?.call(this.pubkeyHash); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String pubkeyHash)? pubkeyHash, + TResult Function(String scriptHash)? scriptHash, + TResult Function(WitnessVersion version, Uint8List program)? witnessProgram, + required TResult orElse(), + }) { + if (pubkeyHash != null) { + return pubkeyHash(this.pubkeyHash); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Payload_PubkeyHash value) pubkeyHash, + required TResult Function(Payload_ScriptHash value) scriptHash, + required TResult Function(Payload_WitnessProgram value) witnessProgram, + }) { + return pubkeyHash(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Payload_PubkeyHash value)? pubkeyHash, + TResult? Function(Payload_ScriptHash value)? scriptHash, + TResult? Function(Payload_WitnessProgram value)? witnessProgram, + }) { + return pubkeyHash?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Payload_PubkeyHash value)? pubkeyHash, + TResult Function(Payload_ScriptHash value)? scriptHash, + TResult Function(Payload_WitnessProgram value)? witnessProgram, + required TResult orElse(), + }) { + if (pubkeyHash != null) { + return pubkeyHash(this); + } + return orElse(); + } +} + +abstract class Payload_PubkeyHash extends Payload { + const factory Payload_PubkeyHash({required final String pubkeyHash}) = + _$Payload_PubkeyHashImpl; + const Payload_PubkeyHash._() : super._(); + + String get pubkeyHash; + @JsonKey(ignore: true) + _$$Payload_PubkeyHashImplCopyWith<_$Payload_PubkeyHashImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$Payload_ScriptHashImplCopyWith<$Res> { + factory _$$Payload_ScriptHashImplCopyWith(_$Payload_ScriptHashImpl value, + $Res Function(_$Payload_ScriptHashImpl) then) = + __$$Payload_ScriptHashImplCopyWithImpl<$Res>; + @useResult + $Res call({String scriptHash}); +} + +/// @nodoc +class __$$Payload_ScriptHashImplCopyWithImpl<$Res> + extends _$PayloadCopyWithImpl<$Res, _$Payload_ScriptHashImpl> + implements _$$Payload_ScriptHashImplCopyWith<$Res> { + __$$Payload_ScriptHashImplCopyWithImpl(_$Payload_ScriptHashImpl _value, + $Res Function(_$Payload_ScriptHashImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? scriptHash = null, + }) { + return _then(_$Payload_ScriptHashImpl( + scriptHash: null == scriptHash + ? _value.scriptHash + : scriptHash // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$Payload_ScriptHashImpl extends Payload_ScriptHash { + const _$Payload_ScriptHashImpl({required this.scriptHash}) : super._(); + + @override + final String scriptHash; + + @override + String toString() { + return 'Payload.scriptHash(scriptHash: $scriptHash)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Payload_ScriptHashImpl && + (identical(other.scriptHash, scriptHash) || + other.scriptHash == scriptHash)); + } + + @override + int get hashCode => Object.hash(runtimeType, scriptHash); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Payload_ScriptHashImplCopyWith<_$Payload_ScriptHashImpl> get copyWith => + __$$Payload_ScriptHashImplCopyWithImpl<_$Payload_ScriptHashImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String pubkeyHash) pubkeyHash, + required TResult Function(String scriptHash) scriptHash, + required TResult Function(WitnessVersion version, Uint8List program) + witnessProgram, + }) { + return scriptHash(this.scriptHash); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String pubkeyHash)? pubkeyHash, + TResult? Function(String scriptHash)? scriptHash, + TResult? Function(WitnessVersion version, Uint8List program)? + witnessProgram, + }) { + return scriptHash?.call(this.scriptHash); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String pubkeyHash)? pubkeyHash, + TResult Function(String scriptHash)? scriptHash, + TResult Function(WitnessVersion version, Uint8List program)? witnessProgram, + required TResult orElse(), + }) { + if (scriptHash != null) { + return scriptHash(this.scriptHash); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Payload_PubkeyHash value) pubkeyHash, + required TResult Function(Payload_ScriptHash value) scriptHash, + required TResult Function(Payload_WitnessProgram value) witnessProgram, + }) { + return scriptHash(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Payload_PubkeyHash value)? pubkeyHash, + TResult? Function(Payload_ScriptHash value)? scriptHash, + TResult? Function(Payload_WitnessProgram value)? witnessProgram, + }) { + return scriptHash?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Payload_PubkeyHash value)? pubkeyHash, + TResult Function(Payload_ScriptHash value)? scriptHash, + TResult Function(Payload_WitnessProgram value)? witnessProgram, + required TResult orElse(), + }) { + if (scriptHash != null) { + return scriptHash(this); + } + return orElse(); + } +} + +abstract class Payload_ScriptHash extends Payload { + const factory Payload_ScriptHash({required final String scriptHash}) = + _$Payload_ScriptHashImpl; + const Payload_ScriptHash._() : super._(); + + String get scriptHash; + @JsonKey(ignore: true) + _$$Payload_ScriptHashImplCopyWith<_$Payload_ScriptHashImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$Payload_WitnessProgramImplCopyWith<$Res> { + factory _$$Payload_WitnessProgramImplCopyWith( + _$Payload_WitnessProgramImpl value, + $Res Function(_$Payload_WitnessProgramImpl) then) = + __$$Payload_WitnessProgramImplCopyWithImpl<$Res>; + @useResult + $Res call({WitnessVersion version, Uint8List program}); +} + +/// @nodoc +class __$$Payload_WitnessProgramImplCopyWithImpl<$Res> + extends _$PayloadCopyWithImpl<$Res, _$Payload_WitnessProgramImpl> + implements _$$Payload_WitnessProgramImplCopyWith<$Res> { + __$$Payload_WitnessProgramImplCopyWithImpl( + _$Payload_WitnessProgramImpl _value, + $Res Function(_$Payload_WitnessProgramImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? version = null, + Object? program = null, + }) { + return _then(_$Payload_WitnessProgramImpl( + version: null == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as WitnessVersion, + program: null == program + ? _value.program + : program // ignore: cast_nullable_to_non_nullable + as Uint8List, + )); + } +} + +/// @nodoc + +class _$Payload_WitnessProgramImpl extends Payload_WitnessProgram { + const _$Payload_WitnessProgramImpl( + {required this.version, required this.program}) + : super._(); + + /// The witness program version. + @override + final WitnessVersion version; + + /// The witness program. + @override + final Uint8List program; + + @override + String toString() { + return 'Payload.witnessProgram(version: $version, program: $program)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Payload_WitnessProgramImpl && + (identical(other.version, version) || other.version == version) && + const DeepCollectionEquality().equals(other.program, program)); + } + + @override + int get hashCode => Object.hash( + runtimeType, version, const DeepCollectionEquality().hash(program)); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Payload_WitnessProgramImplCopyWith<_$Payload_WitnessProgramImpl> + get copyWith => __$$Payload_WitnessProgramImplCopyWithImpl< + _$Payload_WitnessProgramImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String pubkeyHash) pubkeyHash, + required TResult Function(String scriptHash) scriptHash, + required TResult Function(WitnessVersion version, Uint8List program) + witnessProgram, + }) { + return witnessProgram(version, program); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String pubkeyHash)? pubkeyHash, + TResult? Function(String scriptHash)? scriptHash, + TResult? Function(WitnessVersion version, Uint8List program)? + witnessProgram, + }) { + return witnessProgram?.call(version, program); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String pubkeyHash)? pubkeyHash, + TResult Function(String scriptHash)? scriptHash, + TResult Function(WitnessVersion version, Uint8List program)? witnessProgram, + required TResult orElse(), + }) { + if (witnessProgram != null) { + return witnessProgram(version, program); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Payload_PubkeyHash value) pubkeyHash, + required TResult Function(Payload_ScriptHash value) scriptHash, + required TResult Function(Payload_WitnessProgram value) witnessProgram, + }) { + return witnessProgram(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Payload_PubkeyHash value)? pubkeyHash, + TResult? Function(Payload_ScriptHash value)? scriptHash, + TResult? Function(Payload_WitnessProgram value)? witnessProgram, + }) { + return witnessProgram?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Payload_PubkeyHash value)? pubkeyHash, + TResult Function(Payload_ScriptHash value)? scriptHash, + TResult Function(Payload_WitnessProgram value)? witnessProgram, + required TResult orElse(), + }) { + if (witnessProgram != null) { + return witnessProgram(this); + } + return orElse(); + } +} + +abstract class Payload_WitnessProgram extends Payload { + const factory Payload_WitnessProgram( + {required final WitnessVersion version, + required final Uint8List program}) = _$Payload_WitnessProgramImpl; + const Payload_WitnessProgram._() : super._(); + + /// The witness program version. + WitnessVersion get version; + + /// The witness program. + Uint8List get program; + @JsonKey(ignore: true) + _$$Payload_WitnessProgramImplCopyWith<_$Payload_WitnessProgramImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$PkOrF { + String get value => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(String value) pubkey, + required TResult Function(String value) xOnlyPubkey, + required TResult Function(String value) fingerprint, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String value)? pubkey, + TResult? Function(String value)? xOnlyPubkey, + TResult? Function(String value)? fingerprint, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String value)? pubkey, + TResult Function(String value)? xOnlyPubkey, + TResult Function(String value)? fingerprint, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(PkOrF_Pubkey value) pubkey, + required TResult Function(PkOrF_XOnlyPubkey value) xOnlyPubkey, + required TResult Function(PkOrF_Fingerprint value) fingerprint, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PkOrF_Pubkey value)? pubkey, + TResult? Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, + TResult? Function(PkOrF_Fingerprint value)? fingerprint, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PkOrF_Pubkey value)? pubkey, + TResult Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, + TResult Function(PkOrF_Fingerprint value)? fingerprint, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $PkOrFCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PkOrFCopyWith<$Res> { + factory $PkOrFCopyWith(PkOrF value, $Res Function(PkOrF) then) = + _$PkOrFCopyWithImpl<$Res, PkOrF>; + @useResult + $Res call({String value}); +} + +/// @nodoc +class _$PkOrFCopyWithImpl<$Res, $Val extends PkOrF> + implements $PkOrFCopyWith<$Res> { + _$PkOrFCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? value = null, + }) { + return _then(_value.copyWith( + value: null == value + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PkOrF_PubkeyImplCopyWith<$Res> + implements $PkOrFCopyWith<$Res> { + factory _$$PkOrF_PubkeyImplCopyWith( + _$PkOrF_PubkeyImpl value, $Res Function(_$PkOrF_PubkeyImpl) then) = + __$$PkOrF_PubkeyImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String value}); +} + +/// @nodoc +class __$$PkOrF_PubkeyImplCopyWithImpl<$Res> + extends _$PkOrFCopyWithImpl<$Res, _$PkOrF_PubkeyImpl> + implements _$$PkOrF_PubkeyImplCopyWith<$Res> { + __$$PkOrF_PubkeyImplCopyWithImpl( + _$PkOrF_PubkeyImpl _value, $Res Function(_$PkOrF_PubkeyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? value = null, + }) { + return _then(_$PkOrF_PubkeyImpl( + value: null == value + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PkOrF_PubkeyImpl extends PkOrF_Pubkey { + const _$PkOrF_PubkeyImpl({required this.value}) : super._(); + + @override + final String value; + + @override + String toString() { + return 'PkOrF.pubkey(value: $value)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PkOrF_PubkeyImpl && + (identical(other.value, value) || other.value == value)); + } + + @override + int get hashCode => Object.hash(runtimeType, value); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PkOrF_PubkeyImplCopyWith<_$PkOrF_PubkeyImpl> get copyWith => + __$$PkOrF_PubkeyImplCopyWithImpl<_$PkOrF_PubkeyImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String value) pubkey, + required TResult Function(String value) xOnlyPubkey, + required TResult Function(String value) fingerprint, + }) { + return pubkey(value); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String value)? pubkey, + TResult? Function(String value)? xOnlyPubkey, + TResult? Function(String value)? fingerprint, + }) { + return pubkey?.call(value); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String value)? pubkey, + TResult Function(String value)? xOnlyPubkey, + TResult Function(String value)? fingerprint, + required TResult orElse(), + }) { + if (pubkey != null) { + return pubkey(value); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PkOrF_Pubkey value) pubkey, + required TResult Function(PkOrF_XOnlyPubkey value) xOnlyPubkey, + required TResult Function(PkOrF_Fingerprint value) fingerprint, + }) { + return pubkey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PkOrF_Pubkey value)? pubkey, + TResult? Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, + TResult? Function(PkOrF_Fingerprint value)? fingerprint, + }) { + return pubkey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PkOrF_Pubkey value)? pubkey, + TResult Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, + TResult Function(PkOrF_Fingerprint value)? fingerprint, + required TResult orElse(), + }) { + if (pubkey != null) { + return pubkey(this); + } + return orElse(); + } +} + +abstract class PkOrF_Pubkey extends PkOrF { + const factory PkOrF_Pubkey({required final String value}) = + _$PkOrF_PubkeyImpl; + const PkOrF_Pubkey._() : super._(); + + @override + String get value; + @override + @JsonKey(ignore: true) + _$$PkOrF_PubkeyImplCopyWith<_$PkOrF_PubkeyImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PkOrF_XOnlyPubkeyImplCopyWith<$Res> + implements $PkOrFCopyWith<$Res> { + factory _$$PkOrF_XOnlyPubkeyImplCopyWith(_$PkOrF_XOnlyPubkeyImpl value, + $Res Function(_$PkOrF_XOnlyPubkeyImpl) then) = + __$$PkOrF_XOnlyPubkeyImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String value}); +} + +/// @nodoc +class __$$PkOrF_XOnlyPubkeyImplCopyWithImpl<$Res> + extends _$PkOrFCopyWithImpl<$Res, _$PkOrF_XOnlyPubkeyImpl> + implements _$$PkOrF_XOnlyPubkeyImplCopyWith<$Res> { + __$$PkOrF_XOnlyPubkeyImplCopyWithImpl(_$PkOrF_XOnlyPubkeyImpl _value, + $Res Function(_$PkOrF_XOnlyPubkeyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? value = null, + }) { + return _then(_$PkOrF_XOnlyPubkeyImpl( + value: null == value + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PkOrF_XOnlyPubkeyImpl extends PkOrF_XOnlyPubkey { + const _$PkOrF_XOnlyPubkeyImpl({required this.value}) : super._(); + + @override + final String value; + + @override + String toString() { + return 'PkOrF.xOnlyPubkey(value: $value)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PkOrF_XOnlyPubkeyImpl && + (identical(other.value, value) || other.value == value)); + } + + @override + int get hashCode => Object.hash(runtimeType, value); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PkOrF_XOnlyPubkeyImplCopyWith<_$PkOrF_XOnlyPubkeyImpl> get copyWith => + __$$PkOrF_XOnlyPubkeyImplCopyWithImpl<_$PkOrF_XOnlyPubkeyImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String value) pubkey, + required TResult Function(String value) xOnlyPubkey, + required TResult Function(String value) fingerprint, + }) { + return xOnlyPubkey(value); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String value)? pubkey, + TResult? Function(String value)? xOnlyPubkey, + TResult? Function(String value)? fingerprint, + }) { + return xOnlyPubkey?.call(value); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String value)? pubkey, + TResult Function(String value)? xOnlyPubkey, + TResult Function(String value)? fingerprint, + required TResult orElse(), + }) { + if (xOnlyPubkey != null) { + return xOnlyPubkey(value); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PkOrF_Pubkey value) pubkey, + required TResult Function(PkOrF_XOnlyPubkey value) xOnlyPubkey, + required TResult Function(PkOrF_Fingerprint value) fingerprint, + }) { + return xOnlyPubkey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PkOrF_Pubkey value)? pubkey, + TResult? Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, + TResult? Function(PkOrF_Fingerprint value)? fingerprint, + }) { + return xOnlyPubkey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PkOrF_Pubkey value)? pubkey, + TResult Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, + TResult Function(PkOrF_Fingerprint value)? fingerprint, + required TResult orElse(), + }) { + if (xOnlyPubkey != null) { + return xOnlyPubkey(this); + } + return orElse(); + } +} + +abstract class PkOrF_XOnlyPubkey extends PkOrF { + const factory PkOrF_XOnlyPubkey({required final String value}) = + _$PkOrF_XOnlyPubkeyImpl; + const PkOrF_XOnlyPubkey._() : super._(); + + @override + String get value; + @override + @JsonKey(ignore: true) + _$$PkOrF_XOnlyPubkeyImplCopyWith<_$PkOrF_XOnlyPubkeyImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PkOrF_FingerprintImplCopyWith<$Res> + implements $PkOrFCopyWith<$Res> { + factory _$$PkOrF_FingerprintImplCopyWith(_$PkOrF_FingerprintImpl value, + $Res Function(_$PkOrF_FingerprintImpl) then) = + __$$PkOrF_FingerprintImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String value}); +} + +/// @nodoc +class __$$PkOrF_FingerprintImplCopyWithImpl<$Res> + extends _$PkOrFCopyWithImpl<$Res, _$PkOrF_FingerprintImpl> + implements _$$PkOrF_FingerprintImplCopyWith<$Res> { + __$$PkOrF_FingerprintImplCopyWithImpl(_$PkOrF_FingerprintImpl _value, + $Res Function(_$PkOrF_FingerprintImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? value = null, + }) { + return _then(_$PkOrF_FingerprintImpl( + value: null == value + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PkOrF_FingerprintImpl extends PkOrF_Fingerprint { + const _$PkOrF_FingerprintImpl({required this.value}) : super._(); + + @override + final String value; + + @override + String toString() { + return 'PkOrF.fingerprint(value: $value)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PkOrF_FingerprintImpl && + (identical(other.value, value) || other.value == value)); + } + + @override + int get hashCode => Object.hash(runtimeType, value); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PkOrF_FingerprintImplCopyWith<_$PkOrF_FingerprintImpl> get copyWith => + __$$PkOrF_FingerprintImplCopyWithImpl<_$PkOrF_FingerprintImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String value) pubkey, + required TResult Function(String value) xOnlyPubkey, + required TResult Function(String value) fingerprint, + }) { + return fingerprint(value); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String value)? pubkey, + TResult? Function(String value)? xOnlyPubkey, + TResult? Function(String value)? fingerprint, + }) { + return fingerprint?.call(value); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String value)? pubkey, + TResult Function(String value)? xOnlyPubkey, + TResult Function(String value)? fingerprint, + required TResult orElse(), + }) { + if (fingerprint != null) { + return fingerprint(value); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PkOrF_Pubkey value) pubkey, + required TResult Function(PkOrF_XOnlyPubkey value) xOnlyPubkey, + required TResult Function(PkOrF_Fingerprint value) fingerprint, + }) { + return fingerprint(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PkOrF_Pubkey value)? pubkey, + TResult? Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, + TResult? Function(PkOrF_Fingerprint value)? fingerprint, + }) { + return fingerprint?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PkOrF_Pubkey value)? pubkey, + TResult Function(PkOrF_XOnlyPubkey value)? xOnlyPubkey, + TResult Function(PkOrF_Fingerprint value)? fingerprint, + required TResult orElse(), + }) { + if (fingerprint != null) { + return fingerprint(this); + } + return orElse(); + } +} + +abstract class PkOrF_Fingerprint extends PkOrF { + const factory PkOrF_Fingerprint({required final String value}) = + _$PkOrF_FingerprintImpl; + const PkOrF_Fingerprint._() : super._(); + + @override + String get value; + @override + @JsonKey(ignore: true) + _$$PkOrF_FingerprintImplCopyWith<_$PkOrF_FingerprintImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$RbfValue { + @optionalTypeArgs + TResult when({ + required TResult Function() rbfDefault, + required TResult Function(int field0) value, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? rbfDefault, + TResult? Function(int field0)? value, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? rbfDefault, + TResult Function(int field0)? value, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(RbfValue_RbfDefault value) rbfDefault, + required TResult Function(RbfValue_Value value) value, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(RbfValue_RbfDefault value)? rbfDefault, + TResult? Function(RbfValue_Value value)? value, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(RbfValue_RbfDefault value)? rbfDefault, + TResult Function(RbfValue_Value value)? value, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $RbfValueCopyWith<$Res> { + factory $RbfValueCopyWith(RbfValue value, $Res Function(RbfValue) then) = + _$RbfValueCopyWithImpl<$Res, RbfValue>; +} + +/// @nodoc +class _$RbfValueCopyWithImpl<$Res, $Val extends RbfValue> + implements $RbfValueCopyWith<$Res> { + _$RbfValueCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$RbfValue_RbfDefaultImplCopyWith<$Res> { + factory _$$RbfValue_RbfDefaultImplCopyWith(_$RbfValue_RbfDefaultImpl value, + $Res Function(_$RbfValue_RbfDefaultImpl) then) = + __$$RbfValue_RbfDefaultImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$RbfValue_RbfDefaultImplCopyWithImpl<$Res> + extends _$RbfValueCopyWithImpl<$Res, _$RbfValue_RbfDefaultImpl> + implements _$$RbfValue_RbfDefaultImplCopyWith<$Res> { + __$$RbfValue_RbfDefaultImplCopyWithImpl(_$RbfValue_RbfDefaultImpl _value, + $Res Function(_$RbfValue_RbfDefaultImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$RbfValue_RbfDefaultImpl extends RbfValue_RbfDefault { + const _$RbfValue_RbfDefaultImpl() : super._(); + + @override + String toString() { + return 'RbfValue.rbfDefault()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$RbfValue_RbfDefaultImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() rbfDefault, + required TResult Function(int field0) value, + }) { + return rbfDefault(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? rbfDefault, + TResult? Function(int field0)? value, + }) { + return rbfDefault?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? rbfDefault, + TResult Function(int field0)? value, + required TResult orElse(), + }) { + if (rbfDefault != null) { + return rbfDefault(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(RbfValue_RbfDefault value) rbfDefault, + required TResult Function(RbfValue_Value value) value, + }) { + return rbfDefault(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(RbfValue_RbfDefault value)? rbfDefault, + TResult? Function(RbfValue_Value value)? value, + }) { + return rbfDefault?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(RbfValue_RbfDefault value)? rbfDefault, + TResult Function(RbfValue_Value value)? value, + required TResult orElse(), + }) { + if (rbfDefault != null) { + return rbfDefault(this); + } + return orElse(); + } +} + +abstract class RbfValue_RbfDefault extends RbfValue { + const factory RbfValue_RbfDefault() = _$RbfValue_RbfDefaultImpl; + const RbfValue_RbfDefault._() : super._(); +} + +/// @nodoc +abstract class _$$RbfValue_ValueImplCopyWith<$Res> { + factory _$$RbfValue_ValueImplCopyWith(_$RbfValue_ValueImpl value, + $Res Function(_$RbfValue_ValueImpl) then) = + __$$RbfValue_ValueImplCopyWithImpl<$Res>; + @useResult + $Res call({int field0}); +} + +/// @nodoc +class __$$RbfValue_ValueImplCopyWithImpl<$Res> + extends _$RbfValueCopyWithImpl<$Res, _$RbfValue_ValueImpl> + implements _$$RbfValue_ValueImplCopyWith<$Res> { + __$$RbfValue_ValueImplCopyWithImpl( + _$RbfValue_ValueImpl _value, $Res Function(_$RbfValue_ValueImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? field0 = null, + }) { + return _then(_$RbfValue_ValueImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$RbfValue_ValueImpl extends RbfValue_Value { + const _$RbfValue_ValueImpl(this.field0) : super._(); + + @override + final int field0; + + @override + String toString() { + return 'RbfValue.value(field0: $field0)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$RbfValue_ValueImpl && + (identical(other.field0, field0) || other.field0 == field0)); + } + + @override + int get hashCode => Object.hash(runtimeType, field0); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$RbfValue_ValueImplCopyWith<_$RbfValue_ValueImpl> get copyWith => + __$$RbfValue_ValueImplCopyWithImpl<_$RbfValue_ValueImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() rbfDefault, + required TResult Function(int field0) value, + }) { + return value(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? rbfDefault, + TResult? Function(int field0)? value, + }) { + return value?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? rbfDefault, + TResult Function(int field0)? value, + required TResult orElse(), + }) { + if (value != null) { + return value(field0); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(RbfValue_RbfDefault value) rbfDefault, + required TResult Function(RbfValue_Value value) value, + }) { + return value(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(RbfValue_RbfDefault value)? rbfDefault, + TResult? Function(RbfValue_Value value)? value, + }) { + return value?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(RbfValue_RbfDefault value)? rbfDefault, + TResult Function(RbfValue_Value value)? value, + required TResult orElse(), + }) { + if (value != null) { + return value(this); + } + return orElse(); + } +} + +abstract class RbfValue_Value extends RbfValue { + const factory RbfValue_Value(final int field0) = _$RbfValue_ValueImpl; + const RbfValue_Value._() : super._(); + + int get field0; + @JsonKey(ignore: true) + _$$RbfValue_ValueImplCopyWith<_$RbfValue_ValueImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$Satisfaction { + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partial, + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partialComplete, + required TResult Function(Condition condition) complete, + required TResult Function(String msg) none, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult? Function(Condition condition)? complete, + TResult? Function(String msg)? none, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult Function(Condition condition)? complete, + TResult Function(String msg)? none, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(Satisfaction_Partial value) partial, + required TResult Function(Satisfaction_PartialComplete value) + partialComplete, + required TResult Function(Satisfaction_Complete value) complete, + required TResult Function(Satisfaction_None value) none, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Satisfaction_Partial value)? partial, + TResult? Function(Satisfaction_PartialComplete value)? partialComplete, + TResult? Function(Satisfaction_Complete value)? complete, + TResult? Function(Satisfaction_None value)? none, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Satisfaction_Partial value)? partial, + TResult Function(Satisfaction_PartialComplete value)? partialComplete, + TResult Function(Satisfaction_Complete value)? complete, + TResult Function(Satisfaction_None value)? none, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $SatisfactionCopyWith<$Res> { + factory $SatisfactionCopyWith( + Satisfaction value, $Res Function(Satisfaction) then) = + _$SatisfactionCopyWithImpl<$Res, Satisfaction>; +} + +/// @nodoc +class _$SatisfactionCopyWithImpl<$Res, $Val extends Satisfaction> + implements $SatisfactionCopyWith<$Res> { + _$SatisfactionCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$Satisfaction_PartialImplCopyWith<$Res> { + factory _$$Satisfaction_PartialImplCopyWith(_$Satisfaction_PartialImpl value, + $Res Function(_$Satisfaction_PartialImpl) then) = + __$$Satisfaction_PartialImplCopyWithImpl<$Res>; + @useResult + $Res call( + {BigInt n, + BigInt m, + Uint64List items, + bool? sorted, + Map> conditions}); +} + +/// @nodoc +class __$$Satisfaction_PartialImplCopyWithImpl<$Res> + extends _$SatisfactionCopyWithImpl<$Res, _$Satisfaction_PartialImpl> + implements _$$Satisfaction_PartialImplCopyWith<$Res> { + __$$Satisfaction_PartialImplCopyWithImpl(_$Satisfaction_PartialImpl _value, + $Res Function(_$Satisfaction_PartialImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? n = null, + Object? m = null, + Object? items = null, + Object? sorted = freezed, + Object? conditions = null, + }) { + return _then(_$Satisfaction_PartialImpl( + n: null == n + ? _value.n + : n // ignore: cast_nullable_to_non_nullable + as BigInt, + m: null == m + ? _value.m + : m // ignore: cast_nullable_to_non_nullable + as BigInt, + items: null == items + ? _value.items + : items // ignore: cast_nullable_to_non_nullable + as Uint64List, + sorted: freezed == sorted + ? _value.sorted + : sorted // ignore: cast_nullable_to_non_nullable + as bool?, + conditions: null == conditions + ? _value._conditions + : conditions // ignore: cast_nullable_to_non_nullable + as Map>, + )); + } +} + +/// @nodoc + +class _$Satisfaction_PartialImpl extends Satisfaction_Partial { + const _$Satisfaction_PartialImpl( + {required this.n, + required this.m, + required this.items, + this.sorted, + required final Map> conditions}) + : _conditions = conditions, + super._(); + + @override + final BigInt n; + @override + final BigInt m; + @override + final Uint64List items; + @override + final bool? sorted; + final Map> _conditions; + @override + Map> get conditions { + if (_conditions is EqualUnmodifiableMapView) return _conditions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_conditions); + } + + @override + String toString() { + return 'Satisfaction.partial(n: $n, m: $m, items: $items, sorted: $sorted, conditions: $conditions)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Satisfaction_PartialImpl && + (identical(other.n, n) || other.n == n) && + (identical(other.m, m) || other.m == m) && + const DeepCollectionEquality().equals(other.items, items) && + (identical(other.sorted, sorted) || other.sorted == sorted) && + const DeepCollectionEquality() + .equals(other._conditions, _conditions)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + n, + m, + const DeepCollectionEquality().hash(items), + sorted, + const DeepCollectionEquality().hash(_conditions)); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Satisfaction_PartialImplCopyWith<_$Satisfaction_PartialImpl> + get copyWith => + __$$Satisfaction_PartialImplCopyWithImpl<_$Satisfaction_PartialImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partial, + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partialComplete, + required TResult Function(Condition condition) complete, + required TResult Function(String msg) none, + }) { + return partial(n, m, items, sorted, conditions); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult? Function(Condition condition)? complete, + TResult? Function(String msg)? none, + }) { + return partial?.call(n, m, items, sorted, conditions); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult Function(Condition condition)? complete, + TResult Function(String msg)? none, + required TResult orElse(), + }) { + if (partial != null) { + return partial(n, m, items, sorted, conditions); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Satisfaction_Partial value) partial, + required TResult Function(Satisfaction_PartialComplete value) + partialComplete, + required TResult Function(Satisfaction_Complete value) complete, + required TResult Function(Satisfaction_None value) none, + }) { + return partial(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Satisfaction_Partial value)? partial, + TResult? Function(Satisfaction_PartialComplete value)? partialComplete, + TResult? Function(Satisfaction_Complete value)? complete, + TResult? Function(Satisfaction_None value)? none, + }) { + return partial?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Satisfaction_Partial value)? partial, + TResult Function(Satisfaction_PartialComplete value)? partialComplete, + TResult Function(Satisfaction_Complete value)? complete, + TResult Function(Satisfaction_None value)? none, + required TResult orElse(), + }) { + if (partial != null) { + return partial(this); + } + return orElse(); + } +} + +abstract class Satisfaction_Partial extends Satisfaction { + const factory Satisfaction_Partial( + {required final BigInt n, + required final BigInt m, + required final Uint64List items, + final bool? sorted, + required final Map> conditions}) = + _$Satisfaction_PartialImpl; + const Satisfaction_Partial._() : super._(); + + BigInt get n; + BigInt get m; + Uint64List get items; + bool? get sorted; + Map> get conditions; + @JsonKey(ignore: true) + _$$Satisfaction_PartialImplCopyWith<_$Satisfaction_PartialImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$Satisfaction_PartialCompleteImplCopyWith<$Res> { + factory _$$Satisfaction_PartialCompleteImplCopyWith( + _$Satisfaction_PartialCompleteImpl value, + $Res Function(_$Satisfaction_PartialCompleteImpl) then) = + __$$Satisfaction_PartialCompleteImplCopyWithImpl<$Res>; + @useResult + $Res call( + {BigInt n, + BigInt m, + Uint64List items, + bool? sorted, + Map> conditions}); +} + +/// @nodoc +class __$$Satisfaction_PartialCompleteImplCopyWithImpl<$Res> + extends _$SatisfactionCopyWithImpl<$Res, _$Satisfaction_PartialCompleteImpl> + implements _$$Satisfaction_PartialCompleteImplCopyWith<$Res> { + __$$Satisfaction_PartialCompleteImplCopyWithImpl( + _$Satisfaction_PartialCompleteImpl _value, + $Res Function(_$Satisfaction_PartialCompleteImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? n = null, + Object? m = null, + Object? items = null, + Object? sorted = freezed, + Object? conditions = null, + }) { + return _then(_$Satisfaction_PartialCompleteImpl( + n: null == n + ? _value.n + : n // ignore: cast_nullable_to_non_nullable + as BigInt, + m: null == m + ? _value.m + : m // ignore: cast_nullable_to_non_nullable + as BigInt, + items: null == items + ? _value.items + : items // ignore: cast_nullable_to_non_nullable + as Uint64List, + sorted: freezed == sorted + ? _value.sorted + : sorted // ignore: cast_nullable_to_non_nullable + as bool?, + conditions: null == conditions + ? _value._conditions + : conditions // ignore: cast_nullable_to_non_nullable + as Map>, + )); + } +} + +/// @nodoc + +class _$Satisfaction_PartialCompleteImpl extends Satisfaction_PartialComplete { + const _$Satisfaction_PartialCompleteImpl( + {required this.n, + required this.m, + required this.items, + this.sorted, + required final Map> conditions}) + : _conditions = conditions, + super._(); + + @override + final BigInt n; + @override + final BigInt m; + @override + final Uint64List items; + @override + final bool? sorted; + final Map> _conditions; + @override + Map> get conditions { + if (_conditions is EqualUnmodifiableMapView) return _conditions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_conditions); + } + + @override + String toString() { + return 'Satisfaction.partialComplete(n: $n, m: $m, items: $items, sorted: $sorted, conditions: $conditions)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Satisfaction_PartialCompleteImpl && + (identical(other.n, n) || other.n == n) && + (identical(other.m, m) || other.m == m) && + const DeepCollectionEquality().equals(other.items, items) && + (identical(other.sorted, sorted) || other.sorted == sorted) && + const DeepCollectionEquality() + .equals(other._conditions, _conditions)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + n, + m, + const DeepCollectionEquality().hash(items), + sorted, + const DeepCollectionEquality().hash(_conditions)); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Satisfaction_PartialCompleteImplCopyWith< + _$Satisfaction_PartialCompleteImpl> + get copyWith => __$$Satisfaction_PartialCompleteImplCopyWithImpl< + _$Satisfaction_PartialCompleteImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partial, + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partialComplete, + required TResult Function(Condition condition) complete, + required TResult Function(String msg) none, + }) { + return partialComplete(n, m, items, sorted, conditions); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult? Function(Condition condition)? complete, + TResult? Function(String msg)? none, + }) { + return partialComplete?.call(n, m, items, sorted, conditions); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult Function(Condition condition)? complete, + TResult Function(String msg)? none, + required TResult orElse(), + }) { + if (partialComplete != null) { + return partialComplete(n, m, items, sorted, conditions); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Satisfaction_Partial value) partial, + required TResult Function(Satisfaction_PartialComplete value) + partialComplete, + required TResult Function(Satisfaction_Complete value) complete, + required TResult Function(Satisfaction_None value) none, + }) { + return partialComplete(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Satisfaction_Partial value)? partial, + TResult? Function(Satisfaction_PartialComplete value)? partialComplete, + TResult? Function(Satisfaction_Complete value)? complete, + TResult? Function(Satisfaction_None value)? none, + }) { + return partialComplete?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Satisfaction_Partial value)? partial, + TResult Function(Satisfaction_PartialComplete value)? partialComplete, + TResult Function(Satisfaction_Complete value)? complete, + TResult Function(Satisfaction_None value)? none, + required TResult orElse(), + }) { + if (partialComplete != null) { + return partialComplete(this); + } + return orElse(); + } +} + +abstract class Satisfaction_PartialComplete extends Satisfaction { + const factory Satisfaction_PartialComplete( + {required final BigInt n, + required final BigInt m, + required final Uint64List items, + final bool? sorted, + required final Map> conditions}) = + _$Satisfaction_PartialCompleteImpl; + const Satisfaction_PartialComplete._() : super._(); + + BigInt get n; + BigInt get m; + Uint64List get items; + bool? get sorted; + Map> get conditions; + @JsonKey(ignore: true) + _$$Satisfaction_PartialCompleteImplCopyWith< + _$Satisfaction_PartialCompleteImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$Satisfaction_CompleteImplCopyWith<$Res> { + factory _$$Satisfaction_CompleteImplCopyWith( + _$Satisfaction_CompleteImpl value, + $Res Function(_$Satisfaction_CompleteImpl) then) = + __$$Satisfaction_CompleteImplCopyWithImpl<$Res>; + @useResult + $Res call({Condition condition}); +} + +/// @nodoc +class __$$Satisfaction_CompleteImplCopyWithImpl<$Res> + extends _$SatisfactionCopyWithImpl<$Res, _$Satisfaction_CompleteImpl> + implements _$$Satisfaction_CompleteImplCopyWith<$Res> { + __$$Satisfaction_CompleteImplCopyWithImpl(_$Satisfaction_CompleteImpl _value, + $Res Function(_$Satisfaction_CompleteImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? condition = null, + }) { + return _then(_$Satisfaction_CompleteImpl( + condition: null == condition + ? _value.condition + : condition // ignore: cast_nullable_to_non_nullable + as Condition, + )); + } +} + +/// @nodoc + +class _$Satisfaction_CompleteImpl extends Satisfaction_Complete { + const _$Satisfaction_CompleteImpl({required this.condition}) : super._(); + + @override + final Condition condition; + + @override + String toString() { + return 'Satisfaction.complete(condition: $condition)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Satisfaction_CompleteImpl && + (identical(other.condition, condition) || + other.condition == condition)); + } + + @override + int get hashCode => Object.hash(runtimeType, condition); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Satisfaction_CompleteImplCopyWith<_$Satisfaction_CompleteImpl> + get copyWith => __$$Satisfaction_CompleteImplCopyWithImpl< + _$Satisfaction_CompleteImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partial, + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partialComplete, + required TResult Function(Condition condition) complete, + required TResult Function(String msg) none, + }) { + return complete(condition); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult? Function(Condition condition)? complete, + TResult? Function(String msg)? none, + }) { + return complete?.call(condition); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult Function(Condition condition)? complete, + TResult Function(String msg)? none, + required TResult orElse(), + }) { + if (complete != null) { + return complete(condition); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Satisfaction_Partial value) partial, + required TResult Function(Satisfaction_PartialComplete value) + partialComplete, + required TResult Function(Satisfaction_Complete value) complete, + required TResult Function(Satisfaction_None value) none, + }) { + return complete(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Satisfaction_Partial value)? partial, + TResult? Function(Satisfaction_PartialComplete value)? partialComplete, + TResult? Function(Satisfaction_Complete value)? complete, + TResult? Function(Satisfaction_None value)? none, + }) { + return complete?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Satisfaction_Partial value)? partial, + TResult Function(Satisfaction_PartialComplete value)? partialComplete, + TResult Function(Satisfaction_Complete value)? complete, + TResult Function(Satisfaction_None value)? none, + required TResult orElse(), + }) { + if (complete != null) { + return complete(this); + } + return orElse(); + } +} + +abstract class Satisfaction_Complete extends Satisfaction { + const factory Satisfaction_Complete({required final Condition condition}) = + _$Satisfaction_CompleteImpl; + const Satisfaction_Complete._() : super._(); + + Condition get condition; + @JsonKey(ignore: true) + _$$Satisfaction_CompleteImplCopyWith<_$Satisfaction_CompleteImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$Satisfaction_NoneImplCopyWith<$Res> { + factory _$$Satisfaction_NoneImplCopyWith(_$Satisfaction_NoneImpl value, + $Res Function(_$Satisfaction_NoneImpl) then) = + __$$Satisfaction_NoneImplCopyWithImpl<$Res>; + @useResult + $Res call({String msg}); +} + +/// @nodoc +class __$$Satisfaction_NoneImplCopyWithImpl<$Res> + extends _$SatisfactionCopyWithImpl<$Res, _$Satisfaction_NoneImpl> + implements _$$Satisfaction_NoneImplCopyWith<$Res> { + __$$Satisfaction_NoneImplCopyWithImpl(_$Satisfaction_NoneImpl _value, + $Res Function(_$Satisfaction_NoneImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? msg = null, + }) { + return _then(_$Satisfaction_NoneImpl( + msg: null == msg + ? _value.msg + : msg // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$Satisfaction_NoneImpl extends Satisfaction_None { + const _$Satisfaction_NoneImpl({required this.msg}) : super._(); + + @override + final String msg; + + @override + String toString() { + return 'Satisfaction.none(msg: $msg)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Satisfaction_NoneImpl && + (identical(other.msg, msg) || other.msg == msg)); + } + + @override + int get hashCode => Object.hash(runtimeType, msg); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Satisfaction_NoneImplCopyWith<_$Satisfaction_NoneImpl> get copyWith => + __$$Satisfaction_NoneImplCopyWithImpl<_$Satisfaction_NoneImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partial, + required TResult Function(BigInt n, BigInt m, Uint64List items, + bool? sorted, Map> conditions) + partialComplete, + required TResult Function(Condition condition) complete, + required TResult Function(String msg) none, + }) { + return none(msg); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult? Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult? Function(Condition condition)? complete, + TResult? Function(String msg)? none, + }) { + return none?.call(msg); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partial, + TResult Function(BigInt n, BigInt m, Uint64List items, bool? sorted, + Map> conditions)? + partialComplete, + TResult Function(Condition condition)? complete, + TResult Function(String msg)? none, + required TResult orElse(), + }) { + if (none != null) { + return none(msg); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(Satisfaction_Partial value) partial, + required TResult Function(Satisfaction_PartialComplete value) + partialComplete, + required TResult Function(Satisfaction_Complete value) complete, + required TResult Function(Satisfaction_None value) none, + }) { + return none(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Satisfaction_Partial value)? partial, + TResult? Function(Satisfaction_PartialComplete value)? partialComplete, + TResult? Function(Satisfaction_Complete value)? complete, + TResult? Function(Satisfaction_None value)? none, + }) { + return none?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Satisfaction_Partial value)? partial, + TResult Function(Satisfaction_PartialComplete value)? partialComplete, + TResult Function(Satisfaction_Complete value)? complete, + TResult Function(Satisfaction_None value)? none, + required TResult orElse(), + }) { + if (none != null) { + return none(this); + } + return orElse(); + } +} + +abstract class Satisfaction_None extends Satisfaction { + const factory Satisfaction_None({required final String msg}) = + _$Satisfaction_NoneImpl; + const Satisfaction_None._() : super._(); + + String get msg; + @JsonKey(ignore: true) + _$$Satisfaction_NoneImplCopyWith<_$Satisfaction_NoneImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$SatisfiableItem { + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $SatisfiableItemCopyWith<$Res> { + factory $SatisfiableItemCopyWith( + SatisfiableItem value, $Res Function(SatisfiableItem) then) = + _$SatisfiableItemCopyWithImpl<$Res, SatisfiableItem>; +} + +/// @nodoc +class _$SatisfiableItemCopyWithImpl<$Res, $Val extends SatisfiableItem> + implements $SatisfiableItemCopyWith<$Res> { + _$SatisfiableItemCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$SatisfiableItem_EcdsaSignatureImplCopyWith<$Res> { + factory _$$SatisfiableItem_EcdsaSignatureImplCopyWith( + _$SatisfiableItem_EcdsaSignatureImpl value, + $Res Function(_$SatisfiableItem_EcdsaSignatureImpl) then) = + __$$SatisfiableItem_EcdsaSignatureImplCopyWithImpl<$Res>; + @useResult + $Res call({PkOrF key}); + + $PkOrFCopyWith<$Res> get key; +} + +/// @nodoc +class __$$SatisfiableItem_EcdsaSignatureImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, + _$SatisfiableItem_EcdsaSignatureImpl> + implements _$$SatisfiableItem_EcdsaSignatureImplCopyWith<$Res> { + __$$SatisfiableItem_EcdsaSignatureImplCopyWithImpl( + _$SatisfiableItem_EcdsaSignatureImpl _value, + $Res Function(_$SatisfiableItem_EcdsaSignatureImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? key = null, + }) { + return _then(_$SatisfiableItem_EcdsaSignatureImpl( + key: null == key + ? _value.key + : key // ignore: cast_nullable_to_non_nullable + as PkOrF, + )); + } + + @override + @pragma('vm:prefer-inline') + $PkOrFCopyWith<$Res> get key { + return $PkOrFCopyWith<$Res>(_value.key, (value) { + return _then(_value.copyWith(key: value)); + }); + } +} + +/// @nodoc + +class _$SatisfiableItem_EcdsaSignatureImpl + extends SatisfiableItem_EcdsaSignature { + const _$SatisfiableItem_EcdsaSignatureImpl({required this.key}) : super._(); + + @override + final PkOrF key; + + @override + String toString() { + return 'SatisfiableItem.ecdsaSignature(key: $key)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_EcdsaSignatureImpl && + (identical(other.key, key) || other.key == key)); + } + + @override + int get hashCode => Object.hash(runtimeType, key); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_EcdsaSignatureImplCopyWith< + _$SatisfiableItem_EcdsaSignatureImpl> + get copyWith => __$$SatisfiableItem_EcdsaSignatureImplCopyWithImpl< + _$SatisfiableItem_EcdsaSignatureImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return ecdsaSignature(key); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return ecdsaSignature?.call(key); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (ecdsaSignature != null) { + return ecdsaSignature(key); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return ecdsaSignature(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return ecdsaSignature?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (ecdsaSignature != null) { + return ecdsaSignature(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_EcdsaSignature extends SatisfiableItem { + const factory SatisfiableItem_EcdsaSignature({required final PkOrF key}) = + _$SatisfiableItem_EcdsaSignatureImpl; + const SatisfiableItem_EcdsaSignature._() : super._(); + + PkOrF get key; + @JsonKey(ignore: true) + _$$SatisfiableItem_EcdsaSignatureImplCopyWith< + _$SatisfiableItem_EcdsaSignatureImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SatisfiableItem_SchnorrSignatureImplCopyWith<$Res> { + factory _$$SatisfiableItem_SchnorrSignatureImplCopyWith( + _$SatisfiableItem_SchnorrSignatureImpl value, + $Res Function(_$SatisfiableItem_SchnorrSignatureImpl) then) = + __$$SatisfiableItem_SchnorrSignatureImplCopyWithImpl<$Res>; + @useResult + $Res call({PkOrF key}); + + $PkOrFCopyWith<$Res> get key; +} + +/// @nodoc +class __$$SatisfiableItem_SchnorrSignatureImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, + _$SatisfiableItem_SchnorrSignatureImpl> + implements _$$SatisfiableItem_SchnorrSignatureImplCopyWith<$Res> { + __$$SatisfiableItem_SchnorrSignatureImplCopyWithImpl( + _$SatisfiableItem_SchnorrSignatureImpl _value, + $Res Function(_$SatisfiableItem_SchnorrSignatureImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? key = null, + }) { + return _then(_$SatisfiableItem_SchnorrSignatureImpl( + key: null == key + ? _value.key + : key // ignore: cast_nullable_to_non_nullable + as PkOrF, + )); + } + + @override + @pragma('vm:prefer-inline') + $PkOrFCopyWith<$Res> get key { + return $PkOrFCopyWith<$Res>(_value.key, (value) { + return _then(_value.copyWith(key: value)); + }); + } +} + +/// @nodoc + +class _$SatisfiableItem_SchnorrSignatureImpl + extends SatisfiableItem_SchnorrSignature { + const _$SatisfiableItem_SchnorrSignatureImpl({required this.key}) : super._(); + + @override + final PkOrF key; + + @override + String toString() { + return 'SatisfiableItem.schnorrSignature(key: $key)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_SchnorrSignatureImpl && + (identical(other.key, key) || other.key == key)); + } + + @override + int get hashCode => Object.hash(runtimeType, key); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_SchnorrSignatureImplCopyWith< + _$SatisfiableItem_SchnorrSignatureImpl> + get copyWith => __$$SatisfiableItem_SchnorrSignatureImplCopyWithImpl< + _$SatisfiableItem_SchnorrSignatureImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return schnorrSignature(key); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return schnorrSignature?.call(key); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (schnorrSignature != null) { + return schnorrSignature(key); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return schnorrSignature(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return schnorrSignature?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (schnorrSignature != null) { + return schnorrSignature(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_SchnorrSignature extends SatisfiableItem { + const factory SatisfiableItem_SchnorrSignature({required final PkOrF key}) = + _$SatisfiableItem_SchnorrSignatureImpl; + const SatisfiableItem_SchnorrSignature._() : super._(); + + PkOrF get key; + @JsonKey(ignore: true) + _$$SatisfiableItem_SchnorrSignatureImplCopyWith< + _$SatisfiableItem_SchnorrSignatureImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SatisfiableItem_Sha256PreimageImplCopyWith<$Res> { + factory _$$SatisfiableItem_Sha256PreimageImplCopyWith( + _$SatisfiableItem_Sha256PreimageImpl value, + $Res Function(_$SatisfiableItem_Sha256PreimageImpl) then) = + __$$SatisfiableItem_Sha256PreimageImplCopyWithImpl<$Res>; + @useResult + $Res call({String hash}); +} + +/// @nodoc +class __$$SatisfiableItem_Sha256PreimageImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, + _$SatisfiableItem_Sha256PreimageImpl> + implements _$$SatisfiableItem_Sha256PreimageImplCopyWith<$Res> { + __$$SatisfiableItem_Sha256PreimageImplCopyWithImpl( + _$SatisfiableItem_Sha256PreimageImpl _value, + $Res Function(_$SatisfiableItem_Sha256PreimageImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? hash = null, + }) { + return _then(_$SatisfiableItem_Sha256PreimageImpl( + hash: null == hash + ? _value.hash + : hash // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SatisfiableItem_Sha256PreimageImpl + extends SatisfiableItem_Sha256Preimage { + const _$SatisfiableItem_Sha256PreimageImpl({required this.hash}) : super._(); + + @override + final String hash; + + @override + String toString() { + return 'SatisfiableItem.sha256Preimage(hash: $hash)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_Sha256PreimageImpl && + (identical(other.hash, hash) || other.hash == hash)); + } + + @override + int get hashCode => Object.hash(runtimeType, hash); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_Sha256PreimageImplCopyWith< + _$SatisfiableItem_Sha256PreimageImpl> + get copyWith => __$$SatisfiableItem_Sha256PreimageImplCopyWithImpl< + _$SatisfiableItem_Sha256PreimageImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return sha256Preimage(hash); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return sha256Preimage?.call(hash); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (sha256Preimage != null) { + return sha256Preimage(hash); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return sha256Preimage(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return sha256Preimage?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (sha256Preimage != null) { + return sha256Preimage(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_Sha256Preimage extends SatisfiableItem { + const factory SatisfiableItem_Sha256Preimage({required final String hash}) = + _$SatisfiableItem_Sha256PreimageImpl; + const SatisfiableItem_Sha256Preimage._() : super._(); + + String get hash; + @JsonKey(ignore: true) + _$$SatisfiableItem_Sha256PreimageImplCopyWith< + _$SatisfiableItem_Sha256PreimageImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SatisfiableItem_Hash256PreimageImplCopyWith<$Res> { + factory _$$SatisfiableItem_Hash256PreimageImplCopyWith( + _$SatisfiableItem_Hash256PreimageImpl value, + $Res Function(_$SatisfiableItem_Hash256PreimageImpl) then) = + __$$SatisfiableItem_Hash256PreimageImplCopyWithImpl<$Res>; + @useResult + $Res call({String hash}); +} + +/// @nodoc +class __$$SatisfiableItem_Hash256PreimageImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, + _$SatisfiableItem_Hash256PreimageImpl> + implements _$$SatisfiableItem_Hash256PreimageImplCopyWith<$Res> { + __$$SatisfiableItem_Hash256PreimageImplCopyWithImpl( + _$SatisfiableItem_Hash256PreimageImpl _value, + $Res Function(_$SatisfiableItem_Hash256PreimageImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? hash = null, + }) { + return _then(_$SatisfiableItem_Hash256PreimageImpl( + hash: null == hash + ? _value.hash + : hash // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SatisfiableItem_Hash256PreimageImpl + extends SatisfiableItem_Hash256Preimage { + const _$SatisfiableItem_Hash256PreimageImpl({required this.hash}) : super._(); + + @override + final String hash; + + @override + String toString() { + return 'SatisfiableItem.hash256Preimage(hash: $hash)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_Hash256PreimageImpl && + (identical(other.hash, hash) || other.hash == hash)); + } + + @override + int get hashCode => Object.hash(runtimeType, hash); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_Hash256PreimageImplCopyWith< + _$SatisfiableItem_Hash256PreimageImpl> + get copyWith => __$$SatisfiableItem_Hash256PreimageImplCopyWithImpl< + _$SatisfiableItem_Hash256PreimageImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return hash256Preimage(hash); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return hash256Preimage?.call(hash); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (hash256Preimage != null) { + return hash256Preimage(hash); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return hash256Preimage(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return hash256Preimage?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (hash256Preimage != null) { + return hash256Preimage(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_Hash256Preimage extends SatisfiableItem { + const factory SatisfiableItem_Hash256Preimage({required final String hash}) = + _$SatisfiableItem_Hash256PreimageImpl; + const SatisfiableItem_Hash256Preimage._() : super._(); + + String get hash; + @JsonKey(ignore: true) + _$$SatisfiableItem_Hash256PreimageImplCopyWith< + _$SatisfiableItem_Hash256PreimageImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SatisfiableItem_Ripemd160PreimageImplCopyWith<$Res> { + factory _$$SatisfiableItem_Ripemd160PreimageImplCopyWith( + _$SatisfiableItem_Ripemd160PreimageImpl value, + $Res Function(_$SatisfiableItem_Ripemd160PreimageImpl) then) = + __$$SatisfiableItem_Ripemd160PreimageImplCopyWithImpl<$Res>; + @useResult + $Res call({String hash}); +} + +/// @nodoc +class __$$SatisfiableItem_Ripemd160PreimageImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, + _$SatisfiableItem_Ripemd160PreimageImpl> + implements _$$SatisfiableItem_Ripemd160PreimageImplCopyWith<$Res> { + __$$SatisfiableItem_Ripemd160PreimageImplCopyWithImpl( + _$SatisfiableItem_Ripemd160PreimageImpl _value, + $Res Function(_$SatisfiableItem_Ripemd160PreimageImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? hash = null, + }) { + return _then(_$SatisfiableItem_Ripemd160PreimageImpl( + hash: null == hash + ? _value.hash + : hash // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SatisfiableItem_Ripemd160PreimageImpl + extends SatisfiableItem_Ripemd160Preimage { + const _$SatisfiableItem_Ripemd160PreimageImpl({required this.hash}) + : super._(); + + @override + final String hash; + + @override + String toString() { + return 'SatisfiableItem.ripemd160Preimage(hash: $hash)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_Ripemd160PreimageImpl && + (identical(other.hash, hash) || other.hash == hash)); + } + + @override + int get hashCode => Object.hash(runtimeType, hash); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_Ripemd160PreimageImplCopyWith< + _$SatisfiableItem_Ripemd160PreimageImpl> + get copyWith => __$$SatisfiableItem_Ripemd160PreimageImplCopyWithImpl< + _$SatisfiableItem_Ripemd160PreimageImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return ripemd160Preimage(hash); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return ripemd160Preimage?.call(hash); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (ripemd160Preimage != null) { + return ripemd160Preimage(hash); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return ripemd160Preimage(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return ripemd160Preimage?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (ripemd160Preimage != null) { + return ripemd160Preimage(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_Ripemd160Preimage extends SatisfiableItem { + const factory SatisfiableItem_Ripemd160Preimage( + {required final String hash}) = _$SatisfiableItem_Ripemd160PreimageImpl; + const SatisfiableItem_Ripemd160Preimage._() : super._(); + + String get hash; + @JsonKey(ignore: true) + _$$SatisfiableItem_Ripemd160PreimageImplCopyWith< + _$SatisfiableItem_Ripemd160PreimageImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SatisfiableItem_Hash160PreimageImplCopyWith<$Res> { + factory _$$SatisfiableItem_Hash160PreimageImplCopyWith( + _$SatisfiableItem_Hash160PreimageImpl value, + $Res Function(_$SatisfiableItem_Hash160PreimageImpl) then) = + __$$SatisfiableItem_Hash160PreimageImplCopyWithImpl<$Res>; + @useResult + $Res call({String hash}); +} + +/// @nodoc +class __$$SatisfiableItem_Hash160PreimageImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, + _$SatisfiableItem_Hash160PreimageImpl> + implements _$$SatisfiableItem_Hash160PreimageImplCopyWith<$Res> { + __$$SatisfiableItem_Hash160PreimageImplCopyWithImpl( + _$SatisfiableItem_Hash160PreimageImpl _value, + $Res Function(_$SatisfiableItem_Hash160PreimageImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? hash = null, + }) { + return _then(_$SatisfiableItem_Hash160PreimageImpl( + hash: null == hash + ? _value.hash + : hash // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SatisfiableItem_Hash160PreimageImpl + extends SatisfiableItem_Hash160Preimage { + const _$SatisfiableItem_Hash160PreimageImpl({required this.hash}) : super._(); + + @override + final String hash; + + @override + String toString() { + return 'SatisfiableItem.hash160Preimage(hash: $hash)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_Hash160PreimageImpl && + (identical(other.hash, hash) || other.hash == hash)); + } + + @override + int get hashCode => Object.hash(runtimeType, hash); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_Hash160PreimageImplCopyWith< + _$SatisfiableItem_Hash160PreimageImpl> + get copyWith => __$$SatisfiableItem_Hash160PreimageImplCopyWithImpl< + _$SatisfiableItem_Hash160PreimageImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return hash160Preimage(hash); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return hash160Preimage?.call(hash); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (hash160Preimage != null) { + return hash160Preimage(hash); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return hash160Preimage(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return hash160Preimage?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (hash160Preimage != null) { + return hash160Preimage(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_Hash160Preimage extends SatisfiableItem { + const factory SatisfiableItem_Hash160Preimage({required final String hash}) = + _$SatisfiableItem_Hash160PreimageImpl; + const SatisfiableItem_Hash160Preimage._() : super._(); + + String get hash; + @JsonKey(ignore: true) + _$$SatisfiableItem_Hash160PreimageImplCopyWith< + _$SatisfiableItem_Hash160PreimageImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SatisfiableItem_AbsoluteTimelockImplCopyWith<$Res> { + factory _$$SatisfiableItem_AbsoluteTimelockImplCopyWith( + _$SatisfiableItem_AbsoluteTimelockImpl value, + $Res Function(_$SatisfiableItem_AbsoluteTimelockImpl) then) = + __$$SatisfiableItem_AbsoluteTimelockImplCopyWithImpl<$Res>; + @useResult + $Res call({LockTime value}); + + $LockTimeCopyWith<$Res> get value; +} + +/// @nodoc +class __$$SatisfiableItem_AbsoluteTimelockImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, + _$SatisfiableItem_AbsoluteTimelockImpl> + implements _$$SatisfiableItem_AbsoluteTimelockImplCopyWith<$Res> { + __$$SatisfiableItem_AbsoluteTimelockImplCopyWithImpl( + _$SatisfiableItem_AbsoluteTimelockImpl _value, + $Res Function(_$SatisfiableItem_AbsoluteTimelockImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? value = null, + }) { + return _then(_$SatisfiableItem_AbsoluteTimelockImpl( + value: null == value + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as LockTime, + )); + } + + @override + @pragma('vm:prefer-inline') + $LockTimeCopyWith<$Res> get value { + return $LockTimeCopyWith<$Res>(_value.value, (value) { + return _then(_value.copyWith(value: value)); + }); + } +} + +/// @nodoc + +class _$SatisfiableItem_AbsoluteTimelockImpl + extends SatisfiableItem_AbsoluteTimelock { + const _$SatisfiableItem_AbsoluteTimelockImpl({required this.value}) + : super._(); + + @override + final LockTime value; + + @override + String toString() { + return 'SatisfiableItem.absoluteTimelock(value: $value)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_AbsoluteTimelockImpl && + (identical(other.value, value) || other.value == value)); + } + + @override + int get hashCode => Object.hash(runtimeType, value); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_AbsoluteTimelockImplCopyWith< + _$SatisfiableItem_AbsoluteTimelockImpl> + get copyWith => __$$SatisfiableItem_AbsoluteTimelockImplCopyWithImpl< + _$SatisfiableItem_AbsoluteTimelockImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return absoluteTimelock(value); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return absoluteTimelock?.call(value); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (absoluteTimelock != null) { + return absoluteTimelock(value); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return absoluteTimelock(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return absoluteTimelock?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (absoluteTimelock != null) { + return absoluteTimelock(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_AbsoluteTimelock extends SatisfiableItem { + const factory SatisfiableItem_AbsoluteTimelock( + {required final LockTime value}) = _$SatisfiableItem_AbsoluteTimelockImpl; + const SatisfiableItem_AbsoluteTimelock._() : super._(); + + LockTime get value; + @JsonKey(ignore: true) + _$$SatisfiableItem_AbsoluteTimelockImplCopyWith< + _$SatisfiableItem_AbsoluteTimelockImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SatisfiableItem_RelativeTimelockImplCopyWith<$Res> { + factory _$$SatisfiableItem_RelativeTimelockImplCopyWith( + _$SatisfiableItem_RelativeTimelockImpl value, + $Res Function(_$SatisfiableItem_RelativeTimelockImpl) then) = + __$$SatisfiableItem_RelativeTimelockImplCopyWithImpl<$Res>; + @useResult + $Res call({int value}); +} + +/// @nodoc +class __$$SatisfiableItem_RelativeTimelockImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, + _$SatisfiableItem_RelativeTimelockImpl> + implements _$$SatisfiableItem_RelativeTimelockImplCopyWith<$Res> { + __$$SatisfiableItem_RelativeTimelockImplCopyWithImpl( + _$SatisfiableItem_RelativeTimelockImpl _value, + $Res Function(_$SatisfiableItem_RelativeTimelockImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? value = null, + }) { + return _then(_$SatisfiableItem_RelativeTimelockImpl( + value: null == value + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$SatisfiableItem_RelativeTimelockImpl + extends SatisfiableItem_RelativeTimelock { + const _$SatisfiableItem_RelativeTimelockImpl({required this.value}) + : super._(); + + @override + final int value; + + @override + String toString() { + return 'SatisfiableItem.relativeTimelock(value: $value)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_RelativeTimelockImpl && + (identical(other.value, value) || other.value == value)); + } + + @override + int get hashCode => Object.hash(runtimeType, value); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_RelativeTimelockImplCopyWith< + _$SatisfiableItem_RelativeTimelockImpl> + get copyWith => __$$SatisfiableItem_RelativeTimelockImplCopyWithImpl< + _$SatisfiableItem_RelativeTimelockImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return relativeTimelock(value); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return relativeTimelock?.call(value); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (relativeTimelock != null) { + return relativeTimelock(value); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return relativeTimelock(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return relativeTimelock?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (relativeTimelock != null) { + return relativeTimelock(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_RelativeTimelock extends SatisfiableItem { + const factory SatisfiableItem_RelativeTimelock({required final int value}) = + _$SatisfiableItem_RelativeTimelockImpl; + const SatisfiableItem_RelativeTimelock._() : super._(); + + int get value; + @JsonKey(ignore: true) + _$$SatisfiableItem_RelativeTimelockImplCopyWith< + _$SatisfiableItem_RelativeTimelockImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SatisfiableItem_MultisigImplCopyWith<$Res> { + factory _$$SatisfiableItem_MultisigImplCopyWith( + _$SatisfiableItem_MultisigImpl value, + $Res Function(_$SatisfiableItem_MultisigImpl) then) = + __$$SatisfiableItem_MultisigImplCopyWithImpl<$Res>; + @useResult + $Res call({List keys, BigInt threshold}); +} + +/// @nodoc +class __$$SatisfiableItem_MultisigImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, _$SatisfiableItem_MultisigImpl> + implements _$$SatisfiableItem_MultisigImplCopyWith<$Res> { + __$$SatisfiableItem_MultisigImplCopyWithImpl( + _$SatisfiableItem_MultisigImpl _value, + $Res Function(_$SatisfiableItem_MultisigImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? keys = null, + Object? threshold = null, + }) { + return _then(_$SatisfiableItem_MultisigImpl( + keys: null == keys + ? _value._keys + : keys // ignore: cast_nullable_to_non_nullable + as List, + threshold: null == threshold + ? _value.threshold + : threshold // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$SatisfiableItem_MultisigImpl extends SatisfiableItem_Multisig { + const _$SatisfiableItem_MultisigImpl( + {required final List keys, required this.threshold}) + : _keys = keys, + super._(); + + final List _keys; + @override + List get keys { + if (_keys is EqualUnmodifiableListView) return _keys; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_keys); + } + + @override + final BigInt threshold; + + @override + String toString() { + return 'SatisfiableItem.multisig(keys: $keys, threshold: $threshold)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_MultisigImpl && + const DeepCollectionEquality().equals(other._keys, _keys) && + (identical(other.threshold, threshold) || + other.threshold == threshold)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(_keys), threshold); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_MultisigImplCopyWith<_$SatisfiableItem_MultisigImpl> + get copyWith => __$$SatisfiableItem_MultisigImplCopyWithImpl< + _$SatisfiableItem_MultisigImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return multisig(keys, threshold); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return multisig?.call(keys, threshold); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (multisig != null) { + return multisig(keys, threshold); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return multisig(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return multisig?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (multisig != null) { + return multisig(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_Multisig extends SatisfiableItem { + const factory SatisfiableItem_Multisig( + {required final List keys, + required final BigInt threshold}) = _$SatisfiableItem_MultisigImpl; + const SatisfiableItem_Multisig._() : super._(); + + List get keys; + BigInt get threshold; + @JsonKey(ignore: true) + _$$SatisfiableItem_MultisigImplCopyWith<_$SatisfiableItem_MultisigImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SatisfiableItem_ThreshImplCopyWith<$Res> { + factory _$$SatisfiableItem_ThreshImplCopyWith( + _$SatisfiableItem_ThreshImpl value, + $Res Function(_$SatisfiableItem_ThreshImpl) then) = + __$$SatisfiableItem_ThreshImplCopyWithImpl<$Res>; + @useResult + $Res call({List items, BigInt threshold}); +} + +/// @nodoc +class __$$SatisfiableItem_ThreshImplCopyWithImpl<$Res> + extends _$SatisfiableItemCopyWithImpl<$Res, _$SatisfiableItem_ThreshImpl> + implements _$$SatisfiableItem_ThreshImplCopyWith<$Res> { + __$$SatisfiableItem_ThreshImplCopyWithImpl( + _$SatisfiableItem_ThreshImpl _value, + $Res Function(_$SatisfiableItem_ThreshImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? items = null, + Object? threshold = null, + }) { + return _then(_$SatisfiableItem_ThreshImpl( + items: null == items + ? _value._items + : items // ignore: cast_nullable_to_non_nullable + as List, + threshold: null == threshold + ? _value.threshold + : threshold // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$SatisfiableItem_ThreshImpl extends SatisfiableItem_Thresh { + const _$SatisfiableItem_ThreshImpl( + {required final List items, required this.threshold}) + : _items = items, + super._(); + + final List _items; + @override + List get items { + if (_items is EqualUnmodifiableListView) return _items; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_items); + } + + @override + final BigInt threshold; + + @override + String toString() { + return 'SatisfiableItem.thresh(items: $items, threshold: $threshold)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SatisfiableItem_ThreshImpl && + const DeepCollectionEquality().equals(other._items, _items) && + (identical(other.threshold, threshold) || + other.threshold == threshold)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(_items), threshold); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SatisfiableItem_ThreshImplCopyWith<_$SatisfiableItem_ThreshImpl> + get copyWith => __$$SatisfiableItem_ThreshImplCopyWithImpl< + _$SatisfiableItem_ThreshImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(PkOrF key) ecdsaSignature, + required TResult Function(PkOrF key) schnorrSignature, + required TResult Function(String hash) sha256Preimage, + required TResult Function(String hash) hash256Preimage, + required TResult Function(String hash) ripemd160Preimage, + required TResult Function(String hash) hash160Preimage, + required TResult Function(LockTime value) absoluteTimelock, + required TResult Function(int value) relativeTimelock, + required TResult Function(List keys, BigInt threshold) multisig, + required TResult Function(List items, BigInt threshold) thresh, + }) { + return thresh(items, threshold); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(PkOrF key)? ecdsaSignature, + TResult? Function(PkOrF key)? schnorrSignature, + TResult? Function(String hash)? sha256Preimage, + TResult? Function(String hash)? hash256Preimage, + TResult? Function(String hash)? ripemd160Preimage, + TResult? Function(String hash)? hash160Preimage, + TResult? Function(LockTime value)? absoluteTimelock, + TResult? Function(int value)? relativeTimelock, + TResult? Function(List keys, BigInt threshold)? multisig, + TResult? Function(List items, BigInt threshold)? thresh, + }) { + return thresh?.call(items, threshold); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(PkOrF key)? ecdsaSignature, + TResult Function(PkOrF key)? schnorrSignature, + TResult Function(String hash)? sha256Preimage, + TResult Function(String hash)? hash256Preimage, + TResult Function(String hash)? ripemd160Preimage, + TResult Function(String hash)? hash160Preimage, + TResult Function(LockTime value)? absoluteTimelock, + TResult Function(int value)? relativeTimelock, + TResult Function(List keys, BigInt threshold)? multisig, + TResult Function(List items, BigInt threshold)? thresh, + required TResult orElse(), + }) { + if (thresh != null) { + return thresh(items, threshold); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SatisfiableItem_EcdsaSignature value) + ecdsaSignature, + required TResult Function(SatisfiableItem_SchnorrSignature value) + schnorrSignature, + required TResult Function(SatisfiableItem_Sha256Preimage value) + sha256Preimage, + required TResult Function(SatisfiableItem_Hash256Preimage value) + hash256Preimage, + required TResult Function(SatisfiableItem_Ripemd160Preimage value) + ripemd160Preimage, + required TResult Function(SatisfiableItem_Hash160Preimage value) + hash160Preimage, + required TResult Function(SatisfiableItem_AbsoluteTimelock value) + absoluteTimelock, + required TResult Function(SatisfiableItem_RelativeTimelock value) + relativeTimelock, + required TResult Function(SatisfiableItem_Multisig value) multisig, + required TResult Function(SatisfiableItem_Thresh value) thresh, + }) { + return thresh(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult? Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult? Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult? Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult? Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult? Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult? Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult? Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult? Function(SatisfiableItem_Multisig value)? multisig, + TResult? Function(SatisfiableItem_Thresh value)? thresh, + }) { + return thresh?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SatisfiableItem_EcdsaSignature value)? ecdsaSignature, + TResult Function(SatisfiableItem_SchnorrSignature value)? schnorrSignature, + TResult Function(SatisfiableItem_Sha256Preimage value)? sha256Preimage, + TResult Function(SatisfiableItem_Hash256Preimage value)? hash256Preimage, + TResult Function(SatisfiableItem_Ripemd160Preimage value)? + ripemd160Preimage, + TResult Function(SatisfiableItem_Hash160Preimage value)? hash160Preimage, + TResult Function(SatisfiableItem_AbsoluteTimelock value)? absoluteTimelock, + TResult Function(SatisfiableItem_RelativeTimelock value)? relativeTimelock, + TResult Function(SatisfiableItem_Multisig value)? multisig, + TResult Function(SatisfiableItem_Thresh value)? thresh, + required TResult orElse(), + }) { + if (thresh != null) { + return thresh(this); + } + return orElse(); + } +} + +abstract class SatisfiableItem_Thresh extends SatisfiableItem { + const factory SatisfiableItem_Thresh( + {required final List items, + required final BigInt threshold}) = _$SatisfiableItem_ThreshImpl; + const SatisfiableItem_Thresh._() : super._(); + + List get items; + BigInt get threshold; + @JsonKey(ignore: true) + _$$SatisfiableItem_ThreshImplCopyWith<_$SatisfiableItem_ThreshImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/lib/src/generated/api/wallet.dart b/lib/src/generated/api/wallet.dart new file mode 100644 index 00000000..e3a5ff39 --- /dev/null +++ b/lib/src/generated/api/wallet.dart @@ -0,0 +1,181 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'blockchain.dart'; +import 'descriptor.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'psbt.dart'; +import 'types.dart'; + +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt` + +Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( + {required String txid, + required double feeRate, + BdkAddress? allowShrinking, + required BdkWallet wallet, + required bool enableRbf, + int? nSequence}) => + core.instance.api.crateApiWalletFinishBumpFeeTxBuilder( + txid: txid, + feeRate: feeRate, + allowShrinking: allowShrinking, + wallet: wallet, + enableRbf: enableRbf, + nSequence: nSequence); + +Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( + {required BdkWallet wallet, + required List recipients, + required List utxos, + (OutPoint, Input, BigInt)? foreignUtxo, + required List unSpendable, + required ChangeSpendPolicy changePolicy, + required bool manuallySelectedOnly, + double? feeRate, + BigInt? feeAbsolute, + required bool drainWallet, + BdkScriptBuf? drainTo, + RbfValue? rbf, + Map? internalPolicyPath, + Map? externalPolicyPath, + required List data}) => + core.instance.api.crateApiWalletTxBuilderFinish( + wallet: wallet, + recipients: recipients, + utxos: utxos, + foreignUtxo: foreignUtxo, + unSpendable: unSpendable, + changePolicy: changePolicy, + manuallySelectedOnly: manuallySelectedOnly, + feeRate: feeRate, + feeAbsolute: feeAbsolute, + drainWallet: drainWallet, + drainTo: drainTo, + rbf: rbf, + internalPolicyPath: internalPolicyPath, + externalPolicyPath: externalPolicyPath, + data: data); + +class BdkWallet { + final MutexWalletAnyDatabase ptr; + + const BdkWallet({ + required this.ptr, + }); + + /// Return a derived address using the external descriptor, see AddressIndex for available address index selection + /// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) + /// then the same address will always be returned for any AddressIndex. + static (BdkAddress, int) getAddress( + {required BdkWallet ptr, required AddressIndex addressIndex}) => + core.instance.api.crateApiWalletBdkWalletGetAddress( + ptr: ptr, addressIndex: addressIndex); + + /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates + /// on the internal database, which first needs to be Wallet.sync manually. + Balance getBalance() => core.instance.api.crateApiWalletBdkWalletGetBalance( + that: this, + ); + + ///Returns the descriptor used to create addresses for a particular keychain. + static BdkDescriptor getDescriptorForKeychain( + {required BdkWallet ptr, required KeychainKind keychain}) => + core.instance.api.crateApiWalletBdkWalletGetDescriptorForKeychain( + ptr: ptr, keychain: keychain); + + /// Return a derived address using the internal (change) descriptor. + /// + /// If the wallet doesn't have an internal descriptor it will use the external descriptor. + /// + /// see [AddressIndex] for available address index selection strategies. If none of the keys + /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always + /// be returned for any [AddressIndex]. + static (BdkAddress, int) getInternalAddress( + {required BdkWallet ptr, required AddressIndex addressIndex}) => + core.instance.api.crateApiWalletBdkWalletGetInternalAddress( + ptr: ptr, addressIndex: addressIndex); + + ///get the corresponding PSBT Input for a LocalUtxo + Future getPsbtInput( + {required LocalUtxo utxo, + required bool onlyWitnessUtxo, + PsbtSigHashType? sighashType}) => + core.instance.api.crateApiWalletBdkWalletGetPsbtInput( + that: this, + utxo: utxo, + onlyWitnessUtxo: onlyWitnessUtxo, + sighashType: sighashType); + + static bool isMine({required BdkWallet ptr, required BdkScriptBuf script}) => + core.instance.api.crateApiWalletBdkWalletIsMine(ptr: ptr, script: script); + + /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. + List listTransactions({required bool includeRaw}) => + core.instance.api.crateApiWalletBdkWalletListTransactions( + that: this, includeRaw: includeRaw); + + /// Return the list of unspent outputs of this wallet. Note that this method only operates on the internal database, + /// which first needs to be Wallet.sync manually. + List listUnspent() => + core.instance.api.crateApiWalletBdkWalletListUnspent( + that: this, + ); + + /// Get the Bitcoin network the wallet is using. + Network network() => core.instance.api.crateApiWalletBdkWalletNetwork( + that: this, + ); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance( + {required BdkDescriptor descriptor, + BdkDescriptor? changeDescriptor, + required Network network, + required DatabaseConfig databaseConfig}) => + core.instance.api.crateApiWalletBdkWalletNew( + descriptor: descriptor, + changeDescriptor: changeDescriptor, + network: network, + databaseConfig: databaseConfig); + + static BdkPolicy? policies( + {required BdkWallet ptr, required KeychainKind keychain}) => + core.instance.api + .crateApiWalletBdkWalletPolicies(ptr: ptr, keychain: keychain); + + /// Sign a transaction with all the wallet's signers. This function returns an encapsulated bool that + /// has the value true if the PSBT was finalized, or false otherwise. + /// + /// The [SignOptions] can be used to tweak the behavior of the software signers, and the way + /// the transaction is finalized at the end. Note that it can't be guaranteed that *every* + /// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined + /// in this library will. + static Future sign( + {required BdkWallet ptr, + required BdkPsbt psbt, + SignOptions? signOptions}) => + core.instance.api.crateApiWalletBdkWalletSign( + ptr: ptr, psbt: psbt, signOptions: signOptions); + + /// Sync the internal database with the blockchain. + static Future sync( + {required BdkWallet ptr, required BdkBlockchain blockchain}) => + core.instance.api + .crateApiWalletBdkWalletSync(ptr: ptr, blockchain: blockchain); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkWallet && + runtimeType == other.runtimeType && + ptr == other.ptr; +} diff --git a/lib/src/generated/frb_generated.dart b/lib/src/generated/frb_generated.dart new file mode 100644 index 00000000..8d2b34e9 --- /dev/null +++ b/lib/src/generated/frb_generated.dart @@ -0,0 +1,8595 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field + +import 'api/blockchain.dart'; +import 'api/descriptor.dart'; +import 'api/error.dart'; +import 'api/key.dart'; +import 'api/psbt.dart'; +import 'api/types.dart'; +import 'api/wallet.dart'; +import 'dart:async'; +import 'dart:convert'; +import 'frb_generated.dart'; +import 'frb_generated.io.dart' + if (dart.library.js_interop) 'frb_generated.web.dart'; +import 'lib.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +/// Main entrypoint of the Rust API +class core extends BaseEntrypoint { + @internal + static final instance = core._(); + + core._(); + + /// Initialize flutter_rust_bridge + static Future init({ + coreApi? api, + BaseHandler? handler, + ExternalLibrary? externalLibrary, + }) async { + await instance.initImpl( + api: api, + handler: handler, + externalLibrary: externalLibrary, + ); + } + + /// Dispose flutter_rust_bridge + /// + /// The call to this function is optional, since flutter_rust_bridge (and everything else) + /// is automatically disposed when the app stops. + static void dispose() => instance.disposeImpl(); + + @override + ApiImplConstructor get apiImplConstructor => + coreApiImpl.new; + + @override + WireConstructor get wireConstructor => coreWire.fromExternalLibrary; + + @override + Future executeRustInitializers() async {} + + @override + ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => + kDefaultExternalLibraryLoaderConfig; + + @override + String get codegenVersion => '2.0.0'; + + @override + int get rustContentHash => -321771070; + + static const kDefaultExternalLibraryLoaderConfig = + ExternalLibraryLoaderConfig( + stem: 'bdk_flutter', + ioDirectory: 'rust/target/release/', + webPrefix: 'pkg/', + ); +} + +abstract class coreApi extends BaseApi { + Future crateApiBlockchainBdkBlockchainBroadcast( + {required BdkBlockchain ptr, required BdkTransaction transaction}); + + Future crateApiBlockchainBdkBlockchainCreate( + {required BlockchainConfig blockchainConfig}); + + Future crateApiBlockchainBdkBlockchainEstimateFee( + {required BdkBlockchain that, required BigInt target}); + + Future crateApiBlockchainBdkBlockchainGetBlockHash( + {required BdkBlockchain that, required int height}); + + Future crateApiBlockchainBdkBlockchainGetHeight( + {required BdkBlockchain that}); + + String crateApiDescriptorBdkDescriptorAsString({required BdkDescriptor that}); + + BigInt crateApiDescriptorBdkDescriptorMaxSatisfactionWeight( + {required BdkDescriptor that}); + + Future crateApiDescriptorBdkDescriptorNew( + {required String descriptor, required Network network}); + + Future crateApiDescriptorBdkDescriptorNewBip44( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}); + + Future crateApiDescriptorBdkDescriptorNewBip44Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}); + + Future crateApiDescriptorBdkDescriptorNewBip49( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}); + + Future crateApiDescriptorBdkDescriptorNewBip49Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}); + + Future crateApiDescriptorBdkDescriptorNewBip84( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}); + + Future crateApiDescriptorBdkDescriptorNewBip84Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}); + + Future crateApiDescriptorBdkDescriptorNewBip86( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}); + + Future crateApiDescriptorBdkDescriptorNewBip86Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}); + + String crateApiDescriptorBdkDescriptorToStringPrivate( + {required BdkDescriptor that}); + + String crateApiKeyBdkDerivationPathAsString( + {required BdkDerivationPath that}); + + Future crateApiKeyBdkDerivationPathFromString( + {required String path}); + + String crateApiKeyBdkDescriptorPublicKeyAsString( + {required BdkDescriptorPublicKey that}); + + Future crateApiKeyBdkDescriptorPublicKeyDerive( + {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}); + + Future crateApiKeyBdkDescriptorPublicKeyExtend( + {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}); + + Future crateApiKeyBdkDescriptorPublicKeyFromString( + {required String publicKey}); + + BdkDescriptorPublicKey crateApiKeyBdkDescriptorSecretKeyAsPublic( + {required BdkDescriptorSecretKey ptr}); + + String crateApiKeyBdkDescriptorSecretKeyAsString( + {required BdkDescriptorSecretKey that}); + + Future crateApiKeyBdkDescriptorSecretKeyCreate( + {required Network network, + required BdkMnemonic mnemonic, + String? password}); + + Future crateApiKeyBdkDescriptorSecretKeyDerive( + {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}); + + Future crateApiKeyBdkDescriptorSecretKeyExtend( + {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}); + + Future crateApiKeyBdkDescriptorSecretKeyFromString( + {required String secretKey}); + + Uint8List crateApiKeyBdkDescriptorSecretKeySecretBytes( + {required BdkDescriptorSecretKey that}); + + String crateApiKeyBdkMnemonicAsString({required BdkMnemonic that}); + + Future crateApiKeyBdkMnemonicFromEntropy( + {required List entropy}); + + Future crateApiKeyBdkMnemonicFromString( + {required String mnemonic}); + + Future crateApiKeyBdkMnemonicNew({required WordCount wordCount}); + + String crateApiPsbtBdkPsbtAsString({required BdkPsbt that}); + + Future crateApiPsbtBdkPsbtCombine( + {required BdkPsbt ptr, required BdkPsbt other}); + + BdkTransaction crateApiPsbtBdkPsbtExtractTx({required BdkPsbt ptr}); + + BigInt? crateApiPsbtBdkPsbtFeeAmount({required BdkPsbt that}); + + FeeRate? crateApiPsbtBdkPsbtFeeRate({required BdkPsbt that}); + + Future crateApiPsbtBdkPsbtFromStr({required String psbtBase64}); + + String crateApiPsbtBdkPsbtJsonSerialize({required BdkPsbt that}); + + Uint8List crateApiPsbtBdkPsbtSerialize({required BdkPsbt that}); + + String crateApiPsbtBdkPsbtTxid({required BdkPsbt that}); + + String crateApiTypesBdkAddressAsString({required BdkAddress that}); + + Future crateApiTypesBdkAddressFromScript( + {required BdkScriptBuf script, required Network network}); + + Future crateApiTypesBdkAddressFromString( + {required String address, required Network network}); + + bool crateApiTypesBdkAddressIsValidForNetwork( + {required BdkAddress that, required Network network}); + + Network crateApiTypesBdkAddressNetwork({required BdkAddress that}); + + Payload crateApiTypesBdkAddressPayload({required BdkAddress that}); + + BdkScriptBuf crateApiTypesBdkAddressScript({required BdkAddress ptr}); + + String crateApiTypesBdkAddressToQrUri({required BdkAddress that}); + + String crateApiTypesBdkPolicyAsString({required BdkPolicy that}); + + Satisfaction crateApiTypesBdkPolicyContribution({required BdkPolicy that}); + + String crateApiTypesBdkPolicyId({required BdkPolicy that}); + + SatisfiableItem crateApiTypesBdkPolicyItem({required BdkPolicy that}); + + bool crateApiTypesBdkPolicyRequiresPath({required BdkPolicy that}); + + Satisfaction crateApiTypesBdkPolicySatisfaction({required BdkPolicy that}); + + String crateApiTypesBdkScriptBufAsString({required BdkScriptBuf that}); + + BdkScriptBuf crateApiTypesBdkScriptBufEmpty(); + + Future crateApiTypesBdkScriptBufFromHex({required String s}); + + Future crateApiTypesBdkScriptBufWithCapacity( + {required BigInt capacity}); + + Future crateApiTypesBdkTransactionFromBytes( + {required List transactionBytes}); + + Future> crateApiTypesBdkTransactionInput( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionIsCoinBase( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionIsExplicitlyRbf( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionIsLockTimeEnabled( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionLockTime( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionNew( + {required int version, + required LockTime lockTime, + required List input, + required List output}); + + Future> crateApiTypesBdkTransactionOutput( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionSerialize( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionSize( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionTxid( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionVersion( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionVsize( + {required BdkTransaction that}); + + Future crateApiTypesBdkTransactionWeight( + {required BdkTransaction that}); + + (BdkAddress, int) crateApiWalletBdkWalletGetAddress( + {required BdkWallet ptr, required AddressIndex addressIndex}); + + Balance crateApiWalletBdkWalletGetBalance({required BdkWallet that}); + + BdkDescriptor crateApiWalletBdkWalletGetDescriptorForKeychain( + {required BdkWallet ptr, required KeychainKind keychain}); + + (BdkAddress, int) crateApiWalletBdkWalletGetInternalAddress( + {required BdkWallet ptr, required AddressIndex addressIndex}); + + Future crateApiWalletBdkWalletGetPsbtInput( + {required BdkWallet that, + required LocalUtxo utxo, + required bool onlyWitnessUtxo, + PsbtSigHashType? sighashType}); + + bool crateApiWalletBdkWalletIsMine( + {required BdkWallet ptr, required BdkScriptBuf script}); + + List crateApiWalletBdkWalletListTransactions( + {required BdkWallet that, required bool includeRaw}); + + List crateApiWalletBdkWalletListUnspent({required BdkWallet that}); + + Network crateApiWalletBdkWalletNetwork({required BdkWallet that}); + + Future crateApiWalletBdkWalletNew( + {required BdkDescriptor descriptor, + BdkDescriptor? changeDescriptor, + required Network network, + required DatabaseConfig databaseConfig}); + + BdkPolicy? crateApiWalletBdkWalletPolicies( + {required BdkWallet ptr, required KeychainKind keychain}); + + Future crateApiWalletBdkWalletSign( + {required BdkWallet ptr, + required BdkPsbt psbt, + SignOptions? signOptions}); + + Future crateApiWalletBdkWalletSync( + {required BdkWallet ptr, required BdkBlockchain blockchain}); + + Future<(BdkPsbt, TransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder( + {required String txid, + required double feeRate, + BdkAddress? allowShrinking, + required BdkWallet wallet, + required bool enableRbf, + int? nSequence}); + + Future<(BdkPsbt, TransactionDetails)> crateApiWalletTxBuilderFinish( + {required BdkWallet wallet, + required List recipients, + required List utxos, + (OutPoint, Input, BigInt)? foreignUtxo, + required List unSpendable, + required ChangeSpendPolicy changePolicy, + required bool manuallySelectedOnly, + double? feeRate, + BigInt? feeAbsolute, + required bool drainWallet, + BdkScriptBuf? drainTo, + RbfValue? rbf, + Map? internalPolicyPath, + Map? externalPolicyPath, + required List data}); + + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Address; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Address; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AddressPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_DerivationPath; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_DerivationPath; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_DerivationPathPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_AnyBlockchain; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_AnyBlockchain; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_AnyBlockchainPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ExtendedDescriptor; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ExtendedDescriptor; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ExtendedDescriptorPtr; + + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Policy; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Policy; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_PolicyPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_DescriptorPublicKey; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_DescriptorPublicKey; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_DescriptorPublicKeyPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_DescriptorSecretKey; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_DescriptorSecretKey; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_DescriptorSecretKeyPtr; + + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_KeyMap; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_KeyMap; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeyMapPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Mnemonic; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Mnemonic; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MnemonicPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexWalletAnyDatabase; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexWalletAnyDatabase; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexWalletAnyDatabasePtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexPartiallySignedTransaction; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr; +} + +class coreApiImpl extends coreApiImplPlatform implements coreApi { + coreApiImpl({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + @override + Future crateApiBlockchainBdkBlockchainBroadcast( + {required BdkBlockchain ptr, required BdkTransaction transaction}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_blockchain(ptr); + var arg1 = cst_encode_box_autoadd_bdk_transaction(transaction); + return wire.wire__crate__api__blockchain__bdk_blockchain_broadcast( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiBlockchainBdkBlockchainBroadcastConstMeta, + argValues: [ptr, transaction], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiBlockchainBdkBlockchainBroadcastConstMeta => + const TaskConstMeta( + debugName: "bdk_blockchain_broadcast", + argNames: ["ptr", "transaction"], + ); + + @override + Future crateApiBlockchainBdkBlockchainCreate( + {required BlockchainConfig blockchainConfig}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_blockchain_config(blockchainConfig); + return wire.wire__crate__api__blockchain__bdk_blockchain_create( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_blockchain, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiBlockchainBdkBlockchainCreateConstMeta, + argValues: [blockchainConfig], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiBlockchainBdkBlockchainCreateConstMeta => + const TaskConstMeta( + debugName: "bdk_blockchain_create", + argNames: ["blockchainConfig"], + ); + + @override + Future crateApiBlockchainBdkBlockchainEstimateFee( + {required BdkBlockchain that, required BigInt target}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); + var arg1 = cst_encode_u_64(target); + return wire.wire__crate__api__blockchain__bdk_blockchain_estimate_fee( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_fee_rate, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiBlockchainBdkBlockchainEstimateFeeConstMeta, + argValues: [that, target], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiBlockchainBdkBlockchainEstimateFeeConstMeta => + const TaskConstMeta( + debugName: "bdk_blockchain_estimate_fee", + argNames: ["that", "target"], + ); + + @override + Future crateApiBlockchainBdkBlockchainGetBlockHash( + {required BdkBlockchain that, required int height}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); + var arg1 = cst_encode_u_32(height); + return wire.wire__crate__api__blockchain__bdk_blockchain_get_block_hash( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiBlockchainBdkBlockchainGetBlockHashConstMeta, + argValues: [that, height], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiBlockchainBdkBlockchainGetBlockHashConstMeta => + const TaskConstMeta( + debugName: "bdk_blockchain_get_block_hash", + argNames: ["that", "height"], + ); + + @override + Future crateApiBlockchainBdkBlockchainGetHeight( + {required BdkBlockchain that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); + return wire.wire__crate__api__blockchain__bdk_blockchain_get_height( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_32, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiBlockchainBdkBlockchainGetHeightConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiBlockchainBdkBlockchainGetHeightConstMeta => + const TaskConstMeta( + debugName: "bdk_blockchain_get_height", + argNames: ["that"], + ); + + @override + String crateApiDescriptorBdkDescriptorAsString( + {required BdkDescriptor that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + return wire + .wire__crate__api__descriptor__bdk_descriptor_as_string(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiDescriptorBdkDescriptorAsStringConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_as_string", + argNames: ["that"], + ); + + @override + BigInt crateApiDescriptorBdkDescriptorMaxSatisfactionWeight( + {required BdkDescriptor that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + return wire + .wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( + arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_usize, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorMaxSatisfactionWeightConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiDescriptorBdkDescriptorMaxSatisfactionWeightConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_max_satisfaction_weight", + argNames: ["that"], + ); + + @override + Future crateApiDescriptorBdkDescriptorNew( + {required String descriptor, required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(descriptor); + var arg1 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__bdk_descriptor_new( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorNewConstMeta, + argValues: [descriptor, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new", + argNames: ["descriptor", "network"], + ); + + @override + Future crateApiDescriptorBdkDescriptorNewBip44( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); + var arg1 = cst_encode_keychain_kind(keychainKind); + var arg2 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip44( + port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorNewBip44ConstMeta, + argValues: [secretKey, keychainKind, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip44ConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip44", + argNames: ["secretKey", "keychainKind", "network"], + ); + + @override + Future crateApiDescriptorBdkDescriptorNewBip44Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); + var arg1 = cst_encode_String(fingerprint); + var arg2 = cst_encode_keychain_kind(keychainKind); + var arg3 = cst_encode_network(network); + return wire + .wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorNewBip44PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip44PublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip44_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + ); + + @override + Future crateApiDescriptorBdkDescriptorNewBip49( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); + var arg1 = cst_encode_keychain_kind(keychainKind); + var arg2 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip49( + port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorNewBip49ConstMeta, + argValues: [secretKey, keychainKind, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip49ConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip49", + argNames: ["secretKey", "keychainKind", "network"], + ); + + @override + Future crateApiDescriptorBdkDescriptorNewBip49Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); + var arg1 = cst_encode_String(fingerprint); + var arg2 = cst_encode_keychain_kind(keychainKind); + var arg3 = cst_encode_network(network); + return wire + .wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorNewBip49PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip49PublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip49_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + ); + + @override + Future crateApiDescriptorBdkDescriptorNewBip84( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); + var arg1 = cst_encode_keychain_kind(keychainKind); + var arg2 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip84( + port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorNewBip84ConstMeta, + argValues: [secretKey, keychainKind, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip84ConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip84", + argNames: ["secretKey", "keychainKind", "network"], + ); + + @override + Future crateApiDescriptorBdkDescriptorNewBip84Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); + var arg1 = cst_encode_String(fingerprint); + var arg2 = cst_encode_keychain_kind(keychainKind); + var arg3 = cst_encode_network(network); + return wire + .wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorNewBip84PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip84PublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip84_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + ); + + @override + Future crateApiDescriptorBdkDescriptorNewBip86( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); + var arg1 = cst_encode_keychain_kind(keychainKind); + var arg2 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip86( + port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorNewBip86ConstMeta, + argValues: [secretKey, keychainKind, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip86ConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip86", + argNames: ["secretKey", "keychainKind", "network"], + ); + + @override + Future crateApiDescriptorBdkDescriptorNewBip86Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); + var arg1 = cst_encode_String(fingerprint); + var arg2 = cst_encode_keychain_kind(keychainKind); + var arg3 = cst_encode_network(network); + return wire + .wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiDescriptorBdkDescriptorNewBip86PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip86PublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip86_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + ); + + @override + String crateApiDescriptorBdkDescriptorToStringPrivate( + {required BdkDescriptor that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + return wire + .wire__crate__api__descriptor__bdk_descriptor_to_string_private( + arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiDescriptorBdkDescriptorToStringPrivateConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiDescriptorBdkDescriptorToStringPrivateConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_to_string_private", + argNames: ["that"], + ); + + @override + String crateApiKeyBdkDerivationPathAsString( + {required BdkDerivationPath that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_derivation_path(that); + return wire.wire__crate__api__key__bdk_derivation_path_as_string(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiKeyBdkDerivationPathAsStringConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDerivationPathAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_derivation_path_as_string", + argNames: ["that"], + ); + + @override + Future crateApiKeyBdkDerivationPathFromString( + {required String path}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(path); + return wire.wire__crate__api__key__bdk_derivation_path_from_string( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_derivation_path, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDerivationPathFromStringConstMeta, + argValues: [path], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDerivationPathFromStringConstMeta => + const TaskConstMeta( + debugName: "bdk_derivation_path_from_string", + argNames: ["path"], + ); + + @override + String crateApiKeyBdkDescriptorPublicKeyAsString( + {required BdkDescriptorPublicKey that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(that); + return wire + .wire__crate__api__key__bdk_descriptor_public_key_as_string(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiKeyBdkDescriptorPublicKeyAsStringConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_public_key_as_string", + argNames: ["that"], + ); + + @override + Future crateApiKeyBdkDescriptorPublicKeyDerive( + {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr); + var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); + return wire.wire__crate__api__key__bdk_descriptor_public_key_derive( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_public_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDescriptorPublicKeyDeriveConstMeta, + argValues: [ptr, path], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyDeriveConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_public_key_derive", + argNames: ["ptr", "path"], + ); + + @override + Future crateApiKeyBdkDescriptorPublicKeyExtend( + {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr); + var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); + return wire.wire__crate__api__key__bdk_descriptor_public_key_extend( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_public_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDescriptorPublicKeyExtendConstMeta, + argValues: [ptr, path], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyExtendConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_public_key_extend", + argNames: ["ptr", "path"], + ); + + @override + Future crateApiKeyBdkDescriptorPublicKeyFromString( + {required String publicKey}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(publicKey); + return wire + .wire__crate__api__key__bdk_descriptor_public_key_from_string( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_public_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDescriptorPublicKeyFromStringConstMeta, + argValues: [publicKey], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyFromStringConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_public_key_from_string", + argNames: ["publicKey"], + ); + + @override + BdkDescriptorPublicKey crateApiKeyBdkDescriptorSecretKeyAsPublic( + {required BdkDescriptorSecretKey ptr}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); + return wire + .wire__crate__api__key__bdk_descriptor_secret_key_as_public(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_public_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDescriptorSecretKeyAsPublicConstMeta, + argValues: [ptr], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyAsPublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_as_public", + argNames: ["ptr"], + ); + + @override + String crateApiKeyBdkDescriptorSecretKeyAsString( + {required BdkDescriptorSecretKey that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); + return wire + .wire__crate__api__key__bdk_descriptor_secret_key_as_string(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiKeyBdkDescriptorSecretKeyAsStringConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_as_string", + argNames: ["that"], + ); + + @override + Future crateApiKeyBdkDescriptorSecretKeyCreate( + {required Network network, + required BdkMnemonic mnemonic, + String? password}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_network(network); + var arg1 = cst_encode_box_autoadd_bdk_mnemonic(mnemonic); + var arg2 = cst_encode_opt_String(password); + return wire.wire__crate__api__key__bdk_descriptor_secret_key_create( + port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDescriptorSecretKeyCreateConstMeta, + argValues: [network, mnemonic, password], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyCreateConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_create", + argNames: ["network", "mnemonic", "password"], + ); + + @override + Future crateApiKeyBdkDescriptorSecretKeyDerive( + {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); + var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); + return wire.wire__crate__api__key__bdk_descriptor_secret_key_derive( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDescriptorSecretKeyDeriveConstMeta, + argValues: [ptr, path], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyDeriveConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_derive", + argNames: ["ptr", "path"], + ); + + @override + Future crateApiKeyBdkDescriptorSecretKeyExtend( + {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); + var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); + return wire.wire__crate__api__key__bdk_descriptor_secret_key_extend( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDescriptorSecretKeyExtendConstMeta, + argValues: [ptr, path], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyExtendConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_extend", + argNames: ["ptr", "path"], + ); + + @override + Future crateApiKeyBdkDescriptorSecretKeyFromString( + {required String secretKey}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(secretKey); + return wire + .wire__crate__api__key__bdk_descriptor_secret_key_from_string( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDescriptorSecretKeyFromStringConstMeta, + argValues: [secretKey], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyFromStringConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_from_string", + argNames: ["secretKey"], + ); + + @override + Uint8List crateApiKeyBdkDescriptorSecretKeySecretBytes( + {required BdkDescriptorSecretKey that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); + return wire + .wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( + arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkDescriptorSecretKeySecretBytesConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeySecretBytesConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_secret_bytes", + argNames: ["that"], + ); + + @override + String crateApiKeyBdkMnemonicAsString({required BdkMnemonic that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_mnemonic(that); + return wire.wire__crate__api__key__bdk_mnemonic_as_string(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiKeyBdkMnemonicAsStringConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkMnemonicAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_mnemonic_as_string", + argNames: ["that"], + ); + + @override + Future crateApiKeyBdkMnemonicFromEntropy( + {required List entropy}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_list_prim_u_8_loose(entropy); + return wire.wire__crate__api__key__bdk_mnemonic_from_entropy( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_mnemonic, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkMnemonicFromEntropyConstMeta, + argValues: [entropy], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkMnemonicFromEntropyConstMeta => + const TaskConstMeta( + debugName: "bdk_mnemonic_from_entropy", + argNames: ["entropy"], + ); + + @override + Future crateApiKeyBdkMnemonicFromString( + {required String mnemonic}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(mnemonic); + return wire.wire__crate__api__key__bdk_mnemonic_from_string( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_mnemonic, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkMnemonicFromStringConstMeta, + argValues: [mnemonic], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkMnemonicFromStringConstMeta => + const TaskConstMeta( + debugName: "bdk_mnemonic_from_string", + argNames: ["mnemonic"], + ); + + @override + Future crateApiKeyBdkMnemonicNew( + {required WordCount wordCount}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_word_count(wordCount); + return wire.wire__crate__api__key__bdk_mnemonic_new(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_mnemonic, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiKeyBdkMnemonicNewConstMeta, + argValues: [wordCount], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyBdkMnemonicNewConstMeta => const TaskConstMeta( + debugName: "bdk_mnemonic_new", + argNames: ["wordCount"], + ); + + @override + String crateApiPsbtBdkPsbtAsString({required BdkPsbt that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire__crate__api__psbt__bdk_psbt_as_string(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiPsbtBdkPsbtAsStringConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiPsbtBdkPsbtAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_psbt_as_string", + argNames: ["that"], + ); + + @override + Future crateApiPsbtBdkPsbtCombine( + {required BdkPsbt ptr, required BdkPsbt other}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); + var arg1 = cst_encode_box_autoadd_bdk_psbt(other); + return wire.wire__crate__api__psbt__bdk_psbt_combine(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_psbt, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiPsbtBdkPsbtCombineConstMeta, + argValues: [ptr, other], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiPsbtBdkPsbtCombineConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_combine", + argNames: ["ptr", "other"], + ); + + @override + BdkTransaction crateApiPsbtBdkPsbtExtractTx({required BdkPsbt ptr}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); + return wire.wire__crate__api__psbt__bdk_psbt_extract_tx(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_transaction, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiPsbtBdkPsbtExtractTxConstMeta, + argValues: [ptr], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiPsbtBdkPsbtExtractTxConstMeta => + const TaskConstMeta( + debugName: "bdk_psbt_extract_tx", + argNames: ["ptr"], + ); + + @override + BigInt? crateApiPsbtBdkPsbtFeeAmount({required BdkPsbt that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire__crate__api__psbt__bdk_psbt_fee_amount(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_u_64, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiPsbtBdkPsbtFeeAmountConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiPsbtBdkPsbtFeeAmountConstMeta => + const TaskConstMeta( + debugName: "bdk_psbt_fee_amount", + argNames: ["that"], + ); + + @override + FeeRate? crateApiPsbtBdkPsbtFeeRate({required BdkPsbt that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire__crate__api__psbt__bdk_psbt_fee_rate(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_fee_rate, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiPsbtBdkPsbtFeeRateConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiPsbtBdkPsbtFeeRateConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_fee_rate", + argNames: ["that"], + ); + + @override + Future crateApiPsbtBdkPsbtFromStr({required String psbtBase64}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(psbtBase64); + return wire.wire__crate__api__psbt__bdk_psbt_from_str(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_psbt, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiPsbtBdkPsbtFromStrConstMeta, + argValues: [psbtBase64], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiPsbtBdkPsbtFromStrConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_from_str", + argNames: ["psbtBase64"], + ); + + @override + String crateApiPsbtBdkPsbtJsonSerialize({required BdkPsbt that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire__crate__api__psbt__bdk_psbt_json_serialize(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiPsbtBdkPsbtJsonSerializeConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiPsbtBdkPsbtJsonSerializeConstMeta => + const TaskConstMeta( + debugName: "bdk_psbt_json_serialize", + argNames: ["that"], + ); + + @override + Uint8List crateApiPsbtBdkPsbtSerialize({required BdkPsbt that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire__crate__api__psbt__bdk_psbt_serialize(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiPsbtBdkPsbtSerializeConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiPsbtBdkPsbtSerializeConstMeta => + const TaskConstMeta( + debugName: "bdk_psbt_serialize", + argNames: ["that"], + ); + + @override + String crateApiPsbtBdkPsbtTxid({required BdkPsbt that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire__crate__api__psbt__bdk_psbt_txid(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiPsbtBdkPsbtTxidConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiPsbtBdkPsbtTxidConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_txid", + argNames: ["that"], + ); + + @override + String crateApiTypesBdkAddressAsString({required BdkAddress that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire__crate__api__types__bdk_address_as_string(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkAddressAsStringConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkAddressAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_address_as_string", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkAddressFromScript( + {required BdkScriptBuf script, required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_script_buf(script); + var arg1 = cst_encode_network(network); + return wire.wire__crate__api__types__bdk_address_from_script( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_address, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkAddressFromScriptConstMeta, + argValues: [script, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkAddressFromScriptConstMeta => + const TaskConstMeta( + debugName: "bdk_address_from_script", + argNames: ["script", "network"], + ); + + @override + Future crateApiTypesBdkAddressFromString( + {required String address, required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(address); + var arg1 = cst_encode_network(network); + return wire.wire__crate__api__types__bdk_address_from_string( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_address, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkAddressFromStringConstMeta, + argValues: [address, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkAddressFromStringConstMeta => + const TaskConstMeta( + debugName: "bdk_address_from_string", + argNames: ["address", "network"], + ); + + @override + bool crateApiTypesBdkAddressIsValidForNetwork( + {required BdkAddress that, required Network network}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + var arg1 = cst_encode_network(network); + return wire.wire__crate__api__types__bdk_address_is_valid_for_network( + arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkAddressIsValidForNetworkConstMeta, + argValues: [that, network], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkAddressIsValidForNetworkConstMeta => + const TaskConstMeta( + debugName: "bdk_address_is_valid_for_network", + argNames: ["that", "network"], + ); + + @override + Network crateApiTypesBdkAddressNetwork({required BdkAddress that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire__crate__api__types__bdk_address_network(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_network, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkAddressNetworkConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkAddressNetworkConstMeta => + const TaskConstMeta( + debugName: "bdk_address_network", + argNames: ["that"], + ); + + @override + Payload crateApiTypesBdkAddressPayload({required BdkAddress that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire__crate__api__types__bdk_address_payload(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_payload, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkAddressPayloadConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkAddressPayloadConstMeta => + const TaskConstMeta( + debugName: "bdk_address_payload", + argNames: ["that"], + ); + + @override + BdkScriptBuf crateApiTypesBdkAddressScript({required BdkAddress ptr}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_address(ptr); + return wire.wire__crate__api__types__bdk_address_script(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_script_buf, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkAddressScriptConstMeta, + argValues: [ptr], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkAddressScriptConstMeta => + const TaskConstMeta( + debugName: "bdk_address_script", + argNames: ["ptr"], + ); + + @override + String crateApiTypesBdkAddressToQrUri({required BdkAddress that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire__crate__api__types__bdk_address_to_qr_uri(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkAddressToQrUriConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkAddressToQrUriConstMeta => + const TaskConstMeta( + debugName: "bdk_address_to_qr_uri", + argNames: ["that"], + ); + + @override + String crateApiTypesBdkPolicyAsString({required BdkPolicy that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_policy(that); + return wire.wire__crate__api__types__bdk_policy_as_string(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkPolicyAsStringConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkPolicyAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_policy_as_string", + argNames: ["that"], + ); + + @override + Satisfaction crateApiTypesBdkPolicyContribution({required BdkPolicy that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_policy(that); + return wire.wire__crate__api__types__bdk_policy_contribution(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_satisfaction, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkPolicyContributionConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkPolicyContributionConstMeta => + const TaskConstMeta( + debugName: "bdk_policy_contribution", + argNames: ["that"], + ); + + @override + String crateApiTypesBdkPolicyId({required BdkPolicy that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_policy(that); + return wire.wire__crate__api__types__bdk_policy_id(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkPolicyIdConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkPolicyIdConstMeta => const TaskConstMeta( + debugName: "bdk_policy_id", + argNames: ["that"], + ); + + @override + SatisfiableItem crateApiTypesBdkPolicyItem({required BdkPolicy that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_policy(that); + return wire.wire__crate__api__types__bdk_policy_item(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_satisfiable_item, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkPolicyItemConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkPolicyItemConstMeta => const TaskConstMeta( + debugName: "bdk_policy_item", + argNames: ["that"], + ); + + @override + bool crateApiTypesBdkPolicyRequiresPath({required BdkPolicy that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_policy(that); + return wire.wire__crate__api__types__bdk_policy_requires_path(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkPolicyRequiresPathConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkPolicyRequiresPathConstMeta => + const TaskConstMeta( + debugName: "bdk_policy_requires_path", + argNames: ["that"], + ); + + @override + Satisfaction crateApiTypesBdkPolicySatisfaction({required BdkPolicy that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_policy(that); + return wire.wire__crate__api__types__bdk_policy_satisfaction(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_satisfaction, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkPolicySatisfactionConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkPolicySatisfactionConstMeta => + const TaskConstMeta( + debugName: "bdk_policy_satisfaction", + argNames: ["that"], + ); + + @override + String crateApiTypesBdkScriptBufAsString({required BdkScriptBuf that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_script_buf(that); + return wire.wire__crate__api__types__bdk_script_buf_as_string(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkScriptBufAsStringConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkScriptBufAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_script_buf_as_string", + argNames: ["that"], + ); + + @override + BdkScriptBuf crateApiTypesBdkScriptBufEmpty() { + return handler.executeSync(SyncTask( + callFfi: () { + return wire.wire__crate__api__types__bdk_script_buf_empty(); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_script_buf, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkScriptBufEmptyConstMeta, + argValues: [], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkScriptBufEmptyConstMeta => + const TaskConstMeta( + debugName: "bdk_script_buf_empty", + argNames: [], + ); + + @override + Future crateApiTypesBdkScriptBufFromHex({required String s}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(s); + return wire.wire__crate__api__types__bdk_script_buf_from_hex( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_script_buf, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkScriptBufFromHexConstMeta, + argValues: [s], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkScriptBufFromHexConstMeta => + const TaskConstMeta( + debugName: "bdk_script_buf_from_hex", + argNames: ["s"], + ); + + @override + Future crateApiTypesBdkScriptBufWithCapacity( + {required BigInt capacity}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_usize(capacity); + return wire.wire__crate__api__types__bdk_script_buf_with_capacity( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_script_buf, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesBdkScriptBufWithCapacityConstMeta, + argValues: [capacity], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkScriptBufWithCapacityConstMeta => + const TaskConstMeta( + debugName: "bdk_script_buf_with_capacity", + argNames: ["capacity"], + ); + + @override + Future crateApiTypesBdkTransactionFromBytes( + {required List transactionBytes}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_list_prim_u_8_loose(transactionBytes); + return wire.wire__crate__api__types__bdk_transaction_from_bytes( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_transaction, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionFromBytesConstMeta, + argValues: [transactionBytes], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionFromBytesConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_from_bytes", + argNames: ["transactionBytes"], + ); + + @override + Future> crateApiTypesBdkTransactionInput( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_input(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_tx_in, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionInputConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionInputConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_input", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionIsCoinBase( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_is_coin_base( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionIsCoinBaseConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionIsCoinBaseConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_is_coin_base", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionIsExplicitlyRbf( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_is_explicitly_rbf( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionIsExplicitlyRbfConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionIsExplicitlyRbfConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_is_explicitly_rbf", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionIsLockTimeEnabled( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire + .wire__crate__api__types__bdk_transaction_is_lock_time_enabled( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionIsLockTimeEnabledConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionIsLockTimeEnabledConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_is_lock_time_enabled", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionLockTime( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_lock_time( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_lock_time, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionLockTimeConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionLockTimeConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_lock_time", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionNew( + {required int version, + required LockTime lockTime, + required List input, + required List output}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_i_32(version); + var arg1 = cst_encode_box_autoadd_lock_time(lockTime); + var arg2 = cst_encode_list_tx_in(input); + var arg3 = cst_encode_list_tx_out(output); + return wire.wire__crate__api__types__bdk_transaction_new( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_transaction, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionNewConstMeta, + argValues: [version, lockTime, input, output], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionNewConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_new", + argNames: ["version", "lockTime", "input", "output"], + ); + + @override + Future> crateApiTypesBdkTransactionOutput( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_output( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_tx_out, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionOutputConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionOutputConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_output", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionSerialize( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_serialize( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionSerializeConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionSerializeConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_serialize", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionSize( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_size(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_64, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionSizeConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionSizeConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_size", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionTxid( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_txid(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionTxidConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionTxidConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_txid", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionVersion( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_version( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_i_32, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionVersionConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionVersionConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_version", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionVsize( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_vsize(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_64, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionVsizeConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionVsizeConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_vsize", + argNames: ["that"], + ); + + @override + Future crateApiTypesBdkTransactionWeight( + {required BdkTransaction that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire__crate__api__types__bdk_transaction_weight( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_64, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiTypesBdkTransactionWeightConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesBdkTransactionWeightConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_weight", + argNames: ["that"], + ); + + @override + (BdkAddress, int) crateApiWalletBdkWalletGetAddress( + {required BdkWallet ptr, required AddressIndex addressIndex}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_box_autoadd_address_index(addressIndex); + return wire.wire__crate__api__wallet__bdk_wallet_get_address( + arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_record_bdk_address_u_32, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletGetAddressConstMeta, + argValues: [ptr, addressIndex], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletGetAddressConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_get_address", + argNames: ["ptr", "addressIndex"], + ); + + @override + Balance crateApiWalletBdkWalletGetBalance({required BdkWallet that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + return wire.wire__crate__api__wallet__bdk_wallet_get_balance(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_balance, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletGetBalanceConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletGetBalanceConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_get_balance", + argNames: ["that"], + ); + + @override + BdkDescriptor crateApiWalletBdkWalletGetDescriptorForKeychain( + {required BdkWallet ptr, required KeychainKind keychain}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_keychain_kind(keychain); + return wire + .wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( + arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletGetDescriptorForKeychainConstMeta, + argValues: [ptr, keychain], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletGetDescriptorForKeychainConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_get_descriptor_for_keychain", + argNames: ["ptr", "keychain"], + ); + + @override + (BdkAddress, int) crateApiWalletBdkWalletGetInternalAddress( + {required BdkWallet ptr, required AddressIndex addressIndex}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_box_autoadd_address_index(addressIndex); + return wire.wire__crate__api__wallet__bdk_wallet_get_internal_address( + arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_record_bdk_address_u_32, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletGetInternalAddressConstMeta, + argValues: [ptr, addressIndex], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletGetInternalAddressConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_get_internal_address", + argNames: ["ptr", "addressIndex"], + ); + + @override + Future crateApiWalletBdkWalletGetPsbtInput( + {required BdkWallet that, + required LocalUtxo utxo, + required bool onlyWitnessUtxo, + PsbtSigHashType? sighashType}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + var arg1 = cst_encode_box_autoadd_local_utxo(utxo); + var arg2 = cst_encode_bool(onlyWitnessUtxo); + var arg3 = cst_encode_opt_box_autoadd_psbt_sig_hash_type(sighashType); + return wire.wire__crate__api__wallet__bdk_wallet_get_psbt_input( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_input, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletGetPsbtInputConstMeta, + argValues: [that, utxo, onlyWitnessUtxo, sighashType], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletGetPsbtInputConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_get_psbt_input", + argNames: ["that", "utxo", "onlyWitnessUtxo", "sighashType"], + ); + + @override + bool crateApiWalletBdkWalletIsMine( + {required BdkWallet ptr, required BdkScriptBuf script}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_box_autoadd_bdk_script_buf(script); + return wire.wire__crate__api__wallet__bdk_wallet_is_mine(arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletIsMineConstMeta, + argValues: [ptr, script], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletIsMineConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_is_mine", + argNames: ["ptr", "script"], + ); + + @override + List crateApiWalletBdkWalletListTransactions( + {required BdkWallet that, required bool includeRaw}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + var arg1 = cst_encode_bool(includeRaw); + return wire.wire__crate__api__wallet__bdk_wallet_list_transactions( + arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_transaction_details, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletListTransactionsConstMeta, + argValues: [that, includeRaw], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletListTransactionsConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_list_transactions", + argNames: ["that", "includeRaw"], + ); + + @override + List crateApiWalletBdkWalletListUnspent( + {required BdkWallet that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + return wire.wire__crate__api__wallet__bdk_wallet_list_unspent(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_local_utxo, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletListUnspentConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletListUnspentConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_list_unspent", + argNames: ["that"], + ); + + @override + Network crateApiWalletBdkWalletNetwork({required BdkWallet that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + return wire.wire__crate__api__wallet__bdk_wallet_network(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_network, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletNetworkConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletNetworkConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_network", + argNames: ["that"], + ); + + @override + Future crateApiWalletBdkWalletNew( + {required BdkDescriptor descriptor, + BdkDescriptor? changeDescriptor, + required Network network, + required DatabaseConfig databaseConfig}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor(descriptor); + var arg1 = cst_encode_opt_box_autoadd_bdk_descriptor(changeDescriptor); + var arg2 = cst_encode_network(network); + var arg3 = cst_encode_box_autoadd_database_config(databaseConfig); + return wire.wire__crate__api__wallet__bdk_wallet_new( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_wallet, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletNewConstMeta, + argValues: [descriptor, changeDescriptor, network, databaseConfig], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletNewConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_new", + argNames: [ + "descriptor", + "changeDescriptor", + "network", + "databaseConfig" + ], + ); + + @override + BdkPolicy? crateApiWalletBdkWalletPolicies( + {required BdkWallet ptr, required KeychainKind keychain}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_keychain_kind(keychain); + return wire.wire__crate__api__wallet__bdk_wallet_policies(arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_bdk_policy, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletPoliciesConstMeta, + argValues: [ptr, keychain], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletPoliciesConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_policies", + argNames: ["ptr", "keychain"], + ); + + @override + Future crateApiWalletBdkWalletSign( + {required BdkWallet ptr, + required BdkPsbt psbt, + SignOptions? signOptions}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_box_autoadd_bdk_psbt(psbt); + var arg2 = cst_encode_opt_box_autoadd_sign_options(signOptions); + return wire.wire__crate__api__wallet__bdk_wallet_sign( + port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletSignConstMeta, + argValues: [ptr, psbt, signOptions], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletSignConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_sign", + argNames: ["ptr", "psbt", "signOptions"], + ); + + @override + Future crateApiWalletBdkWalletSync( + {required BdkWallet ptr, required BdkBlockchain blockchain}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_box_autoadd_bdk_blockchain(blockchain); + return wire.wire__crate__api__wallet__bdk_wallet_sync( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletBdkWalletSyncConstMeta, + argValues: [ptr, blockchain], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletBdkWalletSyncConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_sync", + argNames: ["ptr", "blockchain"], + ); + + @override + Future<(BdkPsbt, TransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder( + {required String txid, + required double feeRate, + BdkAddress? allowShrinking, + required BdkWallet wallet, + required bool enableRbf, + int? nSequence}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(txid); + var arg1 = cst_encode_f_32(feeRate); + var arg2 = cst_encode_opt_box_autoadd_bdk_address(allowShrinking); + var arg3 = cst_encode_box_autoadd_bdk_wallet(wallet); + var arg4 = cst_encode_bool(enableRbf); + var arg5 = cst_encode_opt_box_autoadd_u_32(nSequence); + return wire.wire__crate__api__wallet__finish_bump_fee_tx_builder( + port_, arg0, arg1, arg2, arg3, arg4, arg5); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletFinishBumpFeeTxBuilderConstMeta, + argValues: [txid, feeRate, allowShrinking, wallet, enableRbf, nSequence], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletFinishBumpFeeTxBuilderConstMeta => + const TaskConstMeta( + debugName: "finish_bump_fee_tx_builder", + argNames: [ + "txid", + "feeRate", + "allowShrinking", + "wallet", + "enableRbf", + "nSequence" + ], + ); + + @override + Future<(BdkPsbt, TransactionDetails)> crateApiWalletTxBuilderFinish( + {required BdkWallet wallet, + required List recipients, + required List utxos, + (OutPoint, Input, BigInt)? foreignUtxo, + required List unSpendable, + required ChangeSpendPolicy changePolicy, + required bool manuallySelectedOnly, + double? feeRate, + BigInt? feeAbsolute, + required bool drainWallet, + BdkScriptBuf? drainTo, + RbfValue? rbf, + Map? internalPolicyPath, + Map? externalPolicyPath, + required List data}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(wallet); + var arg1 = cst_encode_list_script_amount(recipients); + var arg2 = cst_encode_list_out_point(utxos); + var arg3 = cst_encode_opt_box_autoadd_record_out_point_input_usize( + foreignUtxo); + var arg4 = cst_encode_list_out_point(unSpendable); + var arg5 = cst_encode_change_spend_policy(changePolicy); + var arg6 = cst_encode_bool(manuallySelectedOnly); + var arg7 = cst_encode_opt_box_autoadd_f_32(feeRate); + var arg8 = cst_encode_opt_box_autoadd_u_64(feeAbsolute); + var arg9 = cst_encode_bool(drainWallet); + var arg10 = cst_encode_opt_box_autoadd_bdk_script_buf(drainTo); + var arg11 = cst_encode_opt_box_autoadd_rbf_value(rbf); + var arg12 = + cst_encode_opt_Map_String_list_prim_u_32_strict(internalPolicyPath); + var arg13 = + cst_encode_opt_Map_String_list_prim_u_32_strict(externalPolicyPath); + var arg14 = cst_encode_list_prim_u_8_loose(data); + return wire.wire__crate__api__wallet__tx_builder_finish( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + arg8, + arg9, + arg10, + arg11, + arg12, + arg13, + arg14); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kCrateApiWalletTxBuilderFinishConstMeta, + argValues: [ + wallet, + recipients, + utxos, + foreignUtxo, + unSpendable, + changePolicy, + manuallySelectedOnly, + feeRate, + feeAbsolute, + drainWallet, + drainTo, + rbf, + internalPolicyPath, + externalPolicyPath, + data + ], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletTxBuilderFinishConstMeta => + const TaskConstMeta( + debugName: "tx_builder_finish", + argNames: [ + "wallet", + "recipients", + "utxos", + "foreignUtxo", + "unSpendable", + "changePolicy", + "manuallySelectedOnly", + "feeRate", + "feeAbsolute", + "drainWallet", + "drainTo", + "rbf", + "internalPolicyPath", + "externalPolicyPath", + "data" + ], + ); + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Address => + wire.rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Address => + wire.rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_DerivationPath => wire + .rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_DerivationPath => wire + .rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_AnyBlockchain => wire + .rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_AnyBlockchain => wire + .rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ExtendedDescriptor => wire + .rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ExtendedDescriptor => wire + .rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Policy => + wire.rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Policy => + wire.rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_DescriptorPublicKey => wire + .rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_DescriptorPublicKey => wire + .rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_DescriptorSecretKey => wire + .rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_DescriptorSecretKey => wire + .rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_KeyMap => + wire.rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_KeyMap => + wire.rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Mnemonic => + wire.rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Mnemonic => + wire.rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexWalletAnyDatabase => wire + .rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexWalletAnyDatabase => wire + .rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexPartiallySignedTransaction => wire + .rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction => wire + .rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction; + + @protected + Map dco_decode_Map_String_list_prim_u_32_strict( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Map.fromEntries( + dco_decode_list_record_string_list_prim_u_32_strict(raw) + .map((e) => MapEntry(e.$1, e.$2))); + } + + @protected + Map> + dco_decode_Map_list_prim_u_32_strict_list_condition(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Map.fromEntries( + dco_decode_list_record_list_prim_u_32_strict_list_condition(raw) + .map((e) => MapEntry(e.$1, e.$2))); + } + + @protected + Map> dco_decode_Map_u_32_list_condition(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Map.fromEntries(dco_decode_list_record_u_32_list_condition(raw) + .map((e) => MapEntry(e.$1, e.$2))); + } + + @protected + Address dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return AddressImpl.frbInternalDcoDecode(raw as List); + } + + @protected + DerivationPath dco_decode_RustOpaque_bdkbitcoinbip32DerivationPath( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return DerivationPathImpl.frbInternalDcoDecode(raw as List); + } + + @protected + AnyBlockchain dco_decode_RustOpaque_bdkblockchainAnyBlockchain(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return AnyBlockchainImpl.frbInternalDcoDecode(raw as List); + } + + @protected + ExtendedDescriptor dco_decode_RustOpaque_bdkdescriptorExtendedDescriptor( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ExtendedDescriptorImpl.frbInternalDcoDecode(raw as List); + } + + @protected + Policy dco_decode_RustOpaque_bdkdescriptorPolicy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return PolicyImpl.frbInternalDcoDecode(raw as List); + } + + @protected + DescriptorPublicKey dco_decode_RustOpaque_bdkkeysDescriptorPublicKey( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return DescriptorPublicKeyImpl.frbInternalDcoDecode(raw as List); + } + + @protected + DescriptorSecretKey dco_decode_RustOpaque_bdkkeysDescriptorSecretKey( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return DescriptorSecretKeyImpl.frbInternalDcoDecode(raw as List); + } + + @protected + KeyMap dco_decode_RustOpaque_bdkkeysKeyMap(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return KeyMapImpl.frbInternalDcoDecode(raw as List); + } + + @protected + Mnemonic dco_decode_RustOpaque_bdkkeysbip39Mnemonic(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MnemonicImpl.frbInternalDcoDecode(raw as List); + } + + @protected + MutexWalletAnyDatabase + dco_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MutexWalletAnyDatabaseImpl.frbInternalDcoDecode( + raw as List); + } + + @protected + MutexPartiallySignedTransaction + dco_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MutexPartiallySignedTransactionImpl.frbInternalDcoDecode( + raw as List); + } + + @protected + String dco_decode_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as String; + } + + @protected + AddressError dco_decode_address_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return AddressError_Base58( + dco_decode_String(raw[1]), + ); + case 1: + return AddressError_Bech32( + dco_decode_String(raw[1]), + ); + case 2: + return AddressError_EmptyBech32Payload(); + case 3: + return AddressError_InvalidBech32Variant( + expected: dco_decode_variant(raw[1]), + found: dco_decode_variant(raw[2]), + ); + case 4: + return AddressError_InvalidWitnessVersion( + dco_decode_u_8(raw[1]), + ); + case 5: + return AddressError_UnparsableWitnessVersion( + dco_decode_String(raw[1]), + ); + case 6: + return AddressError_MalformedWitnessVersion(); + case 7: + return AddressError_InvalidWitnessProgramLength( + dco_decode_usize(raw[1]), + ); + case 8: + return AddressError_InvalidSegwitV0ProgramLength( + dco_decode_usize(raw[1]), + ); + case 9: + return AddressError_UncompressedPubkey(); + case 10: + return AddressError_ExcessiveScriptSize(); + case 11: + return AddressError_UnrecognizedScript(); + case 12: + return AddressError_UnknownAddressType( + dco_decode_String(raw[1]), + ); + case 13: + return AddressError_NetworkValidation( + networkRequired: dco_decode_network(raw[1]), + networkFound: dco_decode_network(raw[2]), + address: dco_decode_String(raw[3]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + AddressIndex dco_decode_address_index(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return AddressIndex_Increase(); + case 1: + return AddressIndex_LastUnused(); + case 2: + return AddressIndex_Peek( + index: dco_decode_u_32(raw[1]), + ); + case 3: + return AddressIndex_Reset( + index: dco_decode_u_32(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + Auth dco_decode_auth(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return Auth_None(); + case 1: + return Auth_UserPass( + username: dco_decode_String(raw[1]), + password: dco_decode_String(raw[2]), + ); + case 2: + return Auth_Cookie( + file: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + Balance dco_decode_balance(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 6) + throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); + return Balance( + immature: dco_decode_u_64(arr[0]), + trustedPending: dco_decode_u_64(arr[1]), + untrustedPending: dco_decode_u_64(arr[2]), + confirmed: dco_decode_u_64(arr[3]), + spendable: dco_decode_u_64(arr[4]), + total: dco_decode_u_64(arr[5]), + ); + } + + @protected + BdkAddress dco_decode_bdk_address(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkAddress( + ptr: dco_decode_RustOpaque_bdkbitcoinAddress(arr[0]), + ); + } + + @protected + BdkBlockchain dco_decode_bdk_blockchain(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkBlockchain( + ptr: dco_decode_RustOpaque_bdkblockchainAnyBlockchain(arr[0]), + ); + } + + @protected + BdkDerivationPath dco_decode_bdk_derivation_path(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkDerivationPath( + ptr: dco_decode_RustOpaque_bdkbitcoinbip32DerivationPath(arr[0]), + ); + } + + @protected + BdkDescriptor dco_decode_bdk_descriptor(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return BdkDescriptor( + extendedDescriptor: + dco_decode_RustOpaque_bdkdescriptorExtendedDescriptor(arr[0]), + keyMap: dco_decode_RustOpaque_bdkkeysKeyMap(arr[1]), + ); + } + + @protected + BdkDescriptorPublicKey dco_decode_bdk_descriptor_public_key(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkDescriptorPublicKey( + ptr: dco_decode_RustOpaque_bdkkeysDescriptorPublicKey(arr[0]), + ); + } + + @protected + BdkDescriptorSecretKey dco_decode_bdk_descriptor_secret_key(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkDescriptorSecretKey( + ptr: dco_decode_RustOpaque_bdkkeysDescriptorSecretKey(arr[0]), + ); + } + + @protected + BdkError dco_decode_bdk_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return BdkError_Hex( + dco_decode_box_autoadd_hex_error(raw[1]), + ); + case 1: + return BdkError_Consensus( + dco_decode_box_autoadd_consensus_error(raw[1]), + ); + case 2: + return BdkError_VerifyTransaction( + dco_decode_String(raw[1]), + ); + case 3: + return BdkError_Address( + dco_decode_box_autoadd_address_error(raw[1]), + ); + case 4: + return BdkError_Descriptor( + dco_decode_box_autoadd_descriptor_error(raw[1]), + ); + case 5: + return BdkError_InvalidU32Bytes( + dco_decode_list_prim_u_8_strict(raw[1]), + ); + case 6: + return BdkError_Generic( + dco_decode_String(raw[1]), + ); + case 7: + return BdkError_ScriptDoesntHaveAddressForm(); + case 8: + return BdkError_NoRecipients(); + case 9: + return BdkError_NoUtxosSelected(); + case 10: + return BdkError_OutputBelowDustLimit( + dco_decode_usize(raw[1]), + ); + case 11: + return BdkError_InsufficientFunds( + needed: dco_decode_u_64(raw[1]), + available: dco_decode_u_64(raw[2]), + ); + case 12: + return BdkError_BnBTotalTriesExceeded(); + case 13: + return BdkError_BnBNoExactMatch(); + case 14: + return BdkError_UnknownUtxo(); + case 15: + return BdkError_TransactionNotFound(); + case 16: + return BdkError_TransactionConfirmed(); + case 17: + return BdkError_IrreplaceableTransaction(); + case 18: + return BdkError_FeeRateTooLow( + needed: dco_decode_f_32(raw[1]), + ); + case 19: + return BdkError_FeeTooLow( + needed: dco_decode_u_64(raw[1]), + ); + case 20: + return BdkError_FeeRateUnavailable(); + case 21: + return BdkError_MissingKeyOrigin( + dco_decode_String(raw[1]), + ); + case 22: + return BdkError_Key( + dco_decode_String(raw[1]), + ); + case 23: + return BdkError_ChecksumMismatch(); + case 24: + return BdkError_SpendingPolicyRequired( + dco_decode_keychain_kind(raw[1]), + ); + case 25: + return BdkError_InvalidPolicyPathError( + dco_decode_String(raw[1]), + ); + case 26: + return BdkError_Signer( + dco_decode_String(raw[1]), + ); + case 27: + return BdkError_InvalidNetwork( + requested: dco_decode_network(raw[1]), + found: dco_decode_network(raw[2]), + ); + case 28: + return BdkError_InvalidOutpoint( + dco_decode_box_autoadd_out_point(raw[1]), + ); + case 29: + return BdkError_Encode( + dco_decode_String(raw[1]), + ); + case 30: + return BdkError_Miniscript( + dco_decode_String(raw[1]), + ); + case 31: + return BdkError_MiniscriptPsbt( + dco_decode_String(raw[1]), + ); + case 32: + return BdkError_Bip32( + dco_decode_String(raw[1]), + ); + case 33: + return BdkError_Bip39( + dco_decode_String(raw[1]), + ); + case 34: + return BdkError_Secp256k1( + dco_decode_String(raw[1]), + ); + case 35: + return BdkError_Json( + dco_decode_String(raw[1]), + ); + case 36: + return BdkError_Psbt( + dco_decode_String(raw[1]), + ); + case 37: + return BdkError_PsbtParse( + dco_decode_String(raw[1]), + ); + case 38: + return BdkError_MissingCachedScripts( + dco_decode_usize(raw[1]), + dco_decode_usize(raw[2]), + ); + case 39: + return BdkError_Electrum( + dco_decode_String(raw[1]), + ); + case 40: + return BdkError_Esplora( + dco_decode_String(raw[1]), + ); + case 41: + return BdkError_Sled( + dco_decode_String(raw[1]), + ); + case 42: + return BdkError_Rpc( + dco_decode_String(raw[1]), + ); + case 43: + return BdkError_Rusqlite( + dco_decode_String(raw[1]), + ); + case 44: + return BdkError_InvalidInput( + dco_decode_String(raw[1]), + ); + case 45: + return BdkError_InvalidLockTime( + dco_decode_String(raw[1]), + ); + case 46: + return BdkError_InvalidTransaction( + dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + BdkMnemonic dco_decode_bdk_mnemonic(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkMnemonic( + ptr: dco_decode_RustOpaque_bdkkeysbip39Mnemonic(arr[0]), + ); + } + + @protected + BdkPolicy dco_decode_bdk_policy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkPolicy( + ptr: dco_decode_RustOpaque_bdkdescriptorPolicy(arr[0]), + ); + } + + @protected + BdkPsbt dco_decode_bdk_psbt(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkPsbt( + ptr: + dco_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + arr[0]), + ); + } + + @protected + BdkScriptBuf dco_decode_bdk_script_buf(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkScriptBuf( + bytes: dco_decode_list_prim_u_8_strict(arr[0]), + ); + } + + @protected + BdkTransaction dco_decode_bdk_transaction(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkTransaction( + s: dco_decode_String(arr[0]), + ); + } + + @protected + BdkWallet dco_decode_bdk_wallet(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkWallet( + ptr: dco_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + arr[0]), + ); + } + + @protected + BlockTime dco_decode_block_time(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return BlockTime( + height: dco_decode_u_32(arr[0]), + timestamp: dco_decode_u_64(arr[1]), + ); + } + + @protected + BlockchainConfig dco_decode_blockchain_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return BlockchainConfig_Electrum( + config: dco_decode_box_autoadd_electrum_config(raw[1]), + ); + case 1: + return BlockchainConfig_Esplora( + config: dco_decode_box_autoadd_esplora_config(raw[1]), + ); + case 2: + return BlockchainConfig_Rpc( + config: dco_decode_box_autoadd_rpc_config(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + bool dco_decode_bool(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as bool; + } + + @protected + AddressError dco_decode_box_autoadd_address_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_address_error(raw); + } + + @protected + AddressIndex dco_decode_box_autoadd_address_index(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_address_index(raw); + } + + @protected + BdkAddress dco_decode_box_autoadd_bdk_address(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_address(raw); + } + + @protected + BdkBlockchain dco_decode_box_autoadd_bdk_blockchain(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_blockchain(raw); + } + + @protected + BdkDerivationPath dco_decode_box_autoadd_bdk_derivation_path(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_derivation_path(raw); + } + + @protected + BdkDescriptor dco_decode_box_autoadd_bdk_descriptor(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_descriptor(raw); + } + + @protected + BdkDescriptorPublicKey dco_decode_box_autoadd_bdk_descriptor_public_key( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_descriptor_public_key(raw); + } + + @protected + BdkDescriptorSecretKey dco_decode_box_autoadd_bdk_descriptor_secret_key( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_descriptor_secret_key(raw); + } + + @protected + BdkMnemonic dco_decode_box_autoadd_bdk_mnemonic(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_mnemonic(raw); + } + + @protected + BdkPolicy dco_decode_box_autoadd_bdk_policy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_policy(raw); + } + + @protected + BdkPsbt dco_decode_box_autoadd_bdk_psbt(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_psbt(raw); + } + + @protected + BdkScriptBuf dco_decode_box_autoadd_bdk_script_buf(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_script_buf(raw); + } + + @protected + BdkTransaction dco_decode_box_autoadd_bdk_transaction(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_transaction(raw); + } + + @protected + BdkWallet dco_decode_box_autoadd_bdk_wallet(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bdk_wallet(raw); + } + + @protected + BlockTime dco_decode_box_autoadd_block_time(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_block_time(raw); + } + + @protected + BlockchainConfig dco_decode_box_autoadd_blockchain_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_blockchain_config(raw); + } + + @protected + bool dco_decode_box_autoadd_bool(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as bool; + } + + @protected + Condition dco_decode_box_autoadd_condition(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_condition(raw); + } + + @protected + ConsensusError dco_decode_box_autoadd_consensus_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_consensus_error(raw); + } + + @protected + DatabaseConfig dco_decode_box_autoadd_database_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_database_config(raw); + } + + @protected + DescriptorError dco_decode_box_autoadd_descriptor_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_descriptor_error(raw); + } + + @protected + ElectrumConfig dco_decode_box_autoadd_electrum_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_electrum_config(raw); + } + + @protected + EsploraConfig dco_decode_box_autoadd_esplora_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_esplora_config(raw); + } + + @protected + double dco_decode_box_autoadd_f_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as double; + } + + @protected + FeeRate dco_decode_box_autoadd_fee_rate(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_fee_rate(raw); + } + + @protected + HexError dco_decode_box_autoadd_hex_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_hex_error(raw); + } + + @protected + LocalUtxo dco_decode_box_autoadd_local_utxo(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_local_utxo(raw); + } + + @protected + LockTime dco_decode_box_autoadd_lock_time(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_lock_time(raw); + } + + @protected + OutPoint dco_decode_box_autoadd_out_point(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_out_point(raw); + } + + @protected + PkOrF dco_decode_box_autoadd_pk_or_f(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_pk_or_f(raw); + } + + @protected + PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_psbt_sig_hash_type(raw); + } + + @protected + RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_rbf_value(raw); + } + + @protected + (OutPoint, Input, BigInt) dco_decode_box_autoadd_record_out_point_input_usize( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as (OutPoint, Input, BigInt); + } + + @protected + RpcConfig dco_decode_box_autoadd_rpc_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_rpc_config(raw); + } + + @protected + RpcSyncParams dco_decode_box_autoadd_rpc_sync_params(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_rpc_sync_params(raw); + } + + @protected + SignOptions dco_decode_box_autoadd_sign_options(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_sign_options(raw); + } + + @protected + SledDbConfiguration dco_decode_box_autoadd_sled_db_configuration( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_sled_db_configuration(raw); + } + + @protected + SqliteDbConfiguration dco_decode_box_autoadd_sqlite_db_configuration( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_sqlite_db_configuration(raw); + } + + @protected + int dco_decode_box_autoadd_u_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + BigInt dco_decode_box_autoadd_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_u_64(raw); + } + + @protected + int dco_decode_box_autoadd_u_8(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ChangeSpendPolicy.values[raw as int]; + } + + @protected + Condition dco_decode_condition(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return Condition( + csv: dco_decode_opt_box_autoadd_u_32(arr[0]), + timelock: dco_decode_opt_box_autoadd_lock_time(arr[1]), + ); + } + + @protected + ConsensusError dco_decode_consensus_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return ConsensusError_Io( + dco_decode_String(raw[1]), + ); + case 1: + return ConsensusError_OversizedVectorAllocation( + requested: dco_decode_usize(raw[1]), + max: dco_decode_usize(raw[2]), + ); + case 2: + return ConsensusError_InvalidChecksum( + expected: dco_decode_u_8_array_4(raw[1]), + actual: dco_decode_u_8_array_4(raw[2]), + ); + case 3: + return ConsensusError_NonMinimalVarInt(); + case 4: + return ConsensusError_ParseFailed( + dco_decode_String(raw[1]), + ); + case 5: + return ConsensusError_UnsupportedSegwitFlag( + dco_decode_u_8(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + DatabaseConfig dco_decode_database_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return DatabaseConfig_Memory(); + case 1: + return DatabaseConfig_Sqlite( + config: dco_decode_box_autoadd_sqlite_db_configuration(raw[1]), + ); + case 2: + return DatabaseConfig_Sled( + config: dco_decode_box_autoadd_sled_db_configuration(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + DescriptorError dco_decode_descriptor_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return DescriptorError_InvalidHdKeyPath(); + case 1: + return DescriptorError_InvalidDescriptorChecksum(); + case 2: + return DescriptorError_HardenedDerivationXpub(); + case 3: + return DescriptorError_MultiPath(); + case 4: + return DescriptorError_Key( + dco_decode_String(raw[1]), + ); + case 5: + return DescriptorError_Policy( + dco_decode_String(raw[1]), + ); + case 6: + return DescriptorError_InvalidDescriptorCharacter( + dco_decode_u_8(raw[1]), + ); + case 7: + return DescriptorError_Bip32( + dco_decode_String(raw[1]), + ); + case 8: + return DescriptorError_Base58( + dco_decode_String(raw[1]), + ); + case 9: + return DescriptorError_Pk( + dco_decode_String(raw[1]), + ); + case 10: + return DescriptorError_Miniscript( + dco_decode_String(raw[1]), + ); + case 11: + return DescriptorError_Hex( + dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + ElectrumConfig dco_decode_electrum_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 6) + throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); + return ElectrumConfig( + url: dco_decode_String(arr[0]), + socks5: dco_decode_opt_String(arr[1]), + retry: dco_decode_u_8(arr[2]), + timeout: dco_decode_opt_box_autoadd_u_8(arr[3]), + stopGap: dco_decode_u_64(arr[4]), + validateDomain: dco_decode_bool(arr[5]), + ); + } + + @protected + EsploraConfig dco_decode_esplora_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 5) + throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); + return EsploraConfig( + baseUrl: dco_decode_String(arr[0]), + proxy: dco_decode_opt_String(arr[1]), + concurrency: dco_decode_opt_box_autoadd_u_8(arr[2]), + stopGap: dco_decode_u_64(arr[3]), + timeout: dco_decode_opt_box_autoadd_u_64(arr[4]), + ); + } + + @protected + double dco_decode_f_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as double; + } + + @protected + FeeRate dco_decode_fee_rate(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FeeRate( + satPerVb: dco_decode_f_32(arr[0]), + ); + } + + @protected + HexError dco_decode_hex_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return HexError_InvalidChar( + dco_decode_u_8(raw[1]), + ); + case 1: + return HexError_OddLengthString( + dco_decode_usize(raw[1]), + ); + case 2: + return HexError_InvalidLength( + dco_decode_usize(raw[1]), + dco_decode_usize(raw[2]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + int dco_decode_i_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + Input dco_decode_input(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return Input( + s: dco_decode_String(arr[0]), + ); + } + + @protected + KeychainKind dco_decode_keychain_kind(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return KeychainKind.values[raw as int]; + } + + @protected + List dco_decode_list_bdk_policy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_bdk_policy).toList(); + } + + @protected + List dco_decode_list_condition(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_condition).toList(); + } + + @protected + List dco_decode_list_list_prim_u_8_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_list_prim_u_8_strict).toList(); + } + + @protected + List dco_decode_list_local_utxo(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_local_utxo).toList(); + } + + @protected + List dco_decode_list_out_point(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_out_point).toList(); + } + + @protected + List dco_decode_list_pk_or_f(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_pk_or_f).toList(); + } + + @protected + Uint32List dco_decode_list_prim_u_32_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as Uint32List; + } + + @protected + Uint64List dco_decode_list_prim_u_64_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeUint64List(raw); + } + + @protected + List dco_decode_list_prim_u_8_loose(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as List; + } + + @protected + Uint8List dco_decode_list_prim_u_8_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as Uint8List; + } + + @protected + List<(Uint32List, List)> + dco_decode_list_record_list_prim_u_32_strict_list_condition(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List) + .map(dco_decode_record_list_prim_u_32_strict_list_condition) + .toList(); + } + + @protected + List<(String, Uint32List)> + dco_decode_list_record_string_list_prim_u_32_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List) + .map(dco_decode_record_string_list_prim_u_32_strict) + .toList(); + } + + @protected + List<(int, List)> dco_decode_list_record_u_32_list_condition( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List) + .map(dco_decode_record_u_32_list_condition) + .toList(); + } + + @protected + List dco_decode_list_script_amount(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_script_amount).toList(); + } + + @protected + List dco_decode_list_transaction_details(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_transaction_details).toList(); + } + + @protected + List dco_decode_list_tx_in(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_tx_in).toList(); + } + + @protected + List dco_decode_list_tx_out(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_tx_out).toList(); + } + + @protected + LocalUtxo dco_decode_local_utxo(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 4) + throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); + return LocalUtxo( + outpoint: dco_decode_out_point(arr[0]), + txout: dco_decode_tx_out(arr[1]), + keychain: dco_decode_keychain_kind(arr[2]), + isSpent: dco_decode_bool(arr[3]), + ); + } + + @protected + LockTime dco_decode_lock_time(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return LockTime_Blocks( + dco_decode_u_32(raw[1]), + ); + case 1: + return LockTime_Seconds( + dco_decode_u_32(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + Network dco_decode_network(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Network.values[raw as int]; + } + + @protected + Map? dco_decode_opt_Map_String_list_prim_u_32_strict( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_Map_String_list_prim_u_32_strict(raw); + } + + @protected + String? dco_decode_opt_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_String(raw); + } + + @protected + BdkAddress? dco_decode_opt_box_autoadd_bdk_address(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_bdk_address(raw); + } + + @protected + BdkDescriptor? dco_decode_opt_box_autoadd_bdk_descriptor(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_bdk_descriptor(raw); + } + + @protected + BdkPolicy? dco_decode_opt_box_autoadd_bdk_policy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_bdk_policy(raw); + } + + @protected + BdkScriptBuf? dco_decode_opt_box_autoadd_bdk_script_buf(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_bdk_script_buf(raw); + } + + @protected + BdkTransaction? dco_decode_opt_box_autoadd_bdk_transaction(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_bdk_transaction(raw); + } + + @protected + BlockTime? dco_decode_opt_box_autoadd_block_time(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_block_time(raw); + } + + @protected + bool? dco_decode_opt_box_autoadd_bool(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_bool(raw); + } + + @protected + double? dco_decode_opt_box_autoadd_f_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_f_32(raw); + } + + @protected + FeeRate? dco_decode_opt_box_autoadd_fee_rate(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_fee_rate(raw); + } + + @protected + LockTime? dco_decode_opt_box_autoadd_lock_time(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_lock_time(raw); + } + + @protected + PsbtSigHashType? dco_decode_opt_box_autoadd_psbt_sig_hash_type(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_psbt_sig_hash_type(raw); + } + + @protected + RbfValue? dco_decode_opt_box_autoadd_rbf_value(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_rbf_value(raw); + } + + @protected + (OutPoint, Input, BigInt)? + dco_decode_opt_box_autoadd_record_out_point_input_usize(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_record_out_point_input_usize(raw); + } + + @protected + RpcSyncParams? dco_decode_opt_box_autoadd_rpc_sync_params(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_rpc_sync_params(raw); + } + + @protected + SignOptions? dco_decode_opt_box_autoadd_sign_options(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_sign_options(raw); + } + + @protected + int? dco_decode_opt_box_autoadd_u_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_u_32(raw); + } + + @protected + BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_u_64(raw); + } + + @protected + int? dco_decode_opt_box_autoadd_u_8(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_u_8(raw); + } + + @protected + OutPoint dco_decode_out_point(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return OutPoint( + txid: dco_decode_String(arr[0]), + vout: dco_decode_u_32(arr[1]), + ); + } + + @protected + Payload dco_decode_payload(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return Payload_PubkeyHash( + pubkeyHash: dco_decode_String(raw[1]), + ); + case 1: + return Payload_ScriptHash( + scriptHash: dco_decode_String(raw[1]), + ); + case 2: + return Payload_WitnessProgram( + version: dco_decode_witness_version(raw[1]), + program: dco_decode_list_prim_u_8_strict(raw[2]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + PkOrF dco_decode_pk_or_f(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return PkOrF_Pubkey( + value: dco_decode_String(raw[1]), + ); + case 1: + return PkOrF_XOnlyPubkey( + value: dco_decode_String(raw[1]), + ); + case 2: + return PkOrF_Fingerprint( + value: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + PsbtSigHashType dco_decode_psbt_sig_hash_type(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return PsbtSigHashType( + inner: dco_decode_u_32(arr[0]), + ); + } + + @protected + RbfValue dco_decode_rbf_value(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return RbfValue_RbfDefault(); + case 1: + return RbfValue_Value( + dco_decode_u_32(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + (BdkAddress, int) dco_decode_record_bdk_address_u_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) { + throw Exception('Expected 2 elements, got ${arr.length}'); + } + return ( + dco_decode_bdk_address(arr[0]), + dco_decode_u_32(arr[1]), + ); + } + + @protected + (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) { + throw Exception('Expected 2 elements, got ${arr.length}'); + } + return ( + dco_decode_bdk_psbt(arr[0]), + dco_decode_transaction_details(arr[1]), + ); + } + + @protected + (Uint32List, List) + dco_decode_record_list_prim_u_32_strict_list_condition(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) { + throw Exception('Expected 2 elements, got ${arr.length}'); + } + return ( + dco_decode_list_prim_u_32_strict(arr[0]), + dco_decode_list_condition(arr[1]), + ); + } + + @protected + (OutPoint, Input, BigInt) dco_decode_record_out_point_input_usize( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 3) { + throw Exception('Expected 3 elements, got ${arr.length}'); + } + return ( + dco_decode_out_point(arr[0]), + dco_decode_input(arr[1]), + dco_decode_usize(arr[2]), + ); + } + + @protected + (String, Uint32List) dco_decode_record_string_list_prim_u_32_strict( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) { + throw Exception('Expected 2 elements, got ${arr.length}'); + } + return ( + dco_decode_String(arr[0]), + dco_decode_list_prim_u_32_strict(arr[1]), + ); + } + + @protected + (int, List) dco_decode_record_u_32_list_condition(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) { + throw Exception('Expected 2 elements, got ${arr.length}'); + } + return ( + dco_decode_u_32(arr[0]), + dco_decode_list_condition(arr[1]), + ); + } + + @protected + RpcConfig dco_decode_rpc_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 5) + throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); + return RpcConfig( + url: dco_decode_String(arr[0]), + auth: dco_decode_auth(arr[1]), + network: dco_decode_network(arr[2]), + walletName: dco_decode_String(arr[3]), + syncParams: dco_decode_opt_box_autoadd_rpc_sync_params(arr[4]), + ); + } + + @protected + RpcSyncParams dco_decode_rpc_sync_params(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 4) + throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); + return RpcSyncParams( + startScriptCount: dco_decode_u_64(arr[0]), + startTime: dco_decode_u_64(arr[1]), + forceStartTime: dco_decode_bool(arr[2]), + pollRateSec: dco_decode_u_64(arr[3]), + ); + } + + @protected + Satisfaction dco_decode_satisfaction(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return Satisfaction_Partial( + n: dco_decode_u_64(raw[1]), + m: dco_decode_u_64(raw[2]), + items: dco_decode_list_prim_u_64_strict(raw[3]), + sorted: dco_decode_opt_box_autoadd_bool(raw[4]), + conditions: dco_decode_Map_u_32_list_condition(raw[5]), + ); + case 1: + return Satisfaction_PartialComplete( + n: dco_decode_u_64(raw[1]), + m: dco_decode_u_64(raw[2]), + items: dco_decode_list_prim_u_64_strict(raw[3]), + sorted: dco_decode_opt_box_autoadd_bool(raw[4]), + conditions: + dco_decode_Map_list_prim_u_32_strict_list_condition(raw[5]), + ); + case 2: + return Satisfaction_Complete( + condition: dco_decode_box_autoadd_condition(raw[1]), + ); + case 3: + return Satisfaction_None( + msg: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + SatisfiableItem dco_decode_satisfiable_item(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return SatisfiableItem_EcdsaSignature( + key: dco_decode_box_autoadd_pk_or_f(raw[1]), + ); + case 1: + return SatisfiableItem_SchnorrSignature( + key: dco_decode_box_autoadd_pk_or_f(raw[1]), + ); + case 2: + return SatisfiableItem_Sha256Preimage( + hash: dco_decode_String(raw[1]), + ); + case 3: + return SatisfiableItem_Hash256Preimage( + hash: dco_decode_String(raw[1]), + ); + case 4: + return SatisfiableItem_Ripemd160Preimage( + hash: dco_decode_String(raw[1]), + ); + case 5: + return SatisfiableItem_Hash160Preimage( + hash: dco_decode_String(raw[1]), + ); + case 6: + return SatisfiableItem_AbsoluteTimelock( + value: dco_decode_box_autoadd_lock_time(raw[1]), + ); + case 7: + return SatisfiableItem_RelativeTimelock( + value: dco_decode_u_32(raw[1]), + ); + case 8: + return SatisfiableItem_Multisig( + keys: dco_decode_list_pk_or_f(raw[1]), + threshold: dco_decode_u_64(raw[2]), + ); + case 9: + return SatisfiableItem_Thresh( + items: dco_decode_list_bdk_policy(raw[1]), + threshold: dco_decode_u_64(raw[2]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + ScriptAmount dco_decode_script_amount(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return ScriptAmount( + script: dco_decode_bdk_script_buf(arr[0]), + amount: dco_decode_u_64(arr[1]), + ); + } + + @protected + SignOptions dco_decode_sign_options(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 7) + throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); + return SignOptions( + trustWitnessUtxo: dco_decode_bool(arr[0]), + assumeHeight: dco_decode_opt_box_autoadd_u_32(arr[1]), + allowAllSighashes: dco_decode_bool(arr[2]), + removePartialSigs: dco_decode_bool(arr[3]), + tryFinalize: dco_decode_bool(arr[4]), + signWithTapInternalKey: dco_decode_bool(arr[5]), + allowGrinding: dco_decode_bool(arr[6]), + ); + } + + @protected + SledDbConfiguration dco_decode_sled_db_configuration(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return SledDbConfiguration( + path: dco_decode_String(arr[0]), + treeName: dco_decode_String(arr[1]), + ); + } + + @protected + SqliteDbConfiguration dco_decode_sqlite_db_configuration(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return SqliteDbConfiguration( + path: dco_decode_String(arr[0]), + ); + } + + @protected + TransactionDetails dco_decode_transaction_details(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 6) + throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); + return TransactionDetails( + transaction: dco_decode_opt_box_autoadd_bdk_transaction(arr[0]), + txid: dco_decode_String(arr[1]), + received: dco_decode_u_64(arr[2]), + sent: dco_decode_u_64(arr[3]), + fee: dco_decode_opt_box_autoadd_u_64(arr[4]), + confirmationTime: dco_decode_opt_box_autoadd_block_time(arr[5]), + ); + } + + @protected + TxIn dco_decode_tx_in(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 4) + throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); + return TxIn( + previousOutput: dco_decode_out_point(arr[0]), + scriptSig: dco_decode_bdk_script_buf(arr[1]), + sequence: dco_decode_u_32(arr[2]), + witness: dco_decode_list_list_prim_u_8_strict(arr[3]), + ); + } + + @protected + TxOut dco_decode_tx_out(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return TxOut( + value: dco_decode_u_64(arr[0]), + scriptPubkey: dco_decode_bdk_script_buf(arr[1]), + ); + } + + @protected + int dco_decode_u_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + BigInt dco_decode_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeU64(raw); + } + + @protected + int dco_decode_u_8(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + U8Array4 dco_decode_u_8_array_4(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return U8Array4(dco_decode_list_prim_u_8_strict(raw)); + } + + @protected + void dco_decode_unit(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return; + } + + @protected + BigInt dco_decode_usize(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeU64(raw); + } + + @protected + Variant dco_decode_variant(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Variant.values[raw as int]; + } + + @protected + WitnessVersion dco_decode_witness_version(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return WitnessVersion.values[raw as int]; + } + + @protected + WordCount dco_decode_word_count(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return WordCount.values[raw as int]; + } + + @protected + Map sse_decode_Map_String_list_prim_u_32_strict( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = + sse_decode_list_record_string_list_prim_u_32_strict(deserializer); + return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); + } + + @protected + Map> + sse_decode_Map_list_prim_u_32_strict_list_condition( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_list_record_list_prim_u_32_strict_list_condition( + deserializer); + return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); + } + + @protected + Map> sse_decode_Map_u_32_list_condition( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_list_record_u_32_list_condition(deserializer); + return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); + } + + @protected + Address sse_decode_RustOpaque_bdkbitcoinAddress( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return AddressImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + DerivationPath sse_decode_RustOpaque_bdkbitcoinbip32DerivationPath( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return DerivationPathImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + AnyBlockchain sse_decode_RustOpaque_bdkblockchainAnyBlockchain( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return AnyBlockchainImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + ExtendedDescriptor sse_decode_RustOpaque_bdkdescriptorExtendedDescriptor( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ExtendedDescriptorImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + Policy sse_decode_RustOpaque_bdkdescriptorPolicy( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return PolicyImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + DescriptorPublicKey sse_decode_RustOpaque_bdkkeysDescriptorPublicKey( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return DescriptorPublicKeyImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + DescriptorSecretKey sse_decode_RustOpaque_bdkkeysDescriptorSecretKey( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return DescriptorSecretKeyImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + KeyMap sse_decode_RustOpaque_bdkkeysKeyMap(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return KeyMapImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + Mnemonic sse_decode_RustOpaque_bdkkeysbip39Mnemonic( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MnemonicImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + MutexWalletAnyDatabase + sse_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MutexWalletAnyDatabaseImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + MutexPartiallySignedTransaction + sse_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MutexPartiallySignedTransactionImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + String sse_decode_String(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_list_prim_u_8_strict(deserializer); + return utf8.decoder.convert(inner); + } + + @protected + AddressError sse_decode_address_error(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_field0 = sse_decode_String(deserializer); + return AddressError_Base58(var_field0); + case 1: + var var_field0 = sse_decode_String(deserializer); + return AddressError_Bech32(var_field0); + case 2: + return AddressError_EmptyBech32Payload(); + case 3: + var var_expected = sse_decode_variant(deserializer); + var var_found = sse_decode_variant(deserializer); + return AddressError_InvalidBech32Variant( + expected: var_expected, found: var_found); + case 4: + var var_field0 = sse_decode_u_8(deserializer); + return AddressError_InvalidWitnessVersion(var_field0); + case 5: + var var_field0 = sse_decode_String(deserializer); + return AddressError_UnparsableWitnessVersion(var_field0); + case 6: + return AddressError_MalformedWitnessVersion(); + case 7: + var var_field0 = sse_decode_usize(deserializer); + return AddressError_InvalidWitnessProgramLength(var_field0); + case 8: + var var_field0 = sse_decode_usize(deserializer); + return AddressError_InvalidSegwitV0ProgramLength(var_field0); + case 9: + return AddressError_UncompressedPubkey(); + case 10: + return AddressError_ExcessiveScriptSize(); + case 11: + return AddressError_UnrecognizedScript(); + case 12: + var var_field0 = sse_decode_String(deserializer); + return AddressError_UnknownAddressType(var_field0); + case 13: + var var_networkRequired = sse_decode_network(deserializer); + var var_networkFound = sse_decode_network(deserializer); + var var_address = sse_decode_String(deserializer); + return AddressError_NetworkValidation( + networkRequired: var_networkRequired, + networkFound: var_networkFound, + address: var_address); + default: + throw UnimplementedError(''); + } + } + + @protected + AddressIndex sse_decode_address_index(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + return AddressIndex_Increase(); + case 1: + return AddressIndex_LastUnused(); + case 2: + var var_index = sse_decode_u_32(deserializer); + return AddressIndex_Peek(index: var_index); + case 3: + var var_index = sse_decode_u_32(deserializer); + return AddressIndex_Reset(index: var_index); + default: + throw UnimplementedError(''); + } + } + + @protected + Auth sse_decode_auth(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + return Auth_None(); + case 1: + var var_username = sse_decode_String(deserializer); + var var_password = sse_decode_String(deserializer); + return Auth_UserPass(username: var_username, password: var_password); + case 2: + var var_file = sse_decode_String(deserializer); + return Auth_Cookie(file: var_file); + default: + throw UnimplementedError(''); + } + } + + @protected + Balance sse_decode_balance(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_immature = sse_decode_u_64(deserializer); + var var_trustedPending = sse_decode_u_64(deserializer); + var var_untrustedPending = sse_decode_u_64(deserializer); + var var_confirmed = sse_decode_u_64(deserializer); + var var_spendable = sse_decode_u_64(deserializer); + var var_total = sse_decode_u_64(deserializer); + return Balance( + immature: var_immature, + trustedPending: var_trustedPending, + untrustedPending: var_untrustedPending, + confirmed: var_confirmed, + spendable: var_spendable, + total: var_total); + } + + @protected + BdkAddress sse_decode_bdk_address(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = sse_decode_RustOpaque_bdkbitcoinAddress(deserializer); + return BdkAddress(ptr: var_ptr); + } + + @protected + BdkBlockchain sse_decode_bdk_blockchain(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = + sse_decode_RustOpaque_bdkblockchainAnyBlockchain(deserializer); + return BdkBlockchain(ptr: var_ptr); + } + + @protected + BdkDerivationPath sse_decode_bdk_derivation_path( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = + sse_decode_RustOpaque_bdkbitcoinbip32DerivationPath(deserializer); + return BdkDerivationPath(ptr: var_ptr); + } + + @protected + BdkDescriptor sse_decode_bdk_descriptor(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_extendedDescriptor = + sse_decode_RustOpaque_bdkdescriptorExtendedDescriptor(deserializer); + var var_keyMap = sse_decode_RustOpaque_bdkkeysKeyMap(deserializer); + return BdkDescriptor( + extendedDescriptor: var_extendedDescriptor, keyMap: var_keyMap); + } + + @protected + BdkDescriptorPublicKey sse_decode_bdk_descriptor_public_key( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = + sse_decode_RustOpaque_bdkkeysDescriptorPublicKey(deserializer); + return BdkDescriptorPublicKey(ptr: var_ptr); + } + + @protected + BdkDescriptorSecretKey sse_decode_bdk_descriptor_secret_key( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = + sse_decode_RustOpaque_bdkkeysDescriptorSecretKey(deserializer); + return BdkDescriptorSecretKey(ptr: var_ptr); + } + + @protected + BdkError sse_decode_bdk_error(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_field0 = sse_decode_box_autoadd_hex_error(deserializer); + return BdkError_Hex(var_field0); + case 1: + var var_field0 = sse_decode_box_autoadd_consensus_error(deserializer); + return BdkError_Consensus(var_field0); + case 2: + var var_field0 = sse_decode_String(deserializer); + return BdkError_VerifyTransaction(var_field0); + case 3: + var var_field0 = sse_decode_box_autoadd_address_error(deserializer); + return BdkError_Address(var_field0); + case 4: + var var_field0 = sse_decode_box_autoadd_descriptor_error(deserializer); + return BdkError_Descriptor(var_field0); + case 5: + var var_field0 = sse_decode_list_prim_u_8_strict(deserializer); + return BdkError_InvalidU32Bytes(var_field0); + case 6: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Generic(var_field0); + case 7: + return BdkError_ScriptDoesntHaveAddressForm(); + case 8: + return BdkError_NoRecipients(); + case 9: + return BdkError_NoUtxosSelected(); + case 10: + var var_field0 = sse_decode_usize(deserializer); + return BdkError_OutputBelowDustLimit(var_field0); + case 11: + var var_needed = sse_decode_u_64(deserializer); + var var_available = sse_decode_u_64(deserializer); + return BdkError_InsufficientFunds( + needed: var_needed, available: var_available); + case 12: + return BdkError_BnBTotalTriesExceeded(); + case 13: + return BdkError_BnBNoExactMatch(); + case 14: + return BdkError_UnknownUtxo(); + case 15: + return BdkError_TransactionNotFound(); + case 16: + return BdkError_TransactionConfirmed(); + case 17: + return BdkError_IrreplaceableTransaction(); + case 18: + var var_needed = sse_decode_f_32(deserializer); + return BdkError_FeeRateTooLow(needed: var_needed); + case 19: + var var_needed = sse_decode_u_64(deserializer); + return BdkError_FeeTooLow(needed: var_needed); + case 20: + return BdkError_FeeRateUnavailable(); + case 21: + var var_field0 = sse_decode_String(deserializer); + return BdkError_MissingKeyOrigin(var_field0); + case 22: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Key(var_field0); + case 23: + return BdkError_ChecksumMismatch(); + case 24: + var var_field0 = sse_decode_keychain_kind(deserializer); + return BdkError_SpendingPolicyRequired(var_field0); + case 25: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidPolicyPathError(var_field0); + case 26: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Signer(var_field0); + case 27: + var var_requested = sse_decode_network(deserializer); + var var_found = sse_decode_network(deserializer); + return BdkError_InvalidNetwork( + requested: var_requested, found: var_found); + case 28: + var var_field0 = sse_decode_box_autoadd_out_point(deserializer); + return BdkError_InvalidOutpoint(var_field0); + case 29: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Encode(var_field0); + case 30: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Miniscript(var_field0); + case 31: + var var_field0 = sse_decode_String(deserializer); + return BdkError_MiniscriptPsbt(var_field0); + case 32: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Bip32(var_field0); + case 33: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Bip39(var_field0); + case 34: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Secp256k1(var_field0); + case 35: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Json(var_field0); + case 36: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Psbt(var_field0); + case 37: + var var_field0 = sse_decode_String(deserializer); + return BdkError_PsbtParse(var_field0); + case 38: + var var_field0 = sse_decode_usize(deserializer); + var var_field1 = sse_decode_usize(deserializer); + return BdkError_MissingCachedScripts(var_field0, var_field1); + case 39: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Electrum(var_field0); + case 40: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Esplora(var_field0); + case 41: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Sled(var_field0); + case 42: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Rpc(var_field0); + case 43: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Rusqlite(var_field0); + case 44: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidInput(var_field0); + case 45: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidLockTime(var_field0); + case 46: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidTransaction(var_field0); + default: + throw UnimplementedError(''); + } + } + + @protected + BdkMnemonic sse_decode_bdk_mnemonic(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = sse_decode_RustOpaque_bdkkeysbip39Mnemonic(deserializer); + return BdkMnemonic(ptr: var_ptr); + } + + @protected + BdkPolicy sse_decode_bdk_policy(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = sse_decode_RustOpaque_bdkdescriptorPolicy(deserializer); + return BdkPolicy(ptr: var_ptr); + } + + @protected + BdkPsbt sse_decode_bdk_psbt(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = + sse_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + deserializer); + return BdkPsbt(ptr: var_ptr); + } + + @protected + BdkScriptBuf sse_decode_bdk_script_buf(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_bytes = sse_decode_list_prim_u_8_strict(deserializer); + return BdkScriptBuf(bytes: var_bytes); + } + + @protected + BdkTransaction sse_decode_bdk_transaction(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_s = sse_decode_String(deserializer); + return BdkTransaction(s: var_s); + } + + @protected + BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = + sse_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + deserializer); + return BdkWallet(ptr: var_ptr); + } + + @protected + BlockTime sse_decode_block_time(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_height = sse_decode_u_32(deserializer); + var var_timestamp = sse_decode_u_64(deserializer); + return BlockTime(height: var_height, timestamp: var_timestamp); + } + + @protected + BlockchainConfig sse_decode_blockchain_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_config = sse_decode_box_autoadd_electrum_config(deserializer); + return BlockchainConfig_Electrum(config: var_config); + case 1: + var var_config = sse_decode_box_autoadd_esplora_config(deserializer); + return BlockchainConfig_Esplora(config: var_config); + case 2: + var var_config = sse_decode_box_autoadd_rpc_config(deserializer); + return BlockchainConfig_Rpc(config: var_config); + default: + throw UnimplementedError(''); + } + } + + @protected + bool sse_decode_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint8() != 0; + } + + @protected + AddressError sse_decode_box_autoadd_address_error( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_address_error(deserializer)); + } + + @protected + AddressIndex sse_decode_box_autoadd_address_index( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_address_index(deserializer)); + } + + @protected + BdkAddress sse_decode_box_autoadd_bdk_address(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_address(deserializer)); + } + + @protected + BdkBlockchain sse_decode_box_autoadd_bdk_blockchain( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_blockchain(deserializer)); + } + + @protected + BdkDerivationPath sse_decode_box_autoadd_bdk_derivation_path( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_derivation_path(deserializer)); + } + + @protected + BdkDescriptor sse_decode_box_autoadd_bdk_descriptor( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_descriptor(deserializer)); + } + + @protected + BdkDescriptorPublicKey sse_decode_box_autoadd_bdk_descriptor_public_key( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_descriptor_public_key(deserializer)); + } + + @protected + BdkDescriptorSecretKey sse_decode_box_autoadd_bdk_descriptor_secret_key( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_descriptor_secret_key(deserializer)); + } + + @protected + BdkMnemonic sse_decode_box_autoadd_bdk_mnemonic( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_mnemonic(deserializer)); + } + + @protected + BdkPolicy sse_decode_box_autoadd_bdk_policy(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_policy(deserializer)); + } + + @protected + BdkPsbt sse_decode_box_autoadd_bdk_psbt(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_psbt(deserializer)); + } + + @protected + BdkScriptBuf sse_decode_box_autoadd_bdk_script_buf( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_script_buf(deserializer)); + } + + @protected + BdkTransaction sse_decode_box_autoadd_bdk_transaction( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_transaction(deserializer)); + } + + @protected + BdkWallet sse_decode_box_autoadd_bdk_wallet(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bdk_wallet(deserializer)); + } + + @protected + BlockTime sse_decode_box_autoadd_block_time(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_block_time(deserializer)); + } + + @protected + BlockchainConfig sse_decode_box_autoadd_blockchain_config( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_blockchain_config(deserializer)); + } + + @protected + bool sse_decode_box_autoadd_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bool(deserializer)); + } + + @protected + Condition sse_decode_box_autoadd_condition(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_condition(deserializer)); + } + + @protected + ConsensusError sse_decode_box_autoadd_consensus_error( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_consensus_error(deserializer)); + } + + @protected + DatabaseConfig sse_decode_box_autoadd_database_config( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_database_config(deserializer)); + } + + @protected + DescriptorError sse_decode_box_autoadd_descriptor_error( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_descriptor_error(deserializer)); + } + + @protected + ElectrumConfig sse_decode_box_autoadd_electrum_config( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_electrum_config(deserializer)); + } + + @protected + EsploraConfig sse_decode_box_autoadd_esplora_config( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_esplora_config(deserializer)); + } + + @protected + double sse_decode_box_autoadd_f_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_f_32(deserializer)); + } + + @protected + FeeRate sse_decode_box_autoadd_fee_rate(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_fee_rate(deserializer)); + } + + @protected + HexError sse_decode_box_autoadd_hex_error(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_hex_error(deserializer)); + } + + @protected + LocalUtxo sse_decode_box_autoadd_local_utxo(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_local_utxo(deserializer)); + } + + @protected + LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_lock_time(deserializer)); + } + + @protected + OutPoint sse_decode_box_autoadd_out_point(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_out_point(deserializer)); + } + + @protected + PkOrF sse_decode_box_autoadd_pk_or_f(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_pk_or_f(deserializer)); + } + + @protected + PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_psbt_sig_hash_type(deserializer)); + } + + @protected + RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_rbf_value(deserializer)); + } + + @protected + (OutPoint, Input, BigInt) sse_decode_box_autoadd_record_out_point_input_usize( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_record_out_point_input_usize(deserializer)); + } + + @protected + RpcConfig sse_decode_box_autoadd_rpc_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_rpc_config(deserializer)); + } + + @protected + RpcSyncParams sse_decode_box_autoadd_rpc_sync_params( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_rpc_sync_params(deserializer)); + } + + @protected + SignOptions sse_decode_box_autoadd_sign_options( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_sign_options(deserializer)); + } + + @protected + SledDbConfiguration sse_decode_box_autoadd_sled_db_configuration( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_sled_db_configuration(deserializer)); + } + + @protected + SqliteDbConfiguration sse_decode_box_autoadd_sqlite_db_configuration( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_sqlite_db_configuration(deserializer)); + } + + @protected + int sse_decode_box_autoadd_u_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_u_32(deserializer)); + } + + @protected + BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_u_64(deserializer)); + } + + @protected + int sse_decode_box_autoadd_u_8(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_u_8(deserializer)); + } + + @protected + ChangeSpendPolicy sse_decode_change_spend_policy( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return ChangeSpendPolicy.values[inner]; + } + + @protected + Condition sse_decode_condition(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_csv = sse_decode_opt_box_autoadd_u_32(deserializer); + var var_timelock = sse_decode_opt_box_autoadd_lock_time(deserializer); + return Condition(csv: var_csv, timelock: var_timelock); + } + + @protected + ConsensusError sse_decode_consensus_error(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_field0 = sse_decode_String(deserializer); + return ConsensusError_Io(var_field0); + case 1: + var var_requested = sse_decode_usize(deserializer); + var var_max = sse_decode_usize(deserializer); + return ConsensusError_OversizedVectorAllocation( + requested: var_requested, max: var_max); + case 2: + var var_expected = sse_decode_u_8_array_4(deserializer); + var var_actual = sse_decode_u_8_array_4(deserializer); + return ConsensusError_InvalidChecksum( + expected: var_expected, actual: var_actual); + case 3: + return ConsensusError_NonMinimalVarInt(); + case 4: + var var_field0 = sse_decode_String(deserializer); + return ConsensusError_ParseFailed(var_field0); + case 5: + var var_field0 = sse_decode_u_8(deserializer); + return ConsensusError_UnsupportedSegwitFlag(var_field0); + default: + throw UnimplementedError(''); + } + } + + @protected + DatabaseConfig sse_decode_database_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + return DatabaseConfig_Memory(); + case 1: + var var_config = + sse_decode_box_autoadd_sqlite_db_configuration(deserializer); + return DatabaseConfig_Sqlite(config: var_config); + case 2: + var var_config = + sse_decode_box_autoadd_sled_db_configuration(deserializer); + return DatabaseConfig_Sled(config: var_config); + default: + throw UnimplementedError(''); + } + } + + @protected + DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + return DescriptorError_InvalidHdKeyPath(); + case 1: + return DescriptorError_InvalidDescriptorChecksum(); + case 2: + return DescriptorError_HardenedDerivationXpub(); + case 3: + return DescriptorError_MultiPath(); + case 4: + var var_field0 = sse_decode_String(deserializer); + return DescriptorError_Key(var_field0); + case 5: + var var_field0 = sse_decode_String(deserializer); + return DescriptorError_Policy(var_field0); + case 6: + var var_field0 = sse_decode_u_8(deserializer); + return DescriptorError_InvalidDescriptorCharacter(var_field0); + case 7: + var var_field0 = sse_decode_String(deserializer); + return DescriptorError_Bip32(var_field0); + case 8: + var var_field0 = sse_decode_String(deserializer); + return DescriptorError_Base58(var_field0); + case 9: + var var_field0 = sse_decode_String(deserializer); + return DescriptorError_Pk(var_field0); + case 10: + var var_field0 = sse_decode_String(deserializer); + return DescriptorError_Miniscript(var_field0); + case 11: + var var_field0 = sse_decode_String(deserializer); + return DescriptorError_Hex(var_field0); + default: + throw UnimplementedError(''); + } + } + + @protected + ElectrumConfig sse_decode_electrum_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_url = sse_decode_String(deserializer); + var var_socks5 = sse_decode_opt_String(deserializer); + var var_retry = sse_decode_u_8(deserializer); + var var_timeout = sse_decode_opt_box_autoadd_u_8(deserializer); + var var_stopGap = sse_decode_u_64(deserializer); + var var_validateDomain = sse_decode_bool(deserializer); + return ElectrumConfig( + url: var_url, + socks5: var_socks5, + retry: var_retry, + timeout: var_timeout, + stopGap: var_stopGap, + validateDomain: var_validateDomain); + } + + @protected + EsploraConfig sse_decode_esplora_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_baseUrl = sse_decode_String(deserializer); + var var_proxy = sse_decode_opt_String(deserializer); + var var_concurrency = sse_decode_opt_box_autoadd_u_8(deserializer); + var var_stopGap = sse_decode_u_64(deserializer); + var var_timeout = sse_decode_opt_box_autoadd_u_64(deserializer); + return EsploraConfig( + baseUrl: var_baseUrl, + proxy: var_proxy, + concurrency: var_concurrency, + stopGap: var_stopGap, + timeout: var_timeout); + } + + @protected + double sse_decode_f_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getFloat32(); + } + + @protected + FeeRate sse_decode_fee_rate(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_satPerVb = sse_decode_f_32(deserializer); + return FeeRate(satPerVb: var_satPerVb); + } + + @protected + HexError sse_decode_hex_error(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_field0 = sse_decode_u_8(deserializer); + return HexError_InvalidChar(var_field0); + case 1: + var var_field0 = sse_decode_usize(deserializer); + return HexError_OddLengthString(var_field0); + case 2: + var var_field0 = sse_decode_usize(deserializer); + var var_field1 = sse_decode_usize(deserializer); + return HexError_InvalidLength(var_field0, var_field1); + default: + throw UnimplementedError(''); + } + } + + @protected + int sse_decode_i_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getInt32(); + } + + @protected + Input sse_decode_input(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_s = sse_decode_String(deserializer); + return Input(s: var_s); + } + + @protected + KeychainKind sse_decode_keychain_kind(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return KeychainKind.values[inner]; + } + + @protected + List sse_decode_list_bdk_policy(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_bdk_policy(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_condition(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_condition(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_list_prim_u_8_strict( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_list_prim_u_8_strict(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_local_utxo(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_local_utxo(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_out_point(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_out_point(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_pk_or_f(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_pk_or_f(deserializer)); + } + return ans_; + } + + @protected + Uint32List sse_decode_list_prim_u_32_strict(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getUint32List(len_); + } + + @protected + Uint64List sse_decode_list_prim_u_64_strict(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getUint64List(len_); + } + + @protected + List sse_decode_list_prim_u_8_loose(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getUint8List(len_); + } + + @protected + Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getUint8List(len_); + } + + @protected + List<(Uint32List, List)> + sse_decode_list_record_list_prim_u_32_strict_list_condition( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = <(Uint32List, List)>[]; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add( + sse_decode_record_list_prim_u_32_strict_list_condition(deserializer)); + } + return ans_; + } + + @protected + List<(String, Uint32List)> + sse_decode_list_record_string_list_prim_u_32_strict( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = <(String, Uint32List)>[]; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_record_string_list_prim_u_32_strict(deserializer)); + } + return ans_; + } + + @protected + List<(int, List)> sse_decode_list_record_u_32_list_condition( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = <(int, List)>[]; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_record_u_32_list_condition(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_script_amount( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_script_amount(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_transaction_details( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_transaction_details(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_tx_in(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_tx_in(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_tx_out(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_tx_out(deserializer)); + } + return ans_; + } + + @protected + LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_outpoint = sse_decode_out_point(deserializer); + var var_txout = sse_decode_tx_out(deserializer); + var var_keychain = sse_decode_keychain_kind(deserializer); + var var_isSpent = sse_decode_bool(deserializer); + return LocalUtxo( + outpoint: var_outpoint, + txout: var_txout, + keychain: var_keychain, + isSpent: var_isSpent); + } + + @protected + LockTime sse_decode_lock_time(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_field0 = sse_decode_u_32(deserializer); + return LockTime_Blocks(var_field0); + case 1: + var var_field0 = sse_decode_u_32(deserializer); + return LockTime_Seconds(var_field0); + default: + throw UnimplementedError(''); + } + } + + @protected + Network sse_decode_network(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return Network.values[inner]; + } + + @protected + Map? sse_decode_opt_Map_String_list_prim_u_32_strict( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_Map_String_list_prim_u_32_strict(deserializer)); + } else { + return null; + } + } + + @protected + String? sse_decode_opt_String(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_String(deserializer)); + } else { + return null; + } + } + + @protected + BdkAddress? sse_decode_opt_box_autoadd_bdk_address( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_bdk_address(deserializer)); + } else { + return null; + } + } + + @protected + BdkDescriptor? sse_decode_opt_box_autoadd_bdk_descriptor( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_bdk_descriptor(deserializer)); + } else { + return null; + } + } + + @protected + BdkPolicy? sse_decode_opt_box_autoadd_bdk_policy( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_bdk_policy(deserializer)); + } else { + return null; + } + } + + @protected + BdkScriptBuf? sse_decode_opt_box_autoadd_bdk_script_buf( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_bdk_script_buf(deserializer)); + } else { + return null; + } + } + + @protected + BdkTransaction? sse_decode_opt_box_autoadd_bdk_transaction( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_bdk_transaction(deserializer)); + } else { + return null; + } + } + + @protected + BlockTime? sse_decode_opt_box_autoadd_block_time( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_block_time(deserializer)); + } else { + return null; + } + } + + @protected + bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_bool(deserializer)); + } else { + return null; + } + } + + @protected + double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_f_32(deserializer)); + } else { + return null; + } + } + + @protected + FeeRate? sse_decode_opt_box_autoadd_fee_rate(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_fee_rate(deserializer)); + } else { + return null; + } + } + + @protected + LockTime? sse_decode_opt_box_autoadd_lock_time(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_lock_time(deserializer)); + } else { + return null; + } + } + + @protected + PsbtSigHashType? sse_decode_opt_box_autoadd_psbt_sig_hash_type( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_psbt_sig_hash_type(deserializer)); + } else { + return null; + } + } + + @protected + RbfValue? sse_decode_opt_box_autoadd_rbf_value(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_rbf_value(deserializer)); + } else { + return null; + } + } + + @protected + (OutPoint, Input, BigInt)? + sse_decode_opt_box_autoadd_record_out_point_input_usize( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_record_out_point_input_usize( + deserializer)); + } else { + return null; + } + } + + @protected + RpcSyncParams? sse_decode_opt_box_autoadd_rpc_sync_params( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_rpc_sync_params(deserializer)); + } else { + return null; + } + } + + @protected + SignOptions? sse_decode_opt_box_autoadd_sign_options( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_sign_options(deserializer)); + } else { + return null; + } + } + + @protected + int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_u_32(deserializer)); + } else { + return null; + } + } + + @protected + BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_u_64(deserializer)); + } else { + return null; + } + } + + @protected + int? sse_decode_opt_box_autoadd_u_8(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_u_8(deserializer)); + } else { + return null; + } + } + + @protected + OutPoint sse_decode_out_point(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_txid = sse_decode_String(deserializer); + var var_vout = sse_decode_u_32(deserializer); + return OutPoint(txid: var_txid, vout: var_vout); + } + + @protected + Payload sse_decode_payload(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_pubkeyHash = sse_decode_String(deserializer); + return Payload_PubkeyHash(pubkeyHash: var_pubkeyHash); + case 1: + var var_scriptHash = sse_decode_String(deserializer); + return Payload_ScriptHash(scriptHash: var_scriptHash); + case 2: + var var_version = sse_decode_witness_version(deserializer); + var var_program = sse_decode_list_prim_u_8_strict(deserializer); + return Payload_WitnessProgram( + version: var_version, program: var_program); + default: + throw UnimplementedError(''); + } + } + + @protected + PkOrF sse_decode_pk_or_f(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_value = sse_decode_String(deserializer); + return PkOrF_Pubkey(value: var_value); + case 1: + var var_value = sse_decode_String(deserializer); + return PkOrF_XOnlyPubkey(value: var_value); + case 2: + var var_value = sse_decode_String(deserializer); + return PkOrF_Fingerprint(value: var_value); + default: + throw UnimplementedError(''); + } + } + + @protected + PsbtSigHashType sse_decode_psbt_sig_hash_type(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_inner = sse_decode_u_32(deserializer); + return PsbtSigHashType(inner: var_inner); + } + + @protected + RbfValue sse_decode_rbf_value(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + return RbfValue_RbfDefault(); + case 1: + var var_field0 = sse_decode_u_32(deserializer); + return RbfValue_Value(var_field0); + default: + throw UnimplementedError(''); + } + } + + @protected + (BdkAddress, int) sse_decode_record_bdk_address_u_32( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_field0 = sse_decode_bdk_address(deserializer); + var var_field1 = sse_decode_u_32(deserializer); + return (var_field0, var_field1); + } + + @protected + (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_field0 = sse_decode_bdk_psbt(deserializer); + var var_field1 = sse_decode_transaction_details(deserializer); + return (var_field0, var_field1); + } + + @protected + (Uint32List, List) + sse_decode_record_list_prim_u_32_strict_list_condition( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_field0 = sse_decode_list_prim_u_32_strict(deserializer); + var var_field1 = sse_decode_list_condition(deserializer); + return (var_field0, var_field1); + } + + @protected + (OutPoint, Input, BigInt) sse_decode_record_out_point_input_usize( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_field0 = sse_decode_out_point(deserializer); + var var_field1 = sse_decode_input(deserializer); + var var_field2 = sse_decode_usize(deserializer); + return (var_field0, var_field1, var_field2); + } + + @protected + (String, Uint32List) sse_decode_record_string_list_prim_u_32_strict( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_field0 = sse_decode_String(deserializer); + var var_field1 = sse_decode_list_prim_u_32_strict(deserializer); + return (var_field0, var_field1); + } + + @protected + (int, List) sse_decode_record_u_32_list_condition( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_field0 = sse_decode_u_32(deserializer); + var var_field1 = sse_decode_list_condition(deserializer); + return (var_field0, var_field1); + } + + @protected + RpcConfig sse_decode_rpc_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_url = sse_decode_String(deserializer); + var var_auth = sse_decode_auth(deserializer); + var var_network = sse_decode_network(deserializer); + var var_walletName = sse_decode_String(deserializer); + var var_syncParams = + sse_decode_opt_box_autoadd_rpc_sync_params(deserializer); + return RpcConfig( + url: var_url, + auth: var_auth, + network: var_network, + walletName: var_walletName, + syncParams: var_syncParams); + } + + @protected + RpcSyncParams sse_decode_rpc_sync_params(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_startScriptCount = sse_decode_u_64(deserializer); + var var_startTime = sse_decode_u_64(deserializer); + var var_forceStartTime = sse_decode_bool(deserializer); + var var_pollRateSec = sse_decode_u_64(deserializer); + return RpcSyncParams( + startScriptCount: var_startScriptCount, + startTime: var_startTime, + forceStartTime: var_forceStartTime, + pollRateSec: var_pollRateSec); + } + + @protected + Satisfaction sse_decode_satisfaction(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_n = sse_decode_u_64(deserializer); + var var_m = sse_decode_u_64(deserializer); + var var_items = sse_decode_list_prim_u_64_strict(deserializer); + var var_sorted = sse_decode_opt_box_autoadd_bool(deserializer); + var var_conditions = sse_decode_Map_u_32_list_condition(deserializer); + return Satisfaction_Partial( + n: var_n, + m: var_m, + items: var_items, + sorted: var_sorted, + conditions: var_conditions); + case 1: + var var_n = sse_decode_u_64(deserializer); + var var_m = sse_decode_u_64(deserializer); + var var_items = sse_decode_list_prim_u_64_strict(deserializer); + var var_sorted = sse_decode_opt_box_autoadd_bool(deserializer); + var var_conditions = + sse_decode_Map_list_prim_u_32_strict_list_condition(deserializer); + return Satisfaction_PartialComplete( + n: var_n, + m: var_m, + items: var_items, + sorted: var_sorted, + conditions: var_conditions); + case 2: + var var_condition = sse_decode_box_autoadd_condition(deserializer); + return Satisfaction_Complete(condition: var_condition); + case 3: + var var_msg = sse_decode_String(deserializer); + return Satisfaction_None(msg: var_msg); + default: + throw UnimplementedError(''); + } + } + + @protected + SatisfiableItem sse_decode_satisfiable_item(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_key = sse_decode_box_autoadd_pk_or_f(deserializer); + return SatisfiableItem_EcdsaSignature(key: var_key); + case 1: + var var_key = sse_decode_box_autoadd_pk_or_f(deserializer); + return SatisfiableItem_SchnorrSignature(key: var_key); + case 2: + var var_hash = sse_decode_String(deserializer); + return SatisfiableItem_Sha256Preimage(hash: var_hash); + case 3: + var var_hash = sse_decode_String(deserializer); + return SatisfiableItem_Hash256Preimage(hash: var_hash); + case 4: + var var_hash = sse_decode_String(deserializer); + return SatisfiableItem_Ripemd160Preimage(hash: var_hash); + case 5: + var var_hash = sse_decode_String(deserializer); + return SatisfiableItem_Hash160Preimage(hash: var_hash); + case 6: + var var_value = sse_decode_box_autoadd_lock_time(deserializer); + return SatisfiableItem_AbsoluteTimelock(value: var_value); + case 7: + var var_value = sse_decode_u_32(deserializer); + return SatisfiableItem_RelativeTimelock(value: var_value); + case 8: + var var_keys = sse_decode_list_pk_or_f(deserializer); + var var_threshold = sse_decode_u_64(deserializer); + return SatisfiableItem_Multisig( + keys: var_keys, threshold: var_threshold); + case 9: + var var_items = sse_decode_list_bdk_policy(deserializer); + var var_threshold = sse_decode_u_64(deserializer); + return SatisfiableItem_Thresh( + items: var_items, threshold: var_threshold); + default: + throw UnimplementedError(''); + } + } + + @protected + ScriptAmount sse_decode_script_amount(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_script = sse_decode_bdk_script_buf(deserializer); + var var_amount = sse_decode_u_64(deserializer); + return ScriptAmount(script: var_script, amount: var_amount); + } + + @protected + SignOptions sse_decode_sign_options(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_trustWitnessUtxo = sse_decode_bool(deserializer); + var var_assumeHeight = sse_decode_opt_box_autoadd_u_32(deserializer); + var var_allowAllSighashes = sse_decode_bool(deserializer); + var var_removePartialSigs = sse_decode_bool(deserializer); + var var_tryFinalize = sse_decode_bool(deserializer); + var var_signWithTapInternalKey = sse_decode_bool(deserializer); + var var_allowGrinding = sse_decode_bool(deserializer); + return SignOptions( + trustWitnessUtxo: var_trustWitnessUtxo, + assumeHeight: var_assumeHeight, + allowAllSighashes: var_allowAllSighashes, + removePartialSigs: var_removePartialSigs, + tryFinalize: var_tryFinalize, + signWithTapInternalKey: var_signWithTapInternalKey, + allowGrinding: var_allowGrinding); + } + + @protected + SledDbConfiguration sse_decode_sled_db_configuration( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_path = sse_decode_String(deserializer); + var var_treeName = sse_decode_String(deserializer); + return SledDbConfiguration(path: var_path, treeName: var_treeName); + } + + @protected + SqliteDbConfiguration sse_decode_sqlite_db_configuration( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_path = sse_decode_String(deserializer); + return SqliteDbConfiguration(path: var_path); + } + + @protected + TransactionDetails sse_decode_transaction_details( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_transaction = + sse_decode_opt_box_autoadd_bdk_transaction(deserializer); + var var_txid = sse_decode_String(deserializer); + var var_received = sse_decode_u_64(deserializer); + var var_sent = sse_decode_u_64(deserializer); + var var_fee = sse_decode_opt_box_autoadd_u_64(deserializer); + var var_confirmationTime = + sse_decode_opt_box_autoadd_block_time(deserializer); + return TransactionDetails( + transaction: var_transaction, + txid: var_txid, + received: var_received, + sent: var_sent, + fee: var_fee, + confirmationTime: var_confirmationTime); + } + + @protected + TxIn sse_decode_tx_in(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_previousOutput = sse_decode_out_point(deserializer); + var var_scriptSig = sse_decode_bdk_script_buf(deserializer); + var var_sequence = sse_decode_u_32(deserializer); + var var_witness = sse_decode_list_list_prim_u_8_strict(deserializer); + return TxIn( + previousOutput: var_previousOutput, + scriptSig: var_scriptSig, + sequence: var_sequence, + witness: var_witness); + } + + @protected + TxOut sse_decode_tx_out(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_value = sse_decode_u_64(deserializer); + var var_scriptPubkey = sse_decode_bdk_script_buf(deserializer); + return TxOut(value: var_value, scriptPubkey: var_scriptPubkey); + } + + @protected + int sse_decode_u_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint32(); + } + + @protected + BigInt sse_decode_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getBigUint64(); + } + + @protected + int sse_decode_u_8(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint8(); + } + + @protected + U8Array4 sse_decode_u_8_array_4(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_list_prim_u_8_strict(deserializer); + return U8Array4(inner); + } + + @protected + void sse_decode_unit(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + } + + @protected + BigInt sse_decode_usize(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getBigUint64(); + } + + @protected + Variant sse_decode_variant(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return Variant.values[inner]; + } + + @protected + WitnessVersion sse_decode_witness_version(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return WitnessVersion.values[inner]; + } + + @protected + WordCount sse_decode_word_count(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return WordCount.values[inner]; + } + + @protected + int cst_encode_RustOpaque_bdkbitcoinAddress(Address raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as AddressImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdkbitcoinbip32DerivationPath(DerivationPath raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as DerivationPathImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdkblockchainAnyBlockchain(AnyBlockchain raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as AnyBlockchainImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdkdescriptorExtendedDescriptor( + ExtendedDescriptor raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as ExtendedDescriptorImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdkdescriptorPolicy(Policy raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as PolicyImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdkkeysDescriptorPublicKey( + DescriptorPublicKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as DescriptorPublicKeyImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdkkeysDescriptorSecretKey( + DescriptorSecretKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as DescriptorSecretKeyImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdkkeysKeyMap(KeyMap raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as KeyMapImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdkkeysbip39Mnemonic(Mnemonic raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as MnemonicImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + MutexWalletAnyDatabase raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as MutexWalletAnyDatabaseImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + MutexPartiallySignedTransaction raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as MutexPartiallySignedTransactionImpl).frbInternalCstEncode(); + } + + @protected + bool cst_encode_bool(bool raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + int cst_encode_change_spend_policy(ChangeSpendPolicy raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + double cst_encode_f_32(double raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + int cst_encode_i_32(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + int cst_encode_keychain_kind(KeychainKind raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_network(Network raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_u_32(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + int cst_encode_u_8(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + void cst_encode_unit(void raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + int cst_encode_variant(Variant raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_witness_version(WitnessVersion raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_word_count(WordCount raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + void sse_encode_Map_String_list_prim_u_32_strict( + Map self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_record_string_list_prim_u_32_strict( + self.entries.map((e) => (e.key, e.value)).toList(), serializer); + } + + @protected + void sse_encode_Map_list_prim_u_32_strict_list_condition( + Map> self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_record_list_prim_u_32_strict_list_condition( + self.entries.map((e) => (e.key, e.value)).toList(), serializer); + } + + @protected + void sse_encode_Map_u_32_list_condition( + Map> self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_record_u_32_list_condition( + self.entries.map((e) => (e.key, e.value)).toList(), serializer); + } + + @protected + void sse_encode_RustOpaque_bdkbitcoinAddress( + Address self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as AddressImpl).frbInternalSseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_bdkbitcoinbip32DerivationPath( + DerivationPath self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as DerivationPathImpl).frbInternalSseEncode(move: null), + serializer); + } + + @protected + void sse_encode_RustOpaque_bdkblockchainAnyBlockchain( + AnyBlockchain self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as AnyBlockchainImpl).frbInternalSseEncode(move: null), + serializer); + } + + @protected + void sse_encode_RustOpaque_bdkdescriptorExtendedDescriptor( + ExtendedDescriptor self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ExtendedDescriptorImpl).frbInternalSseEncode(move: null), + serializer); + } + + @protected + void sse_encode_RustOpaque_bdkdescriptorPolicy( + Policy self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as PolicyImpl).frbInternalSseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_bdkkeysDescriptorPublicKey( + DescriptorPublicKey self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as DescriptorPublicKeyImpl).frbInternalSseEncode(move: null), + serializer); + } + + @protected + void sse_encode_RustOpaque_bdkkeysDescriptorSecretKey( + DescriptorSecretKey self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as DescriptorSecretKeyImpl).frbInternalSseEncode(move: null), + serializer); + } + + @protected + void sse_encode_RustOpaque_bdkkeysKeyMap( + KeyMap self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as KeyMapImpl).frbInternalSseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_bdkkeysbip39Mnemonic( + Mnemonic self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as MnemonicImpl).frbInternalSseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + MutexWalletAnyDatabase self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as MutexWalletAnyDatabaseImpl).frbInternalSseEncode(move: null), + serializer); + } + + @protected + void + sse_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + MutexPartiallySignedTransaction self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as MutexPartiallySignedTransactionImpl) + .frbInternalSseEncode(move: null), + serializer); + } + + @protected + void sse_encode_String(String self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_prim_u_8_strict(utf8.encoder.convert(self), serializer); + } + + @protected + void sse_encode_address_error(AddressError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case AddressError_Base58(field0: final field0): + sse_encode_i_32(0, serializer); + sse_encode_String(field0, serializer); + case AddressError_Bech32(field0: final field0): + sse_encode_i_32(1, serializer); + sse_encode_String(field0, serializer); + case AddressError_EmptyBech32Payload(): + sse_encode_i_32(2, serializer); + case AddressError_InvalidBech32Variant( + expected: final expected, + found: final found + ): + sse_encode_i_32(3, serializer); + sse_encode_variant(expected, serializer); + sse_encode_variant(found, serializer); + case AddressError_InvalidWitnessVersion(field0: final field0): + sse_encode_i_32(4, serializer); + sse_encode_u_8(field0, serializer); + case AddressError_UnparsableWitnessVersion(field0: final field0): + sse_encode_i_32(5, serializer); + sse_encode_String(field0, serializer); + case AddressError_MalformedWitnessVersion(): + sse_encode_i_32(6, serializer); + case AddressError_InvalidWitnessProgramLength(field0: final field0): + sse_encode_i_32(7, serializer); + sse_encode_usize(field0, serializer); + case AddressError_InvalidSegwitV0ProgramLength(field0: final field0): + sse_encode_i_32(8, serializer); + sse_encode_usize(field0, serializer); + case AddressError_UncompressedPubkey(): + sse_encode_i_32(9, serializer); + case AddressError_ExcessiveScriptSize(): + sse_encode_i_32(10, serializer); + case AddressError_UnrecognizedScript(): + sse_encode_i_32(11, serializer); + case AddressError_UnknownAddressType(field0: final field0): + sse_encode_i_32(12, serializer); + sse_encode_String(field0, serializer); + case AddressError_NetworkValidation( + networkRequired: final networkRequired, + networkFound: final networkFound, + address: final address + ): + sse_encode_i_32(13, serializer); + sse_encode_network(networkRequired, serializer); + sse_encode_network(networkFound, serializer); + sse_encode_String(address, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_address_index(AddressIndex self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case AddressIndex_Increase(): + sse_encode_i_32(0, serializer); + case AddressIndex_LastUnused(): + sse_encode_i_32(1, serializer); + case AddressIndex_Peek(index: final index): + sse_encode_i_32(2, serializer); + sse_encode_u_32(index, serializer); + case AddressIndex_Reset(index: final index): + sse_encode_i_32(3, serializer); + sse_encode_u_32(index, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_auth(Auth self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case Auth_None(): + sse_encode_i_32(0, serializer); + case Auth_UserPass(username: final username, password: final password): + sse_encode_i_32(1, serializer); + sse_encode_String(username, serializer); + sse_encode_String(password, serializer); + case Auth_Cookie(file: final file): + sse_encode_i_32(2, serializer); + sse_encode_String(file, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_balance(Balance self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.immature, serializer); + sse_encode_u_64(self.trustedPending, serializer); + sse_encode_u_64(self.untrustedPending, serializer); + sse_encode_u_64(self.confirmed, serializer); + sse_encode_u_64(self.spendable, serializer); + sse_encode_u_64(self.total, serializer); + } + + @protected + void sse_encode_bdk_address(BdkAddress self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_bdkbitcoinAddress(self.ptr, serializer); + } + + @protected + void sse_encode_bdk_blockchain(BdkBlockchain self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_bdkblockchainAnyBlockchain(self.ptr, serializer); + } + + @protected + void sse_encode_bdk_derivation_path( + BdkDerivationPath self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_bdkbitcoinbip32DerivationPath(self.ptr, serializer); + } + + @protected + void sse_encode_bdk_descriptor(BdkDescriptor self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_bdkdescriptorExtendedDescriptor( + self.extendedDescriptor, serializer); + sse_encode_RustOpaque_bdkkeysKeyMap(self.keyMap, serializer); + } + + @protected + void sse_encode_bdk_descriptor_public_key( + BdkDescriptorPublicKey self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_bdkkeysDescriptorPublicKey(self.ptr, serializer); + } + + @protected + void sse_encode_bdk_descriptor_secret_key( + BdkDescriptorSecretKey self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_bdkkeysDescriptorSecretKey(self.ptr, serializer); + } + + @protected + void sse_encode_bdk_error(BdkError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case BdkError_Hex(field0: final field0): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_hex_error(field0, serializer); + case BdkError_Consensus(field0: final field0): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_consensus_error(field0, serializer); + case BdkError_VerifyTransaction(field0: final field0): + sse_encode_i_32(2, serializer); + sse_encode_String(field0, serializer); + case BdkError_Address(field0: final field0): + sse_encode_i_32(3, serializer); + sse_encode_box_autoadd_address_error(field0, serializer); + case BdkError_Descriptor(field0: final field0): + sse_encode_i_32(4, serializer); + sse_encode_box_autoadd_descriptor_error(field0, serializer); + case BdkError_InvalidU32Bytes(field0: final field0): + sse_encode_i_32(5, serializer); + sse_encode_list_prim_u_8_strict(field0, serializer); + case BdkError_Generic(field0: final field0): + sse_encode_i_32(6, serializer); + sse_encode_String(field0, serializer); + case BdkError_ScriptDoesntHaveAddressForm(): + sse_encode_i_32(7, serializer); + case BdkError_NoRecipients(): + sse_encode_i_32(8, serializer); + case BdkError_NoUtxosSelected(): + sse_encode_i_32(9, serializer); + case BdkError_OutputBelowDustLimit(field0: final field0): + sse_encode_i_32(10, serializer); + sse_encode_usize(field0, serializer); + case BdkError_InsufficientFunds( + needed: final needed, + available: final available + ): + sse_encode_i_32(11, serializer); + sse_encode_u_64(needed, serializer); + sse_encode_u_64(available, serializer); + case BdkError_BnBTotalTriesExceeded(): + sse_encode_i_32(12, serializer); + case BdkError_BnBNoExactMatch(): + sse_encode_i_32(13, serializer); + case BdkError_UnknownUtxo(): + sse_encode_i_32(14, serializer); + case BdkError_TransactionNotFound(): + sse_encode_i_32(15, serializer); + case BdkError_TransactionConfirmed(): + sse_encode_i_32(16, serializer); + case BdkError_IrreplaceableTransaction(): + sse_encode_i_32(17, serializer); + case BdkError_FeeRateTooLow(needed: final needed): + sse_encode_i_32(18, serializer); + sse_encode_f_32(needed, serializer); + case BdkError_FeeTooLow(needed: final needed): + sse_encode_i_32(19, serializer); + sse_encode_u_64(needed, serializer); + case BdkError_FeeRateUnavailable(): + sse_encode_i_32(20, serializer); + case BdkError_MissingKeyOrigin(field0: final field0): + sse_encode_i_32(21, serializer); + sse_encode_String(field0, serializer); + case BdkError_Key(field0: final field0): + sse_encode_i_32(22, serializer); + sse_encode_String(field0, serializer); + case BdkError_ChecksumMismatch(): + sse_encode_i_32(23, serializer); + case BdkError_SpendingPolicyRequired(field0: final field0): + sse_encode_i_32(24, serializer); + sse_encode_keychain_kind(field0, serializer); + case BdkError_InvalidPolicyPathError(field0: final field0): + sse_encode_i_32(25, serializer); + sse_encode_String(field0, serializer); + case BdkError_Signer(field0: final field0): + sse_encode_i_32(26, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidNetwork( + requested: final requested, + found: final found + ): + sse_encode_i_32(27, serializer); + sse_encode_network(requested, serializer); + sse_encode_network(found, serializer); + case BdkError_InvalidOutpoint(field0: final field0): + sse_encode_i_32(28, serializer); + sse_encode_box_autoadd_out_point(field0, serializer); + case BdkError_Encode(field0: final field0): + sse_encode_i_32(29, serializer); + sse_encode_String(field0, serializer); + case BdkError_Miniscript(field0: final field0): + sse_encode_i_32(30, serializer); + sse_encode_String(field0, serializer); + case BdkError_MiniscriptPsbt(field0: final field0): + sse_encode_i_32(31, serializer); + sse_encode_String(field0, serializer); + case BdkError_Bip32(field0: final field0): + sse_encode_i_32(32, serializer); + sse_encode_String(field0, serializer); + case BdkError_Bip39(field0: final field0): + sse_encode_i_32(33, serializer); + sse_encode_String(field0, serializer); + case BdkError_Secp256k1(field0: final field0): + sse_encode_i_32(34, serializer); + sse_encode_String(field0, serializer); + case BdkError_Json(field0: final field0): + sse_encode_i_32(35, serializer); + sse_encode_String(field0, serializer); + case BdkError_Psbt(field0: final field0): + sse_encode_i_32(36, serializer); + sse_encode_String(field0, serializer); + case BdkError_PsbtParse(field0: final field0): + sse_encode_i_32(37, serializer); + sse_encode_String(field0, serializer); + case BdkError_MissingCachedScripts( + field0: final field0, + field1: final field1 + ): + sse_encode_i_32(38, serializer); + sse_encode_usize(field0, serializer); + sse_encode_usize(field1, serializer); + case BdkError_Electrum(field0: final field0): + sse_encode_i_32(39, serializer); + sse_encode_String(field0, serializer); + case BdkError_Esplora(field0: final field0): + sse_encode_i_32(40, serializer); + sse_encode_String(field0, serializer); + case BdkError_Sled(field0: final field0): + sse_encode_i_32(41, serializer); + sse_encode_String(field0, serializer); + case BdkError_Rpc(field0: final field0): + sse_encode_i_32(42, serializer); + sse_encode_String(field0, serializer); + case BdkError_Rusqlite(field0: final field0): + sse_encode_i_32(43, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidInput(field0: final field0): + sse_encode_i_32(44, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidLockTime(field0: final field0): + sse_encode_i_32(45, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidTransaction(field0: final field0): + sse_encode_i_32(46, serializer); + sse_encode_String(field0, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_bdk_mnemonic(BdkMnemonic self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_bdkkeysbip39Mnemonic(self.ptr, serializer); + } + + @protected + void sse_encode_bdk_policy(BdkPolicy self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_bdkdescriptorPolicy(self.ptr, serializer); + } + + @protected + void sse_encode_bdk_psbt(BdkPsbt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + self.ptr, serializer); + } + + @protected + void sse_encode_bdk_script_buf(BdkScriptBuf self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_prim_u_8_strict(self.bytes, serializer); + } + + @protected + void sse_encode_bdk_transaction( + BdkTransaction self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.s, serializer); + } + + @protected + void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + self.ptr, serializer); + } + + @protected + void sse_encode_block_time(BlockTime self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_32(self.height, serializer); + sse_encode_u_64(self.timestamp, serializer); + } + + @protected + void sse_encode_blockchain_config( + BlockchainConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case BlockchainConfig_Electrum(config: final config): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_electrum_config(config, serializer); + case BlockchainConfig_Esplora(config: final config): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_esplora_config(config, serializer); + case BlockchainConfig_Rpc(config: final config): + sse_encode_i_32(2, serializer); + sse_encode_box_autoadd_rpc_config(config, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_bool(bool self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint8(self ? 1 : 0); + } + + @protected + void sse_encode_box_autoadd_address_error( + AddressError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_address_error(self, serializer); + } + + @protected + void sse_encode_box_autoadd_address_index( + AddressIndex self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_address_index(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_address( + BdkAddress self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_address(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_blockchain( + BdkBlockchain self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_blockchain(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_derivation_path( + BdkDerivationPath self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_derivation_path(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_descriptor( + BdkDescriptor self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_descriptor(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_descriptor_public_key( + BdkDescriptorPublicKey self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_descriptor_public_key(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_descriptor_secret_key( + BdkDescriptorSecretKey self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_descriptor_secret_key(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_mnemonic( + BdkMnemonic self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_mnemonic(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_policy( + BdkPolicy self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_policy(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_psbt(BdkPsbt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_psbt(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_script_buf( + BdkScriptBuf self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_script_buf(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_transaction( + BdkTransaction self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_transaction(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bdk_wallet( + BdkWallet self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_wallet(self, serializer); + } + + @protected + void sse_encode_box_autoadd_block_time( + BlockTime self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_block_time(self, serializer); + } + + @protected + void sse_encode_box_autoadd_blockchain_config( + BlockchainConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_blockchain_config(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bool(self, serializer); + } + + @protected + void sse_encode_box_autoadd_condition( + Condition self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_condition(self, serializer); + } + + @protected + void sse_encode_box_autoadd_consensus_error( + ConsensusError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_consensus_error(self, serializer); + } + + @protected + void sse_encode_box_autoadd_database_config( + DatabaseConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_database_config(self, serializer); + } + + @protected + void sse_encode_box_autoadd_descriptor_error( + DescriptorError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_descriptor_error(self, serializer); + } + + @protected + void sse_encode_box_autoadd_electrum_config( + ElectrumConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_electrum_config(self, serializer); + } + + @protected + void sse_encode_box_autoadd_esplora_config( + EsploraConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_esplora_config(self, serializer); + } + + @protected + void sse_encode_box_autoadd_f_32(double self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_f_32(self, serializer); + } + + @protected + void sse_encode_box_autoadd_fee_rate(FeeRate self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_fee_rate(self, serializer); + } + + @protected + void sse_encode_box_autoadd_hex_error( + HexError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_hex_error(self, serializer); + } + + @protected + void sse_encode_box_autoadd_local_utxo( + LocalUtxo self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_local_utxo(self, serializer); + } + + @protected + void sse_encode_box_autoadd_lock_time( + LockTime self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_lock_time(self, serializer); + } + + @protected + void sse_encode_box_autoadd_out_point( + OutPoint self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_out_point(self, serializer); + } + + @protected + void sse_encode_box_autoadd_pk_or_f(PkOrF self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_pk_or_f(self, serializer); + } + + @protected + void sse_encode_box_autoadd_psbt_sig_hash_type( + PsbtSigHashType self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_psbt_sig_hash_type(self, serializer); + } + + @protected + void sse_encode_box_autoadd_rbf_value( + RbfValue self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_rbf_value(self, serializer); + } + + @protected + void sse_encode_box_autoadd_record_out_point_input_usize( + (OutPoint, Input, BigInt) self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_record_out_point_input_usize(self, serializer); + } + + @protected + void sse_encode_box_autoadd_rpc_config( + RpcConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_rpc_config(self, serializer); + } + + @protected + void sse_encode_box_autoadd_rpc_sync_params( + RpcSyncParams self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_rpc_sync_params(self, serializer); + } + + @protected + void sse_encode_box_autoadd_sign_options( + SignOptions self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_sign_options(self, serializer); + } + + @protected + void sse_encode_box_autoadd_sled_db_configuration( + SledDbConfiguration self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_sled_db_configuration(self, serializer); + } + + @protected + void sse_encode_box_autoadd_sqlite_db_configuration( + SqliteDbConfiguration self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_sqlite_db_configuration(self, serializer); + } + + @protected + void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_32(self, serializer); + } + + @protected + void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self, serializer); + } + + @protected + void sse_encode_box_autoadd_u_8(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_8(self, serializer); + } + + @protected + void sse_encode_change_spend_policy( + ChangeSpendPolicy self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_condition(Condition self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_box_autoadd_u_32(self.csv, serializer); + sse_encode_opt_box_autoadd_lock_time(self.timelock, serializer); + } + + @protected + void sse_encode_consensus_error( + ConsensusError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case ConsensusError_Io(field0: final field0): + sse_encode_i_32(0, serializer); + sse_encode_String(field0, serializer); + case ConsensusError_OversizedVectorAllocation( + requested: final requested, + max: final max + ): + sse_encode_i_32(1, serializer); + sse_encode_usize(requested, serializer); + sse_encode_usize(max, serializer); + case ConsensusError_InvalidChecksum( + expected: final expected, + actual: final actual + ): + sse_encode_i_32(2, serializer); + sse_encode_u_8_array_4(expected, serializer); + sse_encode_u_8_array_4(actual, serializer); + case ConsensusError_NonMinimalVarInt(): + sse_encode_i_32(3, serializer); + case ConsensusError_ParseFailed(field0: final field0): + sse_encode_i_32(4, serializer); + sse_encode_String(field0, serializer); + case ConsensusError_UnsupportedSegwitFlag(field0: final field0): + sse_encode_i_32(5, serializer); + sse_encode_u_8(field0, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_database_config( + DatabaseConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case DatabaseConfig_Memory(): + sse_encode_i_32(0, serializer); + case DatabaseConfig_Sqlite(config: final config): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_sqlite_db_configuration(config, serializer); + case DatabaseConfig_Sled(config: final config): + sse_encode_i_32(2, serializer); + sse_encode_box_autoadd_sled_db_configuration(config, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_descriptor_error( + DescriptorError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case DescriptorError_InvalidHdKeyPath(): + sse_encode_i_32(0, serializer); + case DescriptorError_InvalidDescriptorChecksum(): + sse_encode_i_32(1, serializer); + case DescriptorError_HardenedDerivationXpub(): + sse_encode_i_32(2, serializer); + case DescriptorError_MultiPath(): + sse_encode_i_32(3, serializer); + case DescriptorError_Key(field0: final field0): + sse_encode_i_32(4, serializer); + sse_encode_String(field0, serializer); + case DescriptorError_Policy(field0: final field0): + sse_encode_i_32(5, serializer); + sse_encode_String(field0, serializer); + case DescriptorError_InvalidDescriptorCharacter(field0: final field0): + sse_encode_i_32(6, serializer); + sse_encode_u_8(field0, serializer); + case DescriptorError_Bip32(field0: final field0): + sse_encode_i_32(7, serializer); + sse_encode_String(field0, serializer); + case DescriptorError_Base58(field0: final field0): + sse_encode_i_32(8, serializer); + sse_encode_String(field0, serializer); + case DescriptorError_Pk(field0: final field0): + sse_encode_i_32(9, serializer); + sse_encode_String(field0, serializer); + case DescriptorError_Miniscript(field0: final field0): + sse_encode_i_32(10, serializer); + sse_encode_String(field0, serializer); + case DescriptorError_Hex(field0: final field0): + sse_encode_i_32(11, serializer); + sse_encode_String(field0, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_electrum_config( + ElectrumConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.url, serializer); + sse_encode_opt_String(self.socks5, serializer); + sse_encode_u_8(self.retry, serializer); + sse_encode_opt_box_autoadd_u_8(self.timeout, serializer); + sse_encode_u_64(self.stopGap, serializer); + sse_encode_bool(self.validateDomain, serializer); + } + + @protected + void sse_encode_esplora_config(EsploraConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.baseUrl, serializer); + sse_encode_opt_String(self.proxy, serializer); + sse_encode_opt_box_autoadd_u_8(self.concurrency, serializer); + sse_encode_u_64(self.stopGap, serializer); + sse_encode_opt_box_autoadd_u_64(self.timeout, serializer); + } + + @protected + void sse_encode_f_32(double self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putFloat32(self); + } + + @protected + void sse_encode_fee_rate(FeeRate self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_f_32(self.satPerVb, serializer); + } + + @protected + void sse_encode_hex_error(HexError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case HexError_InvalidChar(field0: final field0): + sse_encode_i_32(0, serializer); + sse_encode_u_8(field0, serializer); + case HexError_OddLengthString(field0: final field0): + sse_encode_i_32(1, serializer); + sse_encode_usize(field0, serializer); + case HexError_InvalidLength(field0: final field0, field1: final field1): + sse_encode_i_32(2, serializer); + sse_encode_usize(field0, serializer); + sse_encode_usize(field1, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_i_32(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putInt32(self); + } + + @protected + void sse_encode_input(Input self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.s, serializer); + } + + @protected + void sse_encode_keychain_kind(KeychainKind self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_list_bdk_policy( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_bdk_policy(item, serializer); + } + } + + @protected + void sse_encode_list_condition( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_condition(item, serializer); + } + } + + @protected + void sse_encode_list_list_prim_u_8_strict( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_list_prim_u_8_strict(item, serializer); + } + } + + @protected + void sse_encode_list_local_utxo( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_local_utxo(item, serializer); + } + } + + @protected + void sse_encode_list_out_point( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_out_point(item, serializer); + } + } + + @protected + void sse_encode_list_pk_or_f(List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_pk_or_f(item, serializer); + } + } + + @protected + void sse_encode_list_prim_u_32_strict( + Uint32List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + serializer.buffer.putUint32List(self); + } + + @protected + void sse_encode_list_prim_u_64_strict( + Uint64List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + serializer.buffer.putUint64List(self); + } + + @protected + void sse_encode_list_prim_u_8_loose( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + serializer.buffer + .putUint8List(self is Uint8List ? self : Uint8List.fromList(self)); + } + + @protected + void sse_encode_list_prim_u_8_strict( + Uint8List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + serializer.buffer.putUint8List(self); + } + + @protected + void sse_encode_list_record_list_prim_u_32_strict_list_condition( + List<(Uint32List, List)> self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_record_list_prim_u_32_strict_list_condition(item, serializer); + } + } + + @protected + void sse_encode_list_record_string_list_prim_u_32_strict( + List<(String, Uint32List)> self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_record_string_list_prim_u_32_strict(item, serializer); + } + } + + @protected + void sse_encode_list_record_u_32_list_condition( + List<(int, List)> self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_record_u_32_list_condition(item, serializer); + } + } + + @protected + void sse_encode_list_script_amount( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_script_amount(item, serializer); + } + } + + @protected + void sse_encode_list_transaction_details( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_transaction_details(item, serializer); + } + } + + @protected + void sse_encode_list_tx_in(List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_tx_in(item, serializer); + } + } + + @protected + void sse_encode_list_tx_out(List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_tx_out(item, serializer); + } + } + + @protected + void sse_encode_local_utxo(LocalUtxo self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_out_point(self.outpoint, serializer); + sse_encode_tx_out(self.txout, serializer); + sse_encode_keychain_kind(self.keychain, serializer); + sse_encode_bool(self.isSpent, serializer); + } + + @protected + void sse_encode_lock_time(LockTime self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case LockTime_Blocks(field0: final field0): + sse_encode_i_32(0, serializer); + sse_encode_u_32(field0, serializer); + case LockTime_Seconds(field0: final field0): + sse_encode_i_32(1, serializer); + sse_encode_u_32(field0, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_network(Network self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_opt_Map_String_list_prim_u_32_strict( + Map? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_Map_String_list_prim_u_32_strict(self, serializer); + } + } + + @protected + void sse_encode_opt_String(String? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_String(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_bdk_address( + BdkAddress? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_bdk_address(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_bdk_descriptor( + BdkDescriptor? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_bdk_descriptor(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_bdk_policy( + BdkPolicy? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_bdk_policy(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_bdk_script_buf( + BdkScriptBuf? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_bdk_script_buf(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_bdk_transaction( + BdkTransaction? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_bdk_transaction(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_block_time( + BlockTime? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_block_time(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_bool(bool? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_bool(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_f_32(double? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_f_32(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_fee_rate( + FeeRate? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_fee_rate(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_lock_time( + LockTime? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_lock_time(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_psbt_sig_hash_type( + PsbtSigHashType? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_psbt_sig_hash_type(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_rbf_value( + RbfValue? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_rbf_value(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_record_out_point_input_usize( + (OutPoint, Input, BigInt)? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_record_out_point_input_usize(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_rpc_sync_params( + RpcSyncParams? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_rpc_sync_params(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_sign_options( + SignOptions? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_sign_options(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_u_32(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_u_64(BigInt? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_u_64(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_u_8(int? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_u_8(self, serializer); + } + } + + @protected + void sse_encode_out_point(OutPoint self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.txid, serializer); + sse_encode_u_32(self.vout, serializer); + } + + @protected + void sse_encode_payload(Payload self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case Payload_PubkeyHash(pubkeyHash: final pubkeyHash): + sse_encode_i_32(0, serializer); + sse_encode_String(pubkeyHash, serializer); + case Payload_ScriptHash(scriptHash: final scriptHash): + sse_encode_i_32(1, serializer); + sse_encode_String(scriptHash, serializer); + case Payload_WitnessProgram( + version: final version, + program: final program + ): + sse_encode_i_32(2, serializer); + sse_encode_witness_version(version, serializer); + sse_encode_list_prim_u_8_strict(program, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_pk_or_f(PkOrF self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case PkOrF_Pubkey(value: final value): + sse_encode_i_32(0, serializer); + sse_encode_String(value, serializer); + case PkOrF_XOnlyPubkey(value: final value): + sse_encode_i_32(1, serializer); + sse_encode_String(value, serializer); + case PkOrF_Fingerprint(value: final value): + sse_encode_i_32(2, serializer); + sse_encode_String(value, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_psbt_sig_hash_type( + PsbtSigHashType self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_32(self.inner, serializer); + } + + @protected + void sse_encode_rbf_value(RbfValue self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case RbfValue_RbfDefault(): + sse_encode_i_32(0, serializer); + case RbfValue_Value(field0: final field0): + sse_encode_i_32(1, serializer); + sse_encode_u_32(field0, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_record_bdk_address_u_32( + (BdkAddress, int) self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_address(self.$1, serializer); + sse_encode_u_32(self.$2, serializer); + } + + @protected + void sse_encode_record_bdk_psbt_transaction_details( + (BdkPsbt, TransactionDetails) self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_psbt(self.$1, serializer); + sse_encode_transaction_details(self.$2, serializer); + } + + @protected + void sse_encode_record_list_prim_u_32_strict_list_condition( + (Uint32List, List) self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_prim_u_32_strict(self.$1, serializer); + sse_encode_list_condition(self.$2, serializer); + } + + @protected + void sse_encode_record_out_point_input_usize( + (OutPoint, Input, BigInt) self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_out_point(self.$1, serializer); + sse_encode_input(self.$2, serializer); + sse_encode_usize(self.$3, serializer); + } + + @protected + void sse_encode_record_string_list_prim_u_32_strict( + (String, Uint32List) self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.$1, serializer); + sse_encode_list_prim_u_32_strict(self.$2, serializer); + } + + @protected + void sse_encode_record_u_32_list_condition( + (int, List) self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_32(self.$1, serializer); + sse_encode_list_condition(self.$2, serializer); + } + + @protected + void sse_encode_rpc_config(RpcConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.url, serializer); + sse_encode_auth(self.auth, serializer); + sse_encode_network(self.network, serializer); + sse_encode_String(self.walletName, serializer); + sse_encode_opt_box_autoadd_rpc_sync_params(self.syncParams, serializer); + } + + @protected + void sse_encode_rpc_sync_params( + RpcSyncParams self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.startScriptCount, serializer); + sse_encode_u_64(self.startTime, serializer); + sse_encode_bool(self.forceStartTime, serializer); + sse_encode_u_64(self.pollRateSec, serializer); + } + + @protected + void sse_encode_satisfaction(Satisfaction self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case Satisfaction_Partial( + n: final n, + m: final m, + items: final items, + sorted: final sorted, + conditions: final conditions + ): + sse_encode_i_32(0, serializer); + sse_encode_u_64(n, serializer); + sse_encode_u_64(m, serializer); + sse_encode_list_prim_u_64_strict(items, serializer); + sse_encode_opt_box_autoadd_bool(sorted, serializer); + sse_encode_Map_u_32_list_condition(conditions, serializer); + case Satisfaction_PartialComplete( + n: final n, + m: final m, + items: final items, + sorted: final sorted, + conditions: final conditions + ): + sse_encode_i_32(1, serializer); + sse_encode_u_64(n, serializer); + sse_encode_u_64(m, serializer); + sse_encode_list_prim_u_64_strict(items, serializer); + sse_encode_opt_box_autoadd_bool(sorted, serializer); + sse_encode_Map_list_prim_u_32_strict_list_condition( + conditions, serializer); + case Satisfaction_Complete(condition: final condition): + sse_encode_i_32(2, serializer); + sse_encode_box_autoadd_condition(condition, serializer); + case Satisfaction_None(msg: final msg): + sse_encode_i_32(3, serializer); + sse_encode_String(msg, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_satisfiable_item( + SatisfiableItem self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case SatisfiableItem_EcdsaSignature(key: final key): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_pk_or_f(key, serializer); + case SatisfiableItem_SchnorrSignature(key: final key): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_pk_or_f(key, serializer); + case SatisfiableItem_Sha256Preimage(hash: final hash): + sse_encode_i_32(2, serializer); + sse_encode_String(hash, serializer); + case SatisfiableItem_Hash256Preimage(hash: final hash): + sse_encode_i_32(3, serializer); + sse_encode_String(hash, serializer); + case SatisfiableItem_Ripemd160Preimage(hash: final hash): + sse_encode_i_32(4, serializer); + sse_encode_String(hash, serializer); + case SatisfiableItem_Hash160Preimage(hash: final hash): + sse_encode_i_32(5, serializer); + sse_encode_String(hash, serializer); + case SatisfiableItem_AbsoluteTimelock(value: final value): + sse_encode_i_32(6, serializer); + sse_encode_box_autoadd_lock_time(value, serializer); + case SatisfiableItem_RelativeTimelock(value: final value): + sse_encode_i_32(7, serializer); + sse_encode_u_32(value, serializer); + case SatisfiableItem_Multisig( + keys: final keys, + threshold: final threshold + ): + sse_encode_i_32(8, serializer); + sse_encode_list_pk_or_f(keys, serializer); + sse_encode_u_64(threshold, serializer); + case SatisfiableItem_Thresh( + items: final items, + threshold: final threshold + ): + sse_encode_i_32(9, serializer); + sse_encode_list_bdk_policy(items, serializer); + sse_encode_u_64(threshold, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_script_amount(ScriptAmount self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bdk_script_buf(self.script, serializer); + sse_encode_u_64(self.amount, serializer); + } + + @protected + void sse_encode_sign_options(SignOptions self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bool(self.trustWitnessUtxo, serializer); + sse_encode_opt_box_autoadd_u_32(self.assumeHeight, serializer); + sse_encode_bool(self.allowAllSighashes, serializer); + sse_encode_bool(self.removePartialSigs, serializer); + sse_encode_bool(self.tryFinalize, serializer); + sse_encode_bool(self.signWithTapInternalKey, serializer); + sse_encode_bool(self.allowGrinding, serializer); + } + + @protected + void sse_encode_sled_db_configuration( + SledDbConfiguration self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.path, serializer); + sse_encode_String(self.treeName, serializer); + } + + @protected + void sse_encode_sqlite_db_configuration( + SqliteDbConfiguration self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.path, serializer); + } + + @protected + void sse_encode_transaction_details( + TransactionDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_box_autoadd_bdk_transaction(self.transaction, serializer); + sse_encode_String(self.txid, serializer); + sse_encode_u_64(self.received, serializer); + sse_encode_u_64(self.sent, serializer); + sse_encode_opt_box_autoadd_u_64(self.fee, serializer); + sse_encode_opt_box_autoadd_block_time(self.confirmationTime, serializer); + } + + @protected + void sse_encode_tx_in(TxIn self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_out_point(self.previousOutput, serializer); + sse_encode_bdk_script_buf(self.scriptSig, serializer); + sse_encode_u_32(self.sequence, serializer); + sse_encode_list_list_prim_u_8_strict(self.witness, serializer); + } + + @protected + void sse_encode_tx_out(TxOut self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.value, serializer); + sse_encode_bdk_script_buf(self.scriptPubkey, serializer); + } + + @protected + void sse_encode_u_32(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint32(self); + } + + @protected + void sse_encode_u_64(BigInt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putBigUint64(self); + } + + @protected + void sse_encode_u_8(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint8(self); + } + + @protected + void sse_encode_u_8_array_4(U8Array4 self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_prim_u_8_strict(self.inner, serializer); + } + + @protected + void sse_encode_unit(void self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + } + + @protected + void sse_encode_usize(BigInt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putBigUint64(self); + } + + @protected + void sse_encode_variant(Variant self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_witness_version( + WitnessVersion self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_word_count(WordCount self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } +} + +@sealed +class AddressImpl extends RustOpaque implements Address { + // Not to be used by end users + AddressImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + AddressImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_Address, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_Address, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_AddressPtr, + ); +} + +@sealed +class AnyBlockchainImpl extends RustOpaque implements AnyBlockchain { + // Not to be used by end users + AnyBlockchainImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + AnyBlockchainImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_AnyBlockchain, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_AnyBlockchain, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_AnyBlockchainPtr, + ); +} + +@sealed +class DerivationPathImpl extends RustOpaque implements DerivationPath { + // Not to be used by end users + DerivationPathImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + DerivationPathImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_DerivationPath, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_DerivationPath, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_DerivationPathPtr, + ); +} + +@sealed +class DescriptorPublicKeyImpl extends RustOpaque + implements DescriptorPublicKey { + // Not to be used by end users + DescriptorPublicKeyImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + DescriptorPublicKeyImpl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_DescriptorPublicKey, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_DescriptorPublicKey, + rustArcDecrementStrongCountPtr: core + .instance.api.rust_arc_decrement_strong_count_DescriptorPublicKeyPtr, + ); +} + +@sealed +class DescriptorSecretKeyImpl extends RustOpaque + implements DescriptorSecretKey { + // Not to be used by end users + DescriptorSecretKeyImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + DescriptorSecretKeyImpl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_DescriptorSecretKey, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_DescriptorSecretKey, + rustArcDecrementStrongCountPtr: core + .instance.api.rust_arc_decrement_strong_count_DescriptorSecretKeyPtr, + ); +} + +@sealed +class ExtendedDescriptorImpl extends RustOpaque implements ExtendedDescriptor { + // Not to be used by end users + ExtendedDescriptorImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + ExtendedDescriptorImpl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_ExtendedDescriptor, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptor, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptorPtr, + ); +} + +@sealed +class KeyMapImpl extends RustOpaque implements KeyMap { + // Not to be used by end users + KeyMapImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + KeyMapImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_KeyMap, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_KeyMap, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_KeyMapPtr, + ); +} + +@sealed +class MnemonicImpl extends RustOpaque implements Mnemonic { + // Not to be used by end users + MnemonicImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + MnemonicImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_Mnemonic, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_Mnemonic, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_MnemonicPtr, + ); +} + +@sealed +class MutexPartiallySignedTransactionImpl extends RustOpaque + implements MutexPartiallySignedTransaction { + // Not to be used by end users + MutexPartiallySignedTransactionImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + MutexPartiallySignedTransactionImpl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: core.instance.api + .rust_arc_increment_strong_count_MutexPartiallySignedTransaction, + rustArcDecrementStrongCount: core.instance.api + .rust_arc_decrement_strong_count_MutexPartiallySignedTransaction, + rustArcDecrementStrongCountPtr: core.instance.api + .rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr, + ); +} + +@sealed +class MutexWalletAnyDatabaseImpl extends RustOpaque + implements MutexWalletAnyDatabase { + // Not to be used by end users + MutexWalletAnyDatabaseImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + MutexWalletAnyDatabaseImpl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: core + .instance.api.rust_arc_increment_strong_count_MutexWalletAnyDatabase, + rustArcDecrementStrongCount: core + .instance.api.rust_arc_decrement_strong_count_MutexWalletAnyDatabase, + rustArcDecrementStrongCountPtr: core + .instance.api.rust_arc_decrement_strong_count_MutexWalletAnyDatabasePtr, + ); +} + +@sealed +class PolicyImpl extends RustOpaque implements Policy { + // Not to be used by end users + PolicyImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + PolicyImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_Policy, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_Policy, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_PolicyPtr, + ); +} diff --git a/lib/src/generated/frb_generated.io.dart b/lib/src/generated/frb_generated.io.dart new file mode 100644 index 00000000..2b17a149 --- /dev/null +++ b/lib/src/generated/frb_generated.io.dart @@ -0,0 +1,8116 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field + +import 'api/blockchain.dart'; +import 'api/descriptor.dart'; +import 'api/error.dart'; +import 'api/key.dart'; +import 'api/psbt.dart'; +import 'api/types.dart'; +import 'api/wallet.dart'; +import 'dart:async'; +import 'dart:convert'; +import 'dart:ffi' as ffi; +import 'frb_generated.dart'; +import 'lib.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; + +abstract class coreApiImplPlatform extends BaseApiImpl { + coreApiImplPlatform({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AddressPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_DerivationPathPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_AnyBlockchainPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ExtendedDescriptorPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_PolicyPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicyPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_DescriptorPublicKeyPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_DescriptorSecretKeyPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeyMapPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMapPtr; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MnemonicPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexWalletAnyDatabasePtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr; + + @protected + Map dco_decode_Map_String_list_prim_u_32_strict( + dynamic raw); + + @protected + Map> + dco_decode_Map_list_prim_u_32_strict_list_condition(dynamic raw); + + @protected + Map> dco_decode_Map_u_32_list_condition(dynamic raw); + + @protected + Address dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw); + + @protected + DerivationPath dco_decode_RustOpaque_bdkbitcoinbip32DerivationPath( + dynamic raw); + + @protected + AnyBlockchain dco_decode_RustOpaque_bdkblockchainAnyBlockchain(dynamic raw); + + @protected + ExtendedDescriptor dco_decode_RustOpaque_bdkdescriptorExtendedDescriptor( + dynamic raw); + + @protected + Policy dco_decode_RustOpaque_bdkdescriptorPolicy(dynamic raw); + + @protected + DescriptorPublicKey dco_decode_RustOpaque_bdkkeysDescriptorPublicKey( + dynamic raw); + + @protected + DescriptorSecretKey dco_decode_RustOpaque_bdkkeysDescriptorSecretKey( + dynamic raw); + + @protected + KeyMap dco_decode_RustOpaque_bdkkeysKeyMap(dynamic raw); + + @protected + Mnemonic dco_decode_RustOpaque_bdkkeysbip39Mnemonic(dynamic raw); + + @protected + MutexWalletAnyDatabase + dco_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + dynamic raw); + + @protected + MutexPartiallySignedTransaction + dco_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + dynamic raw); + + @protected + String dco_decode_String(dynamic raw); + + @protected + AddressError dco_decode_address_error(dynamic raw); + + @protected + AddressIndex dco_decode_address_index(dynamic raw); + + @protected + Auth dco_decode_auth(dynamic raw); + + @protected + Balance dco_decode_balance(dynamic raw); + + @protected + BdkAddress dco_decode_bdk_address(dynamic raw); + + @protected + BdkBlockchain dco_decode_bdk_blockchain(dynamic raw); + + @protected + BdkDerivationPath dco_decode_bdk_derivation_path(dynamic raw); + + @protected + BdkDescriptor dco_decode_bdk_descriptor(dynamic raw); + + @protected + BdkDescriptorPublicKey dco_decode_bdk_descriptor_public_key(dynamic raw); + + @protected + BdkDescriptorSecretKey dco_decode_bdk_descriptor_secret_key(dynamic raw); + + @protected + BdkError dco_decode_bdk_error(dynamic raw); + + @protected + BdkMnemonic dco_decode_bdk_mnemonic(dynamic raw); + + @protected + BdkPolicy dco_decode_bdk_policy(dynamic raw); + + @protected + BdkPsbt dco_decode_bdk_psbt(dynamic raw); + + @protected + BdkScriptBuf dco_decode_bdk_script_buf(dynamic raw); + + @protected + BdkTransaction dco_decode_bdk_transaction(dynamic raw); + + @protected + BdkWallet dco_decode_bdk_wallet(dynamic raw); + + @protected + BlockTime dco_decode_block_time(dynamic raw); + + @protected + BlockchainConfig dco_decode_blockchain_config(dynamic raw); + + @protected + bool dco_decode_bool(dynamic raw); + + @protected + AddressError dco_decode_box_autoadd_address_error(dynamic raw); + + @protected + AddressIndex dco_decode_box_autoadd_address_index(dynamic raw); + + @protected + BdkAddress dco_decode_box_autoadd_bdk_address(dynamic raw); + + @protected + BdkBlockchain dco_decode_box_autoadd_bdk_blockchain(dynamic raw); + + @protected + BdkDerivationPath dco_decode_box_autoadd_bdk_derivation_path(dynamic raw); + + @protected + BdkDescriptor dco_decode_box_autoadd_bdk_descriptor(dynamic raw); + + @protected + BdkDescriptorPublicKey dco_decode_box_autoadd_bdk_descriptor_public_key( + dynamic raw); + + @protected + BdkDescriptorSecretKey dco_decode_box_autoadd_bdk_descriptor_secret_key( + dynamic raw); + + @protected + BdkMnemonic dco_decode_box_autoadd_bdk_mnemonic(dynamic raw); + + @protected + BdkPolicy dco_decode_box_autoadd_bdk_policy(dynamic raw); + + @protected + BdkPsbt dco_decode_box_autoadd_bdk_psbt(dynamic raw); + + @protected + BdkScriptBuf dco_decode_box_autoadd_bdk_script_buf(dynamic raw); + + @protected + BdkTransaction dco_decode_box_autoadd_bdk_transaction(dynamic raw); + + @protected + BdkWallet dco_decode_box_autoadd_bdk_wallet(dynamic raw); + + @protected + BlockTime dco_decode_box_autoadd_block_time(dynamic raw); + + @protected + BlockchainConfig dco_decode_box_autoadd_blockchain_config(dynamic raw); + + @protected + bool dco_decode_box_autoadd_bool(dynamic raw); + + @protected + Condition dco_decode_box_autoadd_condition(dynamic raw); + + @protected + ConsensusError dco_decode_box_autoadd_consensus_error(dynamic raw); + + @protected + DatabaseConfig dco_decode_box_autoadd_database_config(dynamic raw); + + @protected + DescriptorError dco_decode_box_autoadd_descriptor_error(dynamic raw); + + @protected + ElectrumConfig dco_decode_box_autoadd_electrum_config(dynamic raw); + + @protected + EsploraConfig dco_decode_box_autoadd_esplora_config(dynamic raw); + + @protected + double dco_decode_box_autoadd_f_32(dynamic raw); + + @protected + FeeRate dco_decode_box_autoadd_fee_rate(dynamic raw); + + @protected + HexError dco_decode_box_autoadd_hex_error(dynamic raw); + + @protected + LocalUtxo dco_decode_box_autoadd_local_utxo(dynamic raw); + + @protected + LockTime dco_decode_box_autoadd_lock_time(dynamic raw); + + @protected + OutPoint dco_decode_box_autoadd_out_point(dynamic raw); + + @protected + PkOrF dco_decode_box_autoadd_pk_or_f(dynamic raw); + + @protected + PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw); + + @protected + RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw); + + @protected + (OutPoint, Input, BigInt) dco_decode_box_autoadd_record_out_point_input_usize( + dynamic raw); + + @protected + RpcConfig dco_decode_box_autoadd_rpc_config(dynamic raw); + + @protected + RpcSyncParams dco_decode_box_autoadd_rpc_sync_params(dynamic raw); + + @protected + SignOptions dco_decode_box_autoadd_sign_options(dynamic raw); + + @protected + SledDbConfiguration dco_decode_box_autoadd_sled_db_configuration(dynamic raw); + + @protected + SqliteDbConfiguration dco_decode_box_autoadd_sqlite_db_configuration( + dynamic raw); + + @protected + int dco_decode_box_autoadd_u_32(dynamic raw); + + @protected + BigInt dco_decode_box_autoadd_u_64(dynamic raw); + + @protected + int dco_decode_box_autoadd_u_8(dynamic raw); + + @protected + ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw); + + @protected + Condition dco_decode_condition(dynamic raw); + + @protected + ConsensusError dco_decode_consensus_error(dynamic raw); + + @protected + DatabaseConfig dco_decode_database_config(dynamic raw); + + @protected + DescriptorError dco_decode_descriptor_error(dynamic raw); + + @protected + ElectrumConfig dco_decode_electrum_config(dynamic raw); + + @protected + EsploraConfig dco_decode_esplora_config(dynamic raw); + + @protected + double dco_decode_f_32(dynamic raw); + + @protected + FeeRate dco_decode_fee_rate(dynamic raw); + + @protected + HexError dco_decode_hex_error(dynamic raw); + + @protected + int dco_decode_i_32(dynamic raw); + + @protected + Input dco_decode_input(dynamic raw); + + @protected + KeychainKind dco_decode_keychain_kind(dynamic raw); + + @protected + List dco_decode_list_bdk_policy(dynamic raw); + + @protected + List dco_decode_list_condition(dynamic raw); + + @protected + List dco_decode_list_list_prim_u_8_strict(dynamic raw); + + @protected + List dco_decode_list_local_utxo(dynamic raw); + + @protected + List dco_decode_list_out_point(dynamic raw); + + @protected + List dco_decode_list_pk_or_f(dynamic raw); + + @protected + Uint32List dco_decode_list_prim_u_32_strict(dynamic raw); + + @protected + Uint64List dco_decode_list_prim_u_64_strict(dynamic raw); + + @protected + List dco_decode_list_prim_u_8_loose(dynamic raw); + + @protected + Uint8List dco_decode_list_prim_u_8_strict(dynamic raw); + + @protected + List<(Uint32List, List)> + dco_decode_list_record_list_prim_u_32_strict_list_condition(dynamic raw); + + @protected + List<(String, Uint32List)> + dco_decode_list_record_string_list_prim_u_32_strict(dynamic raw); + + @protected + List<(int, List)> dco_decode_list_record_u_32_list_condition( + dynamic raw); + + @protected + List dco_decode_list_script_amount(dynamic raw); + + @protected + List dco_decode_list_transaction_details(dynamic raw); + + @protected + List dco_decode_list_tx_in(dynamic raw); + + @protected + List dco_decode_list_tx_out(dynamic raw); + + @protected + LocalUtxo dco_decode_local_utxo(dynamic raw); + + @protected + LockTime dco_decode_lock_time(dynamic raw); + + @protected + Network dco_decode_network(dynamic raw); + + @protected + Map? dco_decode_opt_Map_String_list_prim_u_32_strict( + dynamic raw); + + @protected + String? dco_decode_opt_String(dynamic raw); + + @protected + BdkAddress? dco_decode_opt_box_autoadd_bdk_address(dynamic raw); + + @protected + BdkDescriptor? dco_decode_opt_box_autoadd_bdk_descriptor(dynamic raw); + + @protected + BdkPolicy? dco_decode_opt_box_autoadd_bdk_policy(dynamic raw); + + @protected + BdkScriptBuf? dco_decode_opt_box_autoadd_bdk_script_buf(dynamic raw); + + @protected + BdkTransaction? dco_decode_opt_box_autoadd_bdk_transaction(dynamic raw); + + @protected + BlockTime? dco_decode_opt_box_autoadd_block_time(dynamic raw); + + @protected + bool? dco_decode_opt_box_autoadd_bool(dynamic raw); + + @protected + double? dco_decode_opt_box_autoadd_f_32(dynamic raw); + + @protected + FeeRate? dco_decode_opt_box_autoadd_fee_rate(dynamic raw); + + @protected + LockTime? dco_decode_opt_box_autoadd_lock_time(dynamic raw); + + @protected + PsbtSigHashType? dco_decode_opt_box_autoadd_psbt_sig_hash_type(dynamic raw); + + @protected + RbfValue? dco_decode_opt_box_autoadd_rbf_value(dynamic raw); + + @protected + (OutPoint, Input, BigInt)? + dco_decode_opt_box_autoadd_record_out_point_input_usize(dynamic raw); + + @protected + RpcSyncParams? dco_decode_opt_box_autoadd_rpc_sync_params(dynamic raw); + + @protected + SignOptions? dco_decode_opt_box_autoadd_sign_options(dynamic raw); + + @protected + int? dco_decode_opt_box_autoadd_u_32(dynamic raw); + + @protected + BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw); + + @protected + int? dco_decode_opt_box_autoadd_u_8(dynamic raw); + + @protected + OutPoint dco_decode_out_point(dynamic raw); + + @protected + Payload dco_decode_payload(dynamic raw); + + @protected + PkOrF dco_decode_pk_or_f(dynamic raw); + + @protected + PsbtSigHashType dco_decode_psbt_sig_hash_type(dynamic raw); + + @protected + RbfValue dco_decode_rbf_value(dynamic raw); + + @protected + (BdkAddress, int) dco_decode_record_bdk_address_u_32(dynamic raw); + + @protected + (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details( + dynamic raw); + + @protected + (Uint32List, List) + dco_decode_record_list_prim_u_32_strict_list_condition(dynamic raw); + + @protected + (OutPoint, Input, BigInt) dco_decode_record_out_point_input_usize( + dynamic raw); + + @protected + (String, Uint32List) dco_decode_record_string_list_prim_u_32_strict( + dynamic raw); + + @protected + (int, List) dco_decode_record_u_32_list_condition(dynamic raw); + + @protected + RpcConfig dco_decode_rpc_config(dynamic raw); + + @protected + RpcSyncParams dco_decode_rpc_sync_params(dynamic raw); + + @protected + Satisfaction dco_decode_satisfaction(dynamic raw); + + @protected + SatisfiableItem dco_decode_satisfiable_item(dynamic raw); + + @protected + ScriptAmount dco_decode_script_amount(dynamic raw); + + @protected + SignOptions dco_decode_sign_options(dynamic raw); + + @protected + SledDbConfiguration dco_decode_sled_db_configuration(dynamic raw); + + @protected + SqliteDbConfiguration dco_decode_sqlite_db_configuration(dynamic raw); + + @protected + TransactionDetails dco_decode_transaction_details(dynamic raw); + + @protected + TxIn dco_decode_tx_in(dynamic raw); + + @protected + TxOut dco_decode_tx_out(dynamic raw); + + @protected + int dco_decode_u_32(dynamic raw); + + @protected + BigInt dco_decode_u_64(dynamic raw); + + @protected + int dco_decode_u_8(dynamic raw); + + @protected + U8Array4 dco_decode_u_8_array_4(dynamic raw); + + @protected + void dco_decode_unit(dynamic raw); + + @protected + BigInt dco_decode_usize(dynamic raw); + + @protected + Variant dco_decode_variant(dynamic raw); + + @protected + WitnessVersion dco_decode_witness_version(dynamic raw); + + @protected + WordCount dco_decode_word_count(dynamic raw); + + @protected + Map sse_decode_Map_String_list_prim_u_32_strict( + SseDeserializer deserializer); + + @protected + Map> + sse_decode_Map_list_prim_u_32_strict_list_condition( + SseDeserializer deserializer); + + @protected + Map> sse_decode_Map_u_32_list_condition( + SseDeserializer deserializer); + + @protected + Address sse_decode_RustOpaque_bdkbitcoinAddress(SseDeserializer deserializer); + + @protected + DerivationPath sse_decode_RustOpaque_bdkbitcoinbip32DerivationPath( + SseDeserializer deserializer); + + @protected + AnyBlockchain sse_decode_RustOpaque_bdkblockchainAnyBlockchain( + SseDeserializer deserializer); + + @protected + ExtendedDescriptor sse_decode_RustOpaque_bdkdescriptorExtendedDescriptor( + SseDeserializer deserializer); + + @protected + Policy sse_decode_RustOpaque_bdkdescriptorPolicy( + SseDeserializer deserializer); + + @protected + DescriptorPublicKey sse_decode_RustOpaque_bdkkeysDescriptorPublicKey( + SseDeserializer deserializer); + + @protected + DescriptorSecretKey sse_decode_RustOpaque_bdkkeysDescriptorSecretKey( + SseDeserializer deserializer); + + @protected + KeyMap sse_decode_RustOpaque_bdkkeysKeyMap(SseDeserializer deserializer); + + @protected + Mnemonic sse_decode_RustOpaque_bdkkeysbip39Mnemonic( + SseDeserializer deserializer); + + @protected + MutexWalletAnyDatabase + sse_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + SseDeserializer deserializer); + + @protected + MutexPartiallySignedTransaction + sse_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + SseDeserializer deserializer); + + @protected + String sse_decode_String(SseDeserializer deserializer); + + @protected + AddressError sse_decode_address_error(SseDeserializer deserializer); + + @protected + AddressIndex sse_decode_address_index(SseDeserializer deserializer); + + @protected + Auth sse_decode_auth(SseDeserializer deserializer); + + @protected + Balance sse_decode_balance(SseDeserializer deserializer); + + @protected + BdkAddress sse_decode_bdk_address(SseDeserializer deserializer); + + @protected + BdkBlockchain sse_decode_bdk_blockchain(SseDeserializer deserializer); + + @protected + BdkDerivationPath sse_decode_bdk_derivation_path( + SseDeserializer deserializer); + + @protected + BdkDescriptor sse_decode_bdk_descriptor(SseDeserializer deserializer); + + @protected + BdkDescriptorPublicKey sse_decode_bdk_descriptor_public_key( + SseDeserializer deserializer); + + @protected + BdkDescriptorSecretKey sse_decode_bdk_descriptor_secret_key( + SseDeserializer deserializer); + + @protected + BdkError sse_decode_bdk_error(SseDeserializer deserializer); + + @protected + BdkMnemonic sse_decode_bdk_mnemonic(SseDeserializer deserializer); + + @protected + BdkPolicy sse_decode_bdk_policy(SseDeserializer deserializer); + + @protected + BdkPsbt sse_decode_bdk_psbt(SseDeserializer deserializer); + + @protected + BdkScriptBuf sse_decode_bdk_script_buf(SseDeserializer deserializer); + + @protected + BdkTransaction sse_decode_bdk_transaction(SseDeserializer deserializer); + + @protected + BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer); + + @protected + BlockTime sse_decode_block_time(SseDeserializer deserializer); + + @protected + BlockchainConfig sse_decode_blockchain_config(SseDeserializer deserializer); + + @protected + bool sse_decode_bool(SseDeserializer deserializer); + + @protected + AddressError sse_decode_box_autoadd_address_error( + SseDeserializer deserializer); + + @protected + AddressIndex sse_decode_box_autoadd_address_index( + SseDeserializer deserializer); + + @protected + BdkAddress sse_decode_box_autoadd_bdk_address(SseDeserializer deserializer); + + @protected + BdkBlockchain sse_decode_box_autoadd_bdk_blockchain( + SseDeserializer deserializer); + + @protected + BdkDerivationPath sse_decode_box_autoadd_bdk_derivation_path( + SseDeserializer deserializer); + + @protected + BdkDescriptor sse_decode_box_autoadd_bdk_descriptor( + SseDeserializer deserializer); + + @protected + BdkDescriptorPublicKey sse_decode_box_autoadd_bdk_descriptor_public_key( + SseDeserializer deserializer); + + @protected + BdkDescriptorSecretKey sse_decode_box_autoadd_bdk_descriptor_secret_key( + SseDeserializer deserializer); + + @protected + BdkMnemonic sse_decode_box_autoadd_bdk_mnemonic(SseDeserializer deserializer); + + @protected + BdkPolicy sse_decode_box_autoadd_bdk_policy(SseDeserializer deserializer); + + @protected + BdkPsbt sse_decode_box_autoadd_bdk_psbt(SseDeserializer deserializer); + + @protected + BdkScriptBuf sse_decode_box_autoadd_bdk_script_buf( + SseDeserializer deserializer); + + @protected + BdkTransaction sse_decode_box_autoadd_bdk_transaction( + SseDeserializer deserializer); + + @protected + BdkWallet sse_decode_box_autoadd_bdk_wallet(SseDeserializer deserializer); + + @protected + BlockTime sse_decode_box_autoadd_block_time(SseDeserializer deserializer); + + @protected + BlockchainConfig sse_decode_box_autoadd_blockchain_config( + SseDeserializer deserializer); + + @protected + bool sse_decode_box_autoadd_bool(SseDeserializer deserializer); + + @protected + Condition sse_decode_box_autoadd_condition(SseDeserializer deserializer); + + @protected + ConsensusError sse_decode_box_autoadd_consensus_error( + SseDeserializer deserializer); + + @protected + DatabaseConfig sse_decode_box_autoadd_database_config( + SseDeserializer deserializer); + + @protected + DescriptorError sse_decode_box_autoadd_descriptor_error( + SseDeserializer deserializer); + + @protected + ElectrumConfig sse_decode_box_autoadd_electrum_config( + SseDeserializer deserializer); + + @protected + EsploraConfig sse_decode_box_autoadd_esplora_config( + SseDeserializer deserializer); + + @protected + double sse_decode_box_autoadd_f_32(SseDeserializer deserializer); + + @protected + FeeRate sse_decode_box_autoadd_fee_rate(SseDeserializer deserializer); + + @protected + HexError sse_decode_box_autoadd_hex_error(SseDeserializer deserializer); + + @protected + LocalUtxo sse_decode_box_autoadd_local_utxo(SseDeserializer deserializer); + + @protected + LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer); + + @protected + OutPoint sse_decode_box_autoadd_out_point(SseDeserializer deserializer); + + @protected + PkOrF sse_decode_box_autoadd_pk_or_f(SseDeserializer deserializer); + + @protected + PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( + SseDeserializer deserializer); + + @protected + RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer); + + @protected + (OutPoint, Input, BigInt) sse_decode_box_autoadd_record_out_point_input_usize( + SseDeserializer deserializer); + + @protected + RpcConfig sse_decode_box_autoadd_rpc_config(SseDeserializer deserializer); + + @protected + RpcSyncParams sse_decode_box_autoadd_rpc_sync_params( + SseDeserializer deserializer); + + @protected + SignOptions sse_decode_box_autoadd_sign_options(SseDeserializer deserializer); + + @protected + SledDbConfiguration sse_decode_box_autoadd_sled_db_configuration( + SseDeserializer deserializer); + + @protected + SqliteDbConfiguration sse_decode_box_autoadd_sqlite_db_configuration( + SseDeserializer deserializer); + + @protected + int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); + + @protected + BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer); + + @protected + int sse_decode_box_autoadd_u_8(SseDeserializer deserializer); + + @protected + ChangeSpendPolicy sse_decode_change_spend_policy( + SseDeserializer deserializer); + + @protected + Condition sse_decode_condition(SseDeserializer deserializer); + + @protected + ConsensusError sse_decode_consensus_error(SseDeserializer deserializer); + + @protected + DatabaseConfig sse_decode_database_config(SseDeserializer deserializer); + + @protected + DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer); + + @protected + ElectrumConfig sse_decode_electrum_config(SseDeserializer deserializer); + + @protected + EsploraConfig sse_decode_esplora_config(SseDeserializer deserializer); + + @protected + double sse_decode_f_32(SseDeserializer deserializer); + + @protected + FeeRate sse_decode_fee_rate(SseDeserializer deserializer); + + @protected + HexError sse_decode_hex_error(SseDeserializer deserializer); + + @protected + int sse_decode_i_32(SseDeserializer deserializer); + + @protected + Input sse_decode_input(SseDeserializer deserializer); + + @protected + KeychainKind sse_decode_keychain_kind(SseDeserializer deserializer); + + @protected + List sse_decode_list_bdk_policy(SseDeserializer deserializer); + + @protected + List sse_decode_list_condition(SseDeserializer deserializer); + + @protected + List sse_decode_list_list_prim_u_8_strict( + SseDeserializer deserializer); + + @protected + List sse_decode_list_local_utxo(SseDeserializer deserializer); + + @protected + List sse_decode_list_out_point(SseDeserializer deserializer); + + @protected + List sse_decode_list_pk_or_f(SseDeserializer deserializer); + + @protected + Uint32List sse_decode_list_prim_u_32_strict(SseDeserializer deserializer); + + @protected + Uint64List sse_decode_list_prim_u_64_strict(SseDeserializer deserializer); + + @protected + List sse_decode_list_prim_u_8_loose(SseDeserializer deserializer); + + @protected + Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer); + + @protected + List<(Uint32List, List)> + sse_decode_list_record_list_prim_u_32_strict_list_condition( + SseDeserializer deserializer); + + @protected + List<(String, Uint32List)> + sse_decode_list_record_string_list_prim_u_32_strict( + SseDeserializer deserializer); + + @protected + List<(int, List)> sse_decode_list_record_u_32_list_condition( + SseDeserializer deserializer); + + @protected + List sse_decode_list_script_amount( + SseDeserializer deserializer); + + @protected + List sse_decode_list_transaction_details( + SseDeserializer deserializer); + + @protected + List sse_decode_list_tx_in(SseDeserializer deserializer); + + @protected + List sse_decode_list_tx_out(SseDeserializer deserializer); + + @protected + LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer); + + @protected + LockTime sse_decode_lock_time(SseDeserializer deserializer); + + @protected + Network sse_decode_network(SseDeserializer deserializer); + + @protected + Map? sse_decode_opt_Map_String_list_prim_u_32_strict( + SseDeserializer deserializer); + + @protected + String? sse_decode_opt_String(SseDeserializer deserializer); + + @protected + BdkAddress? sse_decode_opt_box_autoadd_bdk_address( + SseDeserializer deserializer); + + @protected + BdkDescriptor? sse_decode_opt_box_autoadd_bdk_descriptor( + SseDeserializer deserializer); + + @protected + BdkPolicy? sse_decode_opt_box_autoadd_bdk_policy( + SseDeserializer deserializer); + + @protected + BdkScriptBuf? sse_decode_opt_box_autoadd_bdk_script_buf( + SseDeserializer deserializer); + + @protected + BdkTransaction? sse_decode_opt_box_autoadd_bdk_transaction( + SseDeserializer deserializer); + + @protected + BlockTime? sse_decode_opt_box_autoadd_block_time( + SseDeserializer deserializer); + + @protected + bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer); + + @protected + double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer); + + @protected + FeeRate? sse_decode_opt_box_autoadd_fee_rate(SseDeserializer deserializer); + + @protected + LockTime? sse_decode_opt_box_autoadd_lock_time(SseDeserializer deserializer); + + @protected + PsbtSigHashType? sse_decode_opt_box_autoadd_psbt_sig_hash_type( + SseDeserializer deserializer); + + @protected + RbfValue? sse_decode_opt_box_autoadd_rbf_value(SseDeserializer deserializer); + + @protected + (OutPoint, Input, BigInt)? + sse_decode_opt_box_autoadd_record_out_point_input_usize( + SseDeserializer deserializer); + + @protected + RpcSyncParams? sse_decode_opt_box_autoadd_rpc_sync_params( + SseDeserializer deserializer); + + @protected + SignOptions? sse_decode_opt_box_autoadd_sign_options( + SseDeserializer deserializer); + + @protected + int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer); + + @protected + BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer); + + @protected + int? sse_decode_opt_box_autoadd_u_8(SseDeserializer deserializer); + + @protected + OutPoint sse_decode_out_point(SseDeserializer deserializer); + + @protected + Payload sse_decode_payload(SseDeserializer deserializer); + + @protected + PkOrF sse_decode_pk_or_f(SseDeserializer deserializer); + + @protected + PsbtSigHashType sse_decode_psbt_sig_hash_type(SseDeserializer deserializer); + + @protected + RbfValue sse_decode_rbf_value(SseDeserializer deserializer); + + @protected + (BdkAddress, int) sse_decode_record_bdk_address_u_32( + SseDeserializer deserializer); + + @protected + (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details( + SseDeserializer deserializer); + + @protected + (Uint32List, List) + sse_decode_record_list_prim_u_32_strict_list_condition( + SseDeserializer deserializer); + + @protected + (OutPoint, Input, BigInt) sse_decode_record_out_point_input_usize( + SseDeserializer deserializer); + + @protected + (String, Uint32List) sse_decode_record_string_list_prim_u_32_strict( + SseDeserializer deserializer); + + @protected + (int, List) sse_decode_record_u_32_list_condition( + SseDeserializer deserializer); + + @protected + RpcConfig sse_decode_rpc_config(SseDeserializer deserializer); + + @protected + RpcSyncParams sse_decode_rpc_sync_params(SseDeserializer deserializer); + + @protected + Satisfaction sse_decode_satisfaction(SseDeserializer deserializer); + + @protected + SatisfiableItem sse_decode_satisfiable_item(SseDeserializer deserializer); + + @protected + ScriptAmount sse_decode_script_amount(SseDeserializer deserializer); + + @protected + SignOptions sse_decode_sign_options(SseDeserializer deserializer); + + @protected + SledDbConfiguration sse_decode_sled_db_configuration( + SseDeserializer deserializer); + + @protected + SqliteDbConfiguration sse_decode_sqlite_db_configuration( + SseDeserializer deserializer); + + @protected + TransactionDetails sse_decode_transaction_details( + SseDeserializer deserializer); + + @protected + TxIn sse_decode_tx_in(SseDeserializer deserializer); + + @protected + TxOut sse_decode_tx_out(SseDeserializer deserializer); + + @protected + int sse_decode_u_32(SseDeserializer deserializer); + + @protected + BigInt sse_decode_u_64(SseDeserializer deserializer); + + @protected + int sse_decode_u_8(SseDeserializer deserializer); + + @protected + U8Array4 sse_decode_u_8_array_4(SseDeserializer deserializer); + + @protected + void sse_decode_unit(SseDeserializer deserializer); + + @protected + BigInt sse_decode_usize(SseDeserializer deserializer); + + @protected + Variant sse_decode_variant(SseDeserializer deserializer); + + @protected + WitnessVersion sse_decode_witness_version(SseDeserializer deserializer); + + @protected + WordCount sse_decode_word_count(SseDeserializer deserializer); + + @protected + ffi.Pointer + cst_encode_Map_String_list_prim_u_32_strict(Map raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_list_record_string_list_prim_u_32_strict( + raw.entries.map((e) => (e.key, e.value)).toList()); + } + + @protected + ffi.Pointer + cst_encode_Map_list_prim_u_32_strict_list_condition( + Map> raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_list_record_list_prim_u_32_strict_list_condition( + raw.entries.map((e) => (e.key, e.value)).toList()); + } + + @protected + ffi.Pointer + cst_encode_Map_u_32_list_condition(Map> raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_list_record_u_32_list_condition( + raw.entries.map((e) => (e.key, e.value)).toList()); + } + + @protected + ffi.Pointer cst_encode_String(String raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_list_prim_u_8_strict(utf8.encoder.convert(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_address_error( + AddressError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_address_error(); + cst_api_fill_to_wire_address_error(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_address_index( + AddressIndex raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_address_index(); + cst_api_fill_to_wire_address_index(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bdk_address( + BdkAddress raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_address(); + cst_api_fill_to_wire_bdk_address(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bdk_blockchain( + BdkBlockchain raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_blockchain(); + cst_api_fill_to_wire_bdk_blockchain(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_bdk_derivation_path(BdkDerivationPath raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_derivation_path(); + cst_api_fill_to_wire_bdk_derivation_path(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bdk_descriptor( + BdkDescriptor raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_descriptor(); + cst_api_fill_to_wire_bdk_descriptor(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_bdk_descriptor_public_key( + BdkDescriptorPublicKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_descriptor_public_key(); + cst_api_fill_to_wire_bdk_descriptor_public_key(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_bdk_descriptor_secret_key( + BdkDescriptorSecretKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_descriptor_secret_key(); + cst_api_fill_to_wire_bdk_descriptor_secret_key(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bdk_mnemonic( + BdkMnemonic raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_mnemonic(); + cst_api_fill_to_wire_bdk_mnemonic(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bdk_policy( + BdkPolicy raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_policy(); + cst_api_fill_to_wire_bdk_policy(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bdk_psbt(BdkPsbt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_psbt(); + cst_api_fill_to_wire_bdk_psbt(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bdk_script_buf( + BdkScriptBuf raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_script_buf(); + cst_api_fill_to_wire_bdk_script_buf(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bdk_transaction( + BdkTransaction raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_transaction(); + cst_api_fill_to_wire_bdk_transaction(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bdk_wallet( + BdkWallet raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bdk_wallet(); + cst_api_fill_to_wire_bdk_wallet(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_block_time( + BlockTime raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_block_time(); + cst_api_fill_to_wire_block_time(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_blockchain_config(BlockchainConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_blockchain_config(); + cst_api_fill_to_wire_blockchain_config(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bool(bool raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_bool(cst_encode_bool(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_condition( + Condition raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_condition(); + cst_api_fill_to_wire_condition(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_consensus_error( + ConsensusError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_consensus_error(); + cst_api_fill_to_wire_consensus_error(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_database_config( + DatabaseConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_database_config(); + cst_api_fill_to_wire_database_config(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_descriptor_error(DescriptorError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_descriptor_error(); + cst_api_fill_to_wire_descriptor_error(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_electrum_config( + ElectrumConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_electrum_config(); + cst_api_fill_to_wire_electrum_config(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_esplora_config( + EsploraConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_esplora_config(); + cst_api_fill_to_wire_esplora_config(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_f_32(double raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_f_32(cst_encode_f_32(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_fee_rate(FeeRate raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_fee_rate(); + cst_api_fill_to_wire_fee_rate(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_hex_error( + HexError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_hex_error(); + cst_api_fill_to_wire_hex_error(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_local_utxo( + LocalUtxo raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_local_utxo(); + cst_api_fill_to_wire_local_utxo(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_lock_time( + LockTime raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_lock_time(); + cst_api_fill_to_wire_lock_time(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_out_point( + OutPoint raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_out_point(); + cst_api_fill_to_wire_out_point(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_pk_or_f(PkOrF raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_pk_or_f(); + cst_api_fill_to_wire_pk_or_f(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_psbt_sig_hash_type(PsbtSigHashType raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_psbt_sig_hash_type(); + cst_api_fill_to_wire_psbt_sig_hash_type(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_rbf_value( + RbfValue raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_rbf_value(); + cst_api_fill_to_wire_rbf_value(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_record_out_point_input_usize( + (OutPoint, Input, BigInt) raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_record_out_point_input_usize(); + cst_api_fill_to_wire_record_out_point_input_usize(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_rpc_config( + RpcConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_rpc_config(); + cst_api_fill_to_wire_rpc_config(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_rpc_sync_params( + RpcSyncParams raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_rpc_sync_params(); + cst_api_fill_to_wire_rpc_sync_params(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_sign_options( + SignOptions raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_sign_options(); + cst_api_fill_to_wire_sign_options(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_sled_db_configuration(SledDbConfiguration raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_sled_db_configuration(); + cst_api_fill_to_wire_sled_db_configuration(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_sqlite_db_configuration( + SqliteDbConfiguration raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_sqlite_db_configuration(); + cst_api_fill_to_wire_sqlite_db_configuration(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_u_32(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_u_32(cst_encode_u_32(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_u_64(BigInt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_u_64(cst_encode_u_64(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_u_8(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_u_8(cst_encode_u_8(raw)); + } + + @protected + ffi.Pointer cst_encode_list_bdk_policy( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_bdk_policy(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_bdk_policy(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_condition( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_condition(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_condition(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer + cst_encode_list_list_prim_u_8_strict(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_list_prim_u_8_strict(raw.length); + for (var i = 0; i < raw.length; ++i) { + ans.ref.ptr[i] = cst_encode_list_prim_u_8_strict(raw[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_local_utxo( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_local_utxo(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_local_utxo(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_out_point( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_out_point(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_out_point(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_pk_or_f(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_pk_or_f(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_pk_or_f(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_prim_u_32_strict( + Uint32List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_prim_u_32_strict(raw.length); + ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); + return ans; + } + + @protected + ffi.Pointer cst_encode_list_prim_u_64_strict( + Uint64List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_prim_u_64_strict(raw.length); + ans.ref.ptr.asTypedList(raw.length).setAll(0, raw.inner); + return ans; + } + + @protected + ffi.Pointer cst_encode_list_prim_u_8_loose( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_prim_u_8_loose(raw.length); + ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); + return ans; + } + + @protected + ffi.Pointer cst_encode_list_prim_u_8_strict( + Uint8List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_prim_u_8_strict(raw.length); + ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); + return ans; + } + + @protected + ffi.Pointer + cst_encode_list_record_list_prim_u_32_strict_list_condition( + List<(Uint32List, List)> raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire + .cst_new_list_record_list_prim_u_32_strict_list_condition(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_record_list_prim_u_32_strict_list_condition( + raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer + cst_encode_list_record_string_list_prim_u_32_strict( + List<(String, Uint32List)> raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = + wire.cst_new_list_record_string_list_prim_u_32_strict(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_record_string_list_prim_u_32_strict( + raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer + cst_encode_list_record_u_32_list_condition( + List<(int, List)> raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_record_u_32_list_condition(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_record_u_32_list_condition(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_script_amount( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_script_amount(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_script_amount(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer + cst_encode_list_transaction_details(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_transaction_details(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_transaction_details(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_tx_in(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_tx_in(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_tx_in(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_tx_out(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_tx_out(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_tx_out(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer + cst_encode_opt_Map_String_list_prim_u_32_strict( + Map? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_Map_String_list_prim_u_32_strict(raw); + } + + @protected + ffi.Pointer cst_encode_opt_String( + String? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_String(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_bdk_address( + BdkAddress? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_bdk_address(raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_bdk_descriptor(BdkDescriptor? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_bdk_descriptor(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_bdk_policy( + BdkPolicy? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_bdk_policy(raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_bdk_script_buf(BdkScriptBuf? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_bdk_script_buf(raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_bdk_transaction(BdkTransaction? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_bdk_transaction(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_block_time( + BlockTime? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_block_time(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_bool(bool? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_bool(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_f_32(double? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_f_32(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_fee_rate( + FeeRate? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_fee_rate(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_lock_time( + LockTime? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_lock_time(raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_psbt_sig_hash_type(PsbtSigHashType? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_psbt_sig_hash_type(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_rbf_value( + RbfValue? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_rbf_value(raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_record_out_point_input_usize( + (OutPoint, Input, BigInt)? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_record_out_point_input_usize(raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_rpc_sync_params(RpcSyncParams? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_rpc_sync_params(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_sign_options( + SignOptions? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_sign_options(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_u_32(int? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_32(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_u_64(BigInt? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_64(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_u_8(int? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_8(raw); + } + + @protected + int cst_encode_u_64(BigInt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.toSigned(64).toInt(); + } + + @protected + ffi.Pointer cst_encode_u_8_array_4( + U8Array4 raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_prim_u_8_strict(4); + ans.ref.ptr.asTypedList(4).setAll(0, raw); + return ans; + } + + @protected + int cst_encode_usize(BigInt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.toSigned(64).toInt(); + } + + @protected + void cst_api_fill_to_wire_address_error( + AddressError apiObj, wire_cst_address_error wireObj) { + if (apiObj is AddressError_Base58) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 0; + wireObj.kind.Base58.field0 = pre_field0; + return; + } + if (apiObj is AddressError_Bech32) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 1; + wireObj.kind.Bech32.field0 = pre_field0; + return; + } + if (apiObj is AddressError_EmptyBech32Payload) { + wireObj.tag = 2; + return; + } + if (apiObj is AddressError_InvalidBech32Variant) { + var pre_expected = cst_encode_variant(apiObj.expected); + var pre_found = cst_encode_variant(apiObj.found); + wireObj.tag = 3; + wireObj.kind.InvalidBech32Variant.expected = pre_expected; + wireObj.kind.InvalidBech32Variant.found = pre_found; + return; + } + if (apiObj is AddressError_InvalidWitnessVersion) { + var pre_field0 = cst_encode_u_8(apiObj.field0); + wireObj.tag = 4; + wireObj.kind.InvalidWitnessVersion.field0 = pre_field0; + return; + } + if (apiObj is AddressError_UnparsableWitnessVersion) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 5; + wireObj.kind.UnparsableWitnessVersion.field0 = pre_field0; + return; + } + if (apiObj is AddressError_MalformedWitnessVersion) { + wireObj.tag = 6; + return; + } + if (apiObj is AddressError_InvalidWitnessProgramLength) { + var pre_field0 = cst_encode_usize(apiObj.field0); + wireObj.tag = 7; + wireObj.kind.InvalidWitnessProgramLength.field0 = pre_field0; + return; + } + if (apiObj is AddressError_InvalidSegwitV0ProgramLength) { + var pre_field0 = cst_encode_usize(apiObj.field0); + wireObj.tag = 8; + wireObj.kind.InvalidSegwitV0ProgramLength.field0 = pre_field0; + return; + } + if (apiObj is AddressError_UncompressedPubkey) { + wireObj.tag = 9; + return; + } + if (apiObj is AddressError_ExcessiveScriptSize) { + wireObj.tag = 10; + return; + } + if (apiObj is AddressError_UnrecognizedScript) { + wireObj.tag = 11; + return; + } + if (apiObj is AddressError_UnknownAddressType) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 12; + wireObj.kind.UnknownAddressType.field0 = pre_field0; + return; + } + if (apiObj is AddressError_NetworkValidation) { + var pre_network_required = cst_encode_network(apiObj.networkRequired); + var pre_network_found = cst_encode_network(apiObj.networkFound); + var pre_address = cst_encode_String(apiObj.address); + wireObj.tag = 13; + wireObj.kind.NetworkValidation.network_required = pre_network_required; + wireObj.kind.NetworkValidation.network_found = pre_network_found; + wireObj.kind.NetworkValidation.address = pre_address; + return; + } + } + + @protected + void cst_api_fill_to_wire_address_index( + AddressIndex apiObj, wire_cst_address_index wireObj) { + if (apiObj is AddressIndex_Increase) { + wireObj.tag = 0; + return; + } + if (apiObj is AddressIndex_LastUnused) { + wireObj.tag = 1; + return; + } + if (apiObj is AddressIndex_Peek) { + var pre_index = cst_encode_u_32(apiObj.index); + wireObj.tag = 2; + wireObj.kind.Peek.index = pre_index; + return; + } + if (apiObj is AddressIndex_Reset) { + var pre_index = cst_encode_u_32(apiObj.index); + wireObj.tag = 3; + wireObj.kind.Reset.index = pre_index; + return; + } + } + + @protected + void cst_api_fill_to_wire_auth(Auth apiObj, wire_cst_auth wireObj) { + if (apiObj is Auth_None) { + wireObj.tag = 0; + return; + } + if (apiObj is Auth_UserPass) { + var pre_username = cst_encode_String(apiObj.username); + var pre_password = cst_encode_String(apiObj.password); + wireObj.tag = 1; + wireObj.kind.UserPass.username = pre_username; + wireObj.kind.UserPass.password = pre_password; + return; + } + if (apiObj is Auth_Cookie) { + var pre_file = cst_encode_String(apiObj.file); + wireObj.tag = 2; + wireObj.kind.Cookie.file = pre_file; + return; + } + } + + @protected + void cst_api_fill_to_wire_balance(Balance apiObj, wire_cst_balance wireObj) { + wireObj.immature = cst_encode_u_64(apiObj.immature); + wireObj.trusted_pending = cst_encode_u_64(apiObj.trustedPending); + wireObj.untrusted_pending = cst_encode_u_64(apiObj.untrustedPending); + wireObj.confirmed = cst_encode_u_64(apiObj.confirmed); + wireObj.spendable = cst_encode_u_64(apiObj.spendable); + wireObj.total = cst_encode_u_64(apiObj.total); + } + + @protected + void cst_api_fill_to_wire_bdk_address( + BdkAddress apiObj, wire_cst_bdk_address wireObj) { + wireObj.ptr = cst_encode_RustOpaque_bdkbitcoinAddress(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_blockchain( + BdkBlockchain apiObj, wire_cst_bdk_blockchain wireObj) { + wireObj.ptr = cst_encode_RustOpaque_bdkblockchainAnyBlockchain(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_derivation_path( + BdkDerivationPath apiObj, wire_cst_bdk_derivation_path wireObj) { + wireObj.ptr = + cst_encode_RustOpaque_bdkbitcoinbip32DerivationPath(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_descriptor( + BdkDescriptor apiObj, wire_cst_bdk_descriptor wireObj) { + wireObj.extended_descriptor = + cst_encode_RustOpaque_bdkdescriptorExtendedDescriptor( + apiObj.extendedDescriptor); + wireObj.key_map = cst_encode_RustOpaque_bdkkeysKeyMap(apiObj.keyMap); + } + + @protected + void cst_api_fill_to_wire_bdk_descriptor_public_key( + BdkDescriptorPublicKey apiObj, + wire_cst_bdk_descriptor_public_key wireObj) { + wireObj.ptr = cst_encode_RustOpaque_bdkkeysDescriptorPublicKey(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_descriptor_secret_key( + BdkDescriptorSecretKey apiObj, + wire_cst_bdk_descriptor_secret_key wireObj) { + wireObj.ptr = cst_encode_RustOpaque_bdkkeysDescriptorSecretKey(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_error( + BdkError apiObj, wire_cst_bdk_error wireObj) { + if (apiObj is BdkError_Hex) { + var pre_field0 = cst_encode_box_autoadd_hex_error(apiObj.field0); + wireObj.tag = 0; + wireObj.kind.Hex.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Consensus) { + var pre_field0 = cst_encode_box_autoadd_consensus_error(apiObj.field0); + wireObj.tag = 1; + wireObj.kind.Consensus.field0 = pre_field0; + return; + } + if (apiObj is BdkError_VerifyTransaction) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 2; + wireObj.kind.VerifyTransaction.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Address) { + var pre_field0 = cst_encode_box_autoadd_address_error(apiObj.field0); + wireObj.tag = 3; + wireObj.kind.Address.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Descriptor) { + var pre_field0 = cst_encode_box_autoadd_descriptor_error(apiObj.field0); + wireObj.tag = 4; + wireObj.kind.Descriptor.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidU32Bytes) { + var pre_field0 = cst_encode_list_prim_u_8_strict(apiObj.field0); + wireObj.tag = 5; + wireObj.kind.InvalidU32Bytes.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Generic) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 6; + wireObj.kind.Generic.field0 = pre_field0; + return; + } + if (apiObj is BdkError_ScriptDoesntHaveAddressForm) { + wireObj.tag = 7; + return; + } + if (apiObj is BdkError_NoRecipients) { + wireObj.tag = 8; + return; + } + if (apiObj is BdkError_NoUtxosSelected) { + wireObj.tag = 9; + return; + } + if (apiObj is BdkError_OutputBelowDustLimit) { + var pre_field0 = cst_encode_usize(apiObj.field0); + wireObj.tag = 10; + wireObj.kind.OutputBelowDustLimit.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InsufficientFunds) { + var pre_needed = cst_encode_u_64(apiObj.needed); + var pre_available = cst_encode_u_64(apiObj.available); + wireObj.tag = 11; + wireObj.kind.InsufficientFunds.needed = pre_needed; + wireObj.kind.InsufficientFunds.available = pre_available; + return; + } + if (apiObj is BdkError_BnBTotalTriesExceeded) { + wireObj.tag = 12; + return; + } + if (apiObj is BdkError_BnBNoExactMatch) { + wireObj.tag = 13; + return; + } + if (apiObj is BdkError_UnknownUtxo) { + wireObj.tag = 14; + return; + } + if (apiObj is BdkError_TransactionNotFound) { + wireObj.tag = 15; + return; + } + if (apiObj is BdkError_TransactionConfirmed) { + wireObj.tag = 16; + return; + } + if (apiObj is BdkError_IrreplaceableTransaction) { + wireObj.tag = 17; + return; + } + if (apiObj is BdkError_FeeRateTooLow) { + var pre_needed = cst_encode_f_32(apiObj.needed); + wireObj.tag = 18; + wireObj.kind.FeeRateTooLow.needed = pre_needed; + return; + } + if (apiObj is BdkError_FeeTooLow) { + var pre_needed = cst_encode_u_64(apiObj.needed); + wireObj.tag = 19; + wireObj.kind.FeeTooLow.needed = pre_needed; + return; + } + if (apiObj is BdkError_FeeRateUnavailable) { + wireObj.tag = 20; + return; + } + if (apiObj is BdkError_MissingKeyOrigin) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 21; + wireObj.kind.MissingKeyOrigin.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Key) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 22; + wireObj.kind.Key.field0 = pre_field0; + return; + } + if (apiObj is BdkError_ChecksumMismatch) { + wireObj.tag = 23; + return; + } + if (apiObj is BdkError_SpendingPolicyRequired) { + var pre_field0 = cst_encode_keychain_kind(apiObj.field0); + wireObj.tag = 24; + wireObj.kind.SpendingPolicyRequired.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidPolicyPathError) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 25; + wireObj.kind.InvalidPolicyPathError.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Signer) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 26; + wireObj.kind.Signer.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidNetwork) { + var pre_requested = cst_encode_network(apiObj.requested); + var pre_found = cst_encode_network(apiObj.found); + wireObj.tag = 27; + wireObj.kind.InvalidNetwork.requested = pre_requested; + wireObj.kind.InvalidNetwork.found = pre_found; + return; + } + if (apiObj is BdkError_InvalidOutpoint) { + var pre_field0 = cst_encode_box_autoadd_out_point(apiObj.field0); + wireObj.tag = 28; + wireObj.kind.InvalidOutpoint.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Encode) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 29; + wireObj.kind.Encode.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Miniscript) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 30; + wireObj.kind.Miniscript.field0 = pre_field0; + return; + } + if (apiObj is BdkError_MiniscriptPsbt) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 31; + wireObj.kind.MiniscriptPsbt.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Bip32) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 32; + wireObj.kind.Bip32.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Bip39) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 33; + wireObj.kind.Bip39.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Secp256k1) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 34; + wireObj.kind.Secp256k1.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Json) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 35; + wireObj.kind.Json.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Psbt) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 36; + wireObj.kind.Psbt.field0 = pre_field0; + return; + } + if (apiObj is BdkError_PsbtParse) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 37; + wireObj.kind.PsbtParse.field0 = pre_field0; + return; + } + if (apiObj is BdkError_MissingCachedScripts) { + var pre_field0 = cst_encode_usize(apiObj.field0); + var pre_field1 = cst_encode_usize(apiObj.field1); + wireObj.tag = 38; + wireObj.kind.MissingCachedScripts.field0 = pre_field0; + wireObj.kind.MissingCachedScripts.field1 = pre_field1; + return; + } + if (apiObj is BdkError_Electrum) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 39; + wireObj.kind.Electrum.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Esplora) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 40; + wireObj.kind.Esplora.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Sled) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 41; + wireObj.kind.Sled.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Rpc) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 42; + wireObj.kind.Rpc.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Rusqlite) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 43; + wireObj.kind.Rusqlite.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidInput) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 44; + wireObj.kind.InvalidInput.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidLockTime) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 45; + wireObj.kind.InvalidLockTime.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidTransaction) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 46; + wireObj.kind.InvalidTransaction.field0 = pre_field0; + return; + } + } + + @protected + void cst_api_fill_to_wire_bdk_mnemonic( + BdkMnemonic apiObj, wire_cst_bdk_mnemonic wireObj) { + wireObj.ptr = cst_encode_RustOpaque_bdkkeysbip39Mnemonic(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_policy( + BdkPolicy apiObj, wire_cst_bdk_policy wireObj) { + wireObj.ptr = cst_encode_RustOpaque_bdkdescriptorPolicy(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_psbt( + BdkPsbt apiObj, wire_cst_bdk_psbt wireObj) { + wireObj.ptr = + cst_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_script_buf( + BdkScriptBuf apiObj, wire_cst_bdk_script_buf wireObj) { + wireObj.bytes = cst_encode_list_prim_u_8_strict(apiObj.bytes); + } + + @protected + void cst_api_fill_to_wire_bdk_transaction( + BdkTransaction apiObj, wire_cst_bdk_transaction wireObj) { + wireObj.s = cst_encode_String(apiObj.s); + } + + @protected + void cst_api_fill_to_wire_bdk_wallet( + BdkWallet apiObj, wire_cst_bdk_wallet wireObj) { + wireObj.ptr = + cst_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_block_time( + BlockTime apiObj, wire_cst_block_time wireObj) { + wireObj.height = cst_encode_u_32(apiObj.height); + wireObj.timestamp = cst_encode_u_64(apiObj.timestamp); + } + + @protected + void cst_api_fill_to_wire_blockchain_config( + BlockchainConfig apiObj, wire_cst_blockchain_config wireObj) { + if (apiObj is BlockchainConfig_Electrum) { + var pre_config = cst_encode_box_autoadd_electrum_config(apiObj.config); + wireObj.tag = 0; + wireObj.kind.Electrum.config = pre_config; + return; + } + if (apiObj is BlockchainConfig_Esplora) { + var pre_config = cst_encode_box_autoadd_esplora_config(apiObj.config); + wireObj.tag = 1; + wireObj.kind.Esplora.config = pre_config; + return; + } + if (apiObj is BlockchainConfig_Rpc) { + var pre_config = cst_encode_box_autoadd_rpc_config(apiObj.config); + wireObj.tag = 2; + wireObj.kind.Rpc.config = pre_config; + return; + } + } + + @protected + void cst_api_fill_to_wire_box_autoadd_address_error( + AddressError apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_address_error(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_address_index( + AddressIndex apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_address_index(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_address( + BdkAddress apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_address(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_blockchain( + BdkBlockchain apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_blockchain(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_derivation_path( + BdkDerivationPath apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_derivation_path(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_descriptor( + BdkDescriptor apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_descriptor(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_descriptor_public_key( + BdkDescriptorPublicKey apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_descriptor_public_key(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_descriptor_secret_key( + BdkDescriptorSecretKey apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_descriptor_secret_key(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_mnemonic( + BdkMnemonic apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_mnemonic(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_policy( + BdkPolicy apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_policy(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_psbt( + BdkPsbt apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_psbt(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_script_buf( + BdkScriptBuf apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_script_buf(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_transaction( + BdkTransaction apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_transaction(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bdk_wallet( + BdkWallet apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bdk_wallet(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_block_time( + BlockTime apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_block_time(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_blockchain_config( + BlockchainConfig apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_blockchain_config(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_condition( + Condition apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_condition(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_consensus_error( + ConsensusError apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_consensus_error(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_database_config( + DatabaseConfig apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_database_config(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_descriptor_error( + DescriptorError apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_descriptor_error(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_electrum_config( + ElectrumConfig apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_electrum_config(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_esplora_config( + EsploraConfig apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_esplora_config(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_fee_rate( + FeeRate apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_fee_rate(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_hex_error( + HexError apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_hex_error(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_local_utxo( + LocalUtxo apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_local_utxo(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_lock_time( + LockTime apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_lock_time(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_out_point( + OutPoint apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_out_point(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_pk_or_f( + PkOrF apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_pk_or_f(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_psbt_sig_hash_type( + PsbtSigHashType apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_psbt_sig_hash_type(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_rbf_value( + RbfValue apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_rbf_value(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_record_out_point_input_usize( + (OutPoint, Input, BigInt) apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_record_out_point_input_usize(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_rpc_config( + RpcConfig apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_rpc_config(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_rpc_sync_params( + RpcSyncParams apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_rpc_sync_params(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_sign_options( + SignOptions apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_sign_options(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_sled_db_configuration( + SledDbConfiguration apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_sled_db_configuration(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_sqlite_db_configuration( + SqliteDbConfiguration apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_sqlite_db_configuration(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_condition( + Condition apiObj, wire_cst_condition wireObj) { + wireObj.csv = cst_encode_opt_box_autoadd_u_32(apiObj.csv); + wireObj.timelock = cst_encode_opt_box_autoadd_lock_time(apiObj.timelock); + } + + @protected + void cst_api_fill_to_wire_consensus_error( + ConsensusError apiObj, wire_cst_consensus_error wireObj) { + if (apiObj is ConsensusError_Io) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 0; + wireObj.kind.Io.field0 = pre_field0; + return; + } + if (apiObj is ConsensusError_OversizedVectorAllocation) { + var pre_requested = cst_encode_usize(apiObj.requested); + var pre_max = cst_encode_usize(apiObj.max); + wireObj.tag = 1; + wireObj.kind.OversizedVectorAllocation.requested = pre_requested; + wireObj.kind.OversizedVectorAllocation.max = pre_max; + return; + } + if (apiObj is ConsensusError_InvalidChecksum) { + var pre_expected = cst_encode_u_8_array_4(apiObj.expected); + var pre_actual = cst_encode_u_8_array_4(apiObj.actual); + wireObj.tag = 2; + wireObj.kind.InvalidChecksum.expected = pre_expected; + wireObj.kind.InvalidChecksum.actual = pre_actual; + return; + } + if (apiObj is ConsensusError_NonMinimalVarInt) { + wireObj.tag = 3; + return; + } + if (apiObj is ConsensusError_ParseFailed) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 4; + wireObj.kind.ParseFailed.field0 = pre_field0; + return; + } + if (apiObj is ConsensusError_UnsupportedSegwitFlag) { + var pre_field0 = cst_encode_u_8(apiObj.field0); + wireObj.tag = 5; + wireObj.kind.UnsupportedSegwitFlag.field0 = pre_field0; + return; + } + } + + @protected + void cst_api_fill_to_wire_database_config( + DatabaseConfig apiObj, wire_cst_database_config wireObj) { + if (apiObj is DatabaseConfig_Memory) { + wireObj.tag = 0; + return; + } + if (apiObj is DatabaseConfig_Sqlite) { + var pre_config = + cst_encode_box_autoadd_sqlite_db_configuration(apiObj.config); + wireObj.tag = 1; + wireObj.kind.Sqlite.config = pre_config; + return; + } + if (apiObj is DatabaseConfig_Sled) { + var pre_config = + cst_encode_box_autoadd_sled_db_configuration(apiObj.config); + wireObj.tag = 2; + wireObj.kind.Sled.config = pre_config; + return; + } + } + + @protected + void cst_api_fill_to_wire_descriptor_error( + DescriptorError apiObj, wire_cst_descriptor_error wireObj) { + if (apiObj is DescriptorError_InvalidHdKeyPath) { + wireObj.tag = 0; + return; + } + if (apiObj is DescriptorError_InvalidDescriptorChecksum) { + wireObj.tag = 1; + return; + } + if (apiObj is DescriptorError_HardenedDerivationXpub) { + wireObj.tag = 2; + return; + } + if (apiObj is DescriptorError_MultiPath) { + wireObj.tag = 3; + return; + } + if (apiObj is DescriptorError_Key) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 4; + wireObj.kind.Key.field0 = pre_field0; + return; + } + if (apiObj is DescriptorError_Policy) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 5; + wireObj.kind.Policy.field0 = pre_field0; + return; + } + if (apiObj is DescriptorError_InvalidDescriptorCharacter) { + var pre_field0 = cst_encode_u_8(apiObj.field0); + wireObj.tag = 6; + wireObj.kind.InvalidDescriptorCharacter.field0 = pre_field0; + return; + } + if (apiObj is DescriptorError_Bip32) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 7; + wireObj.kind.Bip32.field0 = pre_field0; + return; + } + if (apiObj is DescriptorError_Base58) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 8; + wireObj.kind.Base58.field0 = pre_field0; + return; + } + if (apiObj is DescriptorError_Pk) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 9; + wireObj.kind.Pk.field0 = pre_field0; + return; + } + if (apiObj is DescriptorError_Miniscript) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 10; + wireObj.kind.Miniscript.field0 = pre_field0; + return; + } + if (apiObj is DescriptorError_Hex) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 11; + wireObj.kind.Hex.field0 = pre_field0; + return; + } + } + + @protected + void cst_api_fill_to_wire_electrum_config( + ElectrumConfig apiObj, wire_cst_electrum_config wireObj) { + wireObj.url = cst_encode_String(apiObj.url); + wireObj.socks5 = cst_encode_opt_String(apiObj.socks5); + wireObj.retry = cst_encode_u_8(apiObj.retry); + wireObj.timeout = cst_encode_opt_box_autoadd_u_8(apiObj.timeout); + wireObj.stop_gap = cst_encode_u_64(apiObj.stopGap); + wireObj.validate_domain = cst_encode_bool(apiObj.validateDomain); + } + + @protected + void cst_api_fill_to_wire_esplora_config( + EsploraConfig apiObj, wire_cst_esplora_config wireObj) { + wireObj.base_url = cst_encode_String(apiObj.baseUrl); + wireObj.proxy = cst_encode_opt_String(apiObj.proxy); + wireObj.concurrency = cst_encode_opt_box_autoadd_u_8(apiObj.concurrency); + wireObj.stop_gap = cst_encode_u_64(apiObj.stopGap); + wireObj.timeout = cst_encode_opt_box_autoadd_u_64(apiObj.timeout); + } + + @protected + void cst_api_fill_to_wire_fee_rate( + FeeRate apiObj, wire_cst_fee_rate wireObj) { + wireObj.sat_per_vb = cst_encode_f_32(apiObj.satPerVb); + } + + @protected + void cst_api_fill_to_wire_hex_error( + HexError apiObj, wire_cst_hex_error wireObj) { + if (apiObj is HexError_InvalidChar) { + var pre_field0 = cst_encode_u_8(apiObj.field0); + wireObj.tag = 0; + wireObj.kind.InvalidChar.field0 = pre_field0; + return; + } + if (apiObj is HexError_OddLengthString) { + var pre_field0 = cst_encode_usize(apiObj.field0); + wireObj.tag = 1; + wireObj.kind.OddLengthString.field0 = pre_field0; + return; + } + if (apiObj is HexError_InvalidLength) { + var pre_field0 = cst_encode_usize(apiObj.field0); + var pre_field1 = cst_encode_usize(apiObj.field1); + wireObj.tag = 2; + wireObj.kind.InvalidLength.field0 = pre_field0; + wireObj.kind.InvalidLength.field1 = pre_field1; + return; + } + } + + @protected + void cst_api_fill_to_wire_input(Input apiObj, wire_cst_input wireObj) { + wireObj.s = cst_encode_String(apiObj.s); + } + + @protected + void cst_api_fill_to_wire_local_utxo( + LocalUtxo apiObj, wire_cst_local_utxo wireObj) { + cst_api_fill_to_wire_out_point(apiObj.outpoint, wireObj.outpoint); + cst_api_fill_to_wire_tx_out(apiObj.txout, wireObj.txout); + wireObj.keychain = cst_encode_keychain_kind(apiObj.keychain); + wireObj.is_spent = cst_encode_bool(apiObj.isSpent); + } + + @protected + void cst_api_fill_to_wire_lock_time( + LockTime apiObj, wire_cst_lock_time wireObj) { + if (apiObj is LockTime_Blocks) { + var pre_field0 = cst_encode_u_32(apiObj.field0); + wireObj.tag = 0; + wireObj.kind.Blocks.field0 = pre_field0; + return; + } + if (apiObj is LockTime_Seconds) { + var pre_field0 = cst_encode_u_32(apiObj.field0); + wireObj.tag = 1; + wireObj.kind.Seconds.field0 = pre_field0; + return; + } + } + + @protected + void cst_api_fill_to_wire_out_point( + OutPoint apiObj, wire_cst_out_point wireObj) { + wireObj.txid = cst_encode_String(apiObj.txid); + wireObj.vout = cst_encode_u_32(apiObj.vout); + } + + @protected + void cst_api_fill_to_wire_payload(Payload apiObj, wire_cst_payload wireObj) { + if (apiObj is Payload_PubkeyHash) { + var pre_pubkey_hash = cst_encode_String(apiObj.pubkeyHash); + wireObj.tag = 0; + wireObj.kind.PubkeyHash.pubkey_hash = pre_pubkey_hash; + return; + } + if (apiObj is Payload_ScriptHash) { + var pre_script_hash = cst_encode_String(apiObj.scriptHash); + wireObj.tag = 1; + wireObj.kind.ScriptHash.script_hash = pre_script_hash; + return; + } + if (apiObj is Payload_WitnessProgram) { + var pre_version = cst_encode_witness_version(apiObj.version); + var pre_program = cst_encode_list_prim_u_8_strict(apiObj.program); + wireObj.tag = 2; + wireObj.kind.WitnessProgram.version = pre_version; + wireObj.kind.WitnessProgram.program = pre_program; + return; + } + } + + @protected + void cst_api_fill_to_wire_pk_or_f(PkOrF apiObj, wire_cst_pk_or_f wireObj) { + if (apiObj is PkOrF_Pubkey) { + var pre_value = cst_encode_String(apiObj.value); + wireObj.tag = 0; + wireObj.kind.Pubkey.value = pre_value; + return; + } + if (apiObj is PkOrF_XOnlyPubkey) { + var pre_value = cst_encode_String(apiObj.value); + wireObj.tag = 1; + wireObj.kind.XOnlyPubkey.value = pre_value; + return; + } + if (apiObj is PkOrF_Fingerprint) { + var pre_value = cst_encode_String(apiObj.value); + wireObj.tag = 2; + wireObj.kind.Fingerprint.value = pre_value; + return; + } + } + + @protected + void cst_api_fill_to_wire_psbt_sig_hash_type( + PsbtSigHashType apiObj, wire_cst_psbt_sig_hash_type wireObj) { + wireObj.inner = cst_encode_u_32(apiObj.inner); + } + + @protected + void cst_api_fill_to_wire_rbf_value( + RbfValue apiObj, wire_cst_rbf_value wireObj) { + if (apiObj is RbfValue_RbfDefault) { + wireObj.tag = 0; + return; + } + if (apiObj is RbfValue_Value) { + var pre_field0 = cst_encode_u_32(apiObj.field0); + wireObj.tag = 1; + wireObj.kind.Value.field0 = pre_field0; + return; + } + } + + @protected + void cst_api_fill_to_wire_record_bdk_address_u_32( + (BdkAddress, int) apiObj, wire_cst_record_bdk_address_u_32 wireObj) { + cst_api_fill_to_wire_bdk_address(apiObj.$1, wireObj.field0); + wireObj.field1 = cst_encode_u_32(apiObj.$2); + } + + @protected + void cst_api_fill_to_wire_record_bdk_psbt_transaction_details( + (BdkPsbt, TransactionDetails) apiObj, + wire_cst_record_bdk_psbt_transaction_details wireObj) { + cst_api_fill_to_wire_bdk_psbt(apiObj.$1, wireObj.field0); + cst_api_fill_to_wire_transaction_details(apiObj.$2, wireObj.field1); + } + + @protected + void cst_api_fill_to_wire_record_list_prim_u_32_strict_list_condition( + (Uint32List, List) apiObj, + wire_cst_record_list_prim_u_32_strict_list_condition wireObj) { + wireObj.field0 = cst_encode_list_prim_u_32_strict(apiObj.$1); + wireObj.field1 = cst_encode_list_condition(apiObj.$2); + } + + @protected + void cst_api_fill_to_wire_record_out_point_input_usize( + (OutPoint, Input, BigInt) apiObj, + wire_cst_record_out_point_input_usize wireObj) { + cst_api_fill_to_wire_out_point(apiObj.$1, wireObj.field0); + cst_api_fill_to_wire_input(apiObj.$2, wireObj.field1); + wireObj.field2 = cst_encode_usize(apiObj.$3); + } + + @protected + void cst_api_fill_to_wire_record_string_list_prim_u_32_strict( + (String, Uint32List) apiObj, + wire_cst_record_string_list_prim_u_32_strict wireObj) { + wireObj.field0 = cst_encode_String(apiObj.$1); + wireObj.field1 = cst_encode_list_prim_u_32_strict(apiObj.$2); + } + + @protected + void cst_api_fill_to_wire_record_u_32_list_condition( + (int, List) apiObj, + wire_cst_record_u_32_list_condition wireObj) { + wireObj.field0 = cst_encode_u_32(apiObj.$1); + wireObj.field1 = cst_encode_list_condition(apiObj.$2); + } + + @protected + void cst_api_fill_to_wire_rpc_config( + RpcConfig apiObj, wire_cst_rpc_config wireObj) { + wireObj.url = cst_encode_String(apiObj.url); + cst_api_fill_to_wire_auth(apiObj.auth, wireObj.auth); + wireObj.network = cst_encode_network(apiObj.network); + wireObj.wallet_name = cst_encode_String(apiObj.walletName); + wireObj.sync_params = + cst_encode_opt_box_autoadd_rpc_sync_params(apiObj.syncParams); + } + + @protected + void cst_api_fill_to_wire_rpc_sync_params( + RpcSyncParams apiObj, wire_cst_rpc_sync_params wireObj) { + wireObj.start_script_count = cst_encode_u_64(apiObj.startScriptCount); + wireObj.start_time = cst_encode_u_64(apiObj.startTime); + wireObj.force_start_time = cst_encode_bool(apiObj.forceStartTime); + wireObj.poll_rate_sec = cst_encode_u_64(apiObj.pollRateSec); + } + + @protected + void cst_api_fill_to_wire_satisfaction( + Satisfaction apiObj, wire_cst_satisfaction wireObj) { + if (apiObj is Satisfaction_Partial) { + var pre_n = cst_encode_u_64(apiObj.n); + var pre_m = cst_encode_u_64(apiObj.m); + var pre_items = cst_encode_list_prim_u_64_strict(apiObj.items); + var pre_sorted = cst_encode_opt_box_autoadd_bool(apiObj.sorted); + var pre_conditions = + cst_encode_Map_u_32_list_condition(apiObj.conditions); + wireObj.tag = 0; + wireObj.kind.Partial.n = pre_n; + wireObj.kind.Partial.m = pre_m; + wireObj.kind.Partial.items = pre_items; + wireObj.kind.Partial.sorted = pre_sorted; + wireObj.kind.Partial.conditions = pre_conditions; + return; + } + if (apiObj is Satisfaction_PartialComplete) { + var pre_n = cst_encode_u_64(apiObj.n); + var pre_m = cst_encode_u_64(apiObj.m); + var pre_items = cst_encode_list_prim_u_64_strict(apiObj.items); + var pre_sorted = cst_encode_opt_box_autoadd_bool(apiObj.sorted); + var pre_conditions = cst_encode_Map_list_prim_u_32_strict_list_condition( + apiObj.conditions); + wireObj.tag = 1; + wireObj.kind.PartialComplete.n = pre_n; + wireObj.kind.PartialComplete.m = pre_m; + wireObj.kind.PartialComplete.items = pre_items; + wireObj.kind.PartialComplete.sorted = pre_sorted; + wireObj.kind.PartialComplete.conditions = pre_conditions; + return; + } + if (apiObj is Satisfaction_Complete) { + var pre_condition = cst_encode_box_autoadd_condition(apiObj.condition); + wireObj.tag = 2; + wireObj.kind.Complete.condition = pre_condition; + return; + } + if (apiObj is Satisfaction_None) { + var pre_msg = cst_encode_String(apiObj.msg); + wireObj.tag = 3; + wireObj.kind.None.msg = pre_msg; + return; + } + } + + @protected + void cst_api_fill_to_wire_satisfiable_item( + SatisfiableItem apiObj, wire_cst_satisfiable_item wireObj) { + if (apiObj is SatisfiableItem_EcdsaSignature) { + var pre_key = cst_encode_box_autoadd_pk_or_f(apiObj.key); + wireObj.tag = 0; + wireObj.kind.EcdsaSignature.key = pre_key; + return; + } + if (apiObj is SatisfiableItem_SchnorrSignature) { + var pre_key = cst_encode_box_autoadd_pk_or_f(apiObj.key); + wireObj.tag = 1; + wireObj.kind.SchnorrSignature.key = pre_key; + return; + } + if (apiObj is SatisfiableItem_Sha256Preimage) { + var pre_hash = cst_encode_String(apiObj.hash); + wireObj.tag = 2; + wireObj.kind.Sha256Preimage.hash = pre_hash; + return; + } + if (apiObj is SatisfiableItem_Hash256Preimage) { + var pre_hash = cst_encode_String(apiObj.hash); + wireObj.tag = 3; + wireObj.kind.Hash256Preimage.hash = pre_hash; + return; + } + if (apiObj is SatisfiableItem_Ripemd160Preimage) { + var pre_hash = cst_encode_String(apiObj.hash); + wireObj.tag = 4; + wireObj.kind.Ripemd160Preimage.hash = pre_hash; + return; + } + if (apiObj is SatisfiableItem_Hash160Preimage) { + var pre_hash = cst_encode_String(apiObj.hash); + wireObj.tag = 5; + wireObj.kind.Hash160Preimage.hash = pre_hash; + return; + } + if (apiObj is SatisfiableItem_AbsoluteTimelock) { + var pre_value = cst_encode_box_autoadd_lock_time(apiObj.value); + wireObj.tag = 6; + wireObj.kind.AbsoluteTimelock.value = pre_value; + return; + } + if (apiObj is SatisfiableItem_RelativeTimelock) { + var pre_value = cst_encode_u_32(apiObj.value); + wireObj.tag = 7; + wireObj.kind.RelativeTimelock.value = pre_value; + return; + } + if (apiObj is SatisfiableItem_Multisig) { + var pre_keys = cst_encode_list_pk_or_f(apiObj.keys); + var pre_threshold = cst_encode_u_64(apiObj.threshold); + wireObj.tag = 8; + wireObj.kind.Multisig.keys = pre_keys; + wireObj.kind.Multisig.threshold = pre_threshold; + return; + } + if (apiObj is SatisfiableItem_Thresh) { + var pre_items = cst_encode_list_bdk_policy(apiObj.items); + var pre_threshold = cst_encode_u_64(apiObj.threshold); + wireObj.tag = 9; + wireObj.kind.Thresh.items = pre_items; + wireObj.kind.Thresh.threshold = pre_threshold; + return; + } + } + + @protected + void cst_api_fill_to_wire_script_amount( + ScriptAmount apiObj, wire_cst_script_amount wireObj) { + cst_api_fill_to_wire_bdk_script_buf(apiObj.script, wireObj.script); + wireObj.amount = cst_encode_u_64(apiObj.amount); + } + + @protected + void cst_api_fill_to_wire_sign_options( + SignOptions apiObj, wire_cst_sign_options wireObj) { + wireObj.trust_witness_utxo = cst_encode_bool(apiObj.trustWitnessUtxo); + wireObj.assume_height = + cst_encode_opt_box_autoadd_u_32(apiObj.assumeHeight); + wireObj.allow_all_sighashes = cst_encode_bool(apiObj.allowAllSighashes); + wireObj.remove_partial_sigs = cst_encode_bool(apiObj.removePartialSigs); + wireObj.try_finalize = cst_encode_bool(apiObj.tryFinalize); + wireObj.sign_with_tap_internal_key = + cst_encode_bool(apiObj.signWithTapInternalKey); + wireObj.allow_grinding = cst_encode_bool(apiObj.allowGrinding); + } + + @protected + void cst_api_fill_to_wire_sled_db_configuration( + SledDbConfiguration apiObj, wire_cst_sled_db_configuration wireObj) { + wireObj.path = cst_encode_String(apiObj.path); + wireObj.tree_name = cst_encode_String(apiObj.treeName); + } + + @protected + void cst_api_fill_to_wire_sqlite_db_configuration( + SqliteDbConfiguration apiObj, wire_cst_sqlite_db_configuration wireObj) { + wireObj.path = cst_encode_String(apiObj.path); + } + + @protected + void cst_api_fill_to_wire_transaction_details( + TransactionDetails apiObj, wire_cst_transaction_details wireObj) { + wireObj.transaction = + cst_encode_opt_box_autoadd_bdk_transaction(apiObj.transaction); + wireObj.txid = cst_encode_String(apiObj.txid); + wireObj.received = cst_encode_u_64(apiObj.received); + wireObj.sent = cst_encode_u_64(apiObj.sent); + wireObj.fee = cst_encode_opt_box_autoadd_u_64(apiObj.fee); + wireObj.confirmation_time = + cst_encode_opt_box_autoadd_block_time(apiObj.confirmationTime); + } + + @protected + void cst_api_fill_to_wire_tx_in(TxIn apiObj, wire_cst_tx_in wireObj) { + cst_api_fill_to_wire_out_point( + apiObj.previousOutput, wireObj.previous_output); + cst_api_fill_to_wire_bdk_script_buf(apiObj.scriptSig, wireObj.script_sig); + wireObj.sequence = cst_encode_u_32(apiObj.sequence); + wireObj.witness = cst_encode_list_list_prim_u_8_strict(apiObj.witness); + } + + @protected + void cst_api_fill_to_wire_tx_out(TxOut apiObj, wire_cst_tx_out wireObj) { + wireObj.value = cst_encode_u_64(apiObj.value); + cst_api_fill_to_wire_bdk_script_buf( + apiObj.scriptPubkey, wireObj.script_pubkey); + } + + @protected + int cst_encode_RustOpaque_bdkbitcoinAddress(Address raw); + + @protected + int cst_encode_RustOpaque_bdkbitcoinbip32DerivationPath(DerivationPath raw); + + @protected + int cst_encode_RustOpaque_bdkblockchainAnyBlockchain(AnyBlockchain raw); + + @protected + int cst_encode_RustOpaque_bdkdescriptorExtendedDescriptor( + ExtendedDescriptor raw); + + @protected + int cst_encode_RustOpaque_bdkdescriptorPolicy(Policy raw); + + @protected + int cst_encode_RustOpaque_bdkkeysDescriptorPublicKey(DescriptorPublicKey raw); + + @protected + int cst_encode_RustOpaque_bdkkeysDescriptorSecretKey(DescriptorSecretKey raw); + + @protected + int cst_encode_RustOpaque_bdkkeysKeyMap(KeyMap raw); + + @protected + int cst_encode_RustOpaque_bdkkeysbip39Mnemonic(Mnemonic raw); + + @protected + int cst_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + MutexWalletAnyDatabase raw); + + @protected + int cst_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + MutexPartiallySignedTransaction raw); + + @protected + bool cst_encode_bool(bool raw); + + @protected + int cst_encode_change_spend_policy(ChangeSpendPolicy raw); + + @protected + double cst_encode_f_32(double raw); + + @protected + int cst_encode_i_32(int raw); + + @protected + int cst_encode_keychain_kind(KeychainKind raw); + + @protected + int cst_encode_network(Network raw); + + @protected + int cst_encode_u_32(int raw); + + @protected + int cst_encode_u_8(int raw); + + @protected + void cst_encode_unit(void raw); + + @protected + int cst_encode_variant(Variant raw); + + @protected + int cst_encode_witness_version(WitnessVersion raw); + + @protected + int cst_encode_word_count(WordCount raw); + + @protected + void sse_encode_Map_String_list_prim_u_32_strict( + Map self, SseSerializer serializer); + + @protected + void sse_encode_Map_list_prim_u_32_strict_list_condition( + Map> self, SseSerializer serializer); + + @protected + void sse_encode_Map_u_32_list_condition( + Map> self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkbitcoinAddress( + Address self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkbitcoinbip32DerivationPath( + DerivationPath self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkblockchainAnyBlockchain( + AnyBlockchain self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkdescriptorExtendedDescriptor( + ExtendedDescriptor self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkdescriptorPolicy( + Policy self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkkeysDescriptorPublicKey( + DescriptorPublicKey self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkkeysDescriptorSecretKey( + DescriptorSecretKey self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkkeysKeyMap( + KeyMap self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkkeysbip39Mnemonic( + Mnemonic self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + MutexWalletAnyDatabase self, SseSerializer serializer); + + @protected + void + sse_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + MutexPartiallySignedTransaction self, SseSerializer serializer); + + @protected + void sse_encode_String(String self, SseSerializer serializer); + + @protected + void sse_encode_address_error(AddressError self, SseSerializer serializer); + + @protected + void sse_encode_address_index(AddressIndex self, SseSerializer serializer); + + @protected + void sse_encode_auth(Auth self, SseSerializer serializer); + + @protected + void sse_encode_balance(Balance self, SseSerializer serializer); + + @protected + void sse_encode_bdk_address(BdkAddress self, SseSerializer serializer); + + @protected + void sse_encode_bdk_blockchain(BdkBlockchain self, SseSerializer serializer); + + @protected + void sse_encode_bdk_derivation_path( + BdkDerivationPath self, SseSerializer serializer); + + @protected + void sse_encode_bdk_descriptor(BdkDescriptor self, SseSerializer serializer); + + @protected + void sse_encode_bdk_descriptor_public_key( + BdkDescriptorPublicKey self, SseSerializer serializer); + + @protected + void sse_encode_bdk_descriptor_secret_key( + BdkDescriptorSecretKey self, SseSerializer serializer); + + @protected + void sse_encode_bdk_error(BdkError self, SseSerializer serializer); + + @protected + void sse_encode_bdk_mnemonic(BdkMnemonic self, SseSerializer serializer); + + @protected + void sse_encode_bdk_policy(BdkPolicy self, SseSerializer serializer); + + @protected + void sse_encode_bdk_psbt(BdkPsbt self, SseSerializer serializer); + + @protected + void sse_encode_bdk_script_buf(BdkScriptBuf self, SseSerializer serializer); + + @protected + void sse_encode_bdk_transaction( + BdkTransaction self, SseSerializer serializer); + + @protected + void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer); + + @protected + void sse_encode_block_time(BlockTime self, SseSerializer serializer); + + @protected + void sse_encode_blockchain_config( + BlockchainConfig self, SseSerializer serializer); + + @protected + void sse_encode_bool(bool self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_address_error( + AddressError self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_address_index( + AddressIndex self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_address( + BdkAddress self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_blockchain( + BdkBlockchain self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_derivation_path( + BdkDerivationPath self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_descriptor( + BdkDescriptor self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_descriptor_public_key( + BdkDescriptorPublicKey self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_descriptor_secret_key( + BdkDescriptorSecretKey self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_mnemonic( + BdkMnemonic self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_policy( + BdkPolicy self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_psbt(BdkPsbt self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_script_buf( + BdkScriptBuf self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_transaction( + BdkTransaction self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bdk_wallet( + BdkWallet self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_block_time( + BlockTime self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_blockchain_config( + BlockchainConfig self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_condition( + Condition self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_consensus_error( + ConsensusError self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_database_config( + DatabaseConfig self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_descriptor_error( + DescriptorError self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_electrum_config( + ElectrumConfig self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_esplora_config( + EsploraConfig self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_f_32(double self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_fee_rate(FeeRate self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_hex_error( + HexError self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_local_utxo( + LocalUtxo self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_lock_time( + LockTime self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_out_point( + OutPoint self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_pk_or_f(PkOrF self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_psbt_sig_hash_type( + PsbtSigHashType self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_rbf_value( + RbfValue self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_record_out_point_input_usize( + (OutPoint, Input, BigInt) self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_rpc_config( + RpcConfig self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_rpc_sync_params( + RpcSyncParams self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_sign_options( + SignOptions self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_sled_db_configuration( + SledDbConfiguration self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_sqlite_db_configuration( + SqliteDbConfiguration self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_u_8(int self, SseSerializer serializer); + + @protected + void sse_encode_change_spend_policy( + ChangeSpendPolicy self, SseSerializer serializer); + + @protected + void sse_encode_condition(Condition self, SseSerializer serializer); + + @protected + void sse_encode_consensus_error( + ConsensusError self, SseSerializer serializer); + + @protected + void sse_encode_database_config( + DatabaseConfig self, SseSerializer serializer); + + @protected + void sse_encode_descriptor_error( + DescriptorError self, SseSerializer serializer); + + @protected + void sse_encode_electrum_config( + ElectrumConfig self, SseSerializer serializer); + + @protected + void sse_encode_esplora_config(EsploraConfig self, SseSerializer serializer); + + @protected + void sse_encode_f_32(double self, SseSerializer serializer); + + @protected + void sse_encode_fee_rate(FeeRate self, SseSerializer serializer); + + @protected + void sse_encode_hex_error(HexError self, SseSerializer serializer); + + @protected + void sse_encode_i_32(int self, SseSerializer serializer); + + @protected + void sse_encode_input(Input self, SseSerializer serializer); + + @protected + void sse_encode_keychain_kind(KeychainKind self, SseSerializer serializer); + + @protected + void sse_encode_list_bdk_policy( + List self, SseSerializer serializer); + + @protected + void sse_encode_list_condition( + List self, SseSerializer serializer); + + @protected + void sse_encode_list_list_prim_u_8_strict( + List self, SseSerializer serializer); + + @protected + void sse_encode_list_local_utxo( + List self, SseSerializer serializer); + + @protected + void sse_encode_list_out_point(List self, SseSerializer serializer); + + @protected + void sse_encode_list_pk_or_f(List self, SseSerializer serializer); + + @protected + void sse_encode_list_prim_u_32_strict( + Uint32List self, SseSerializer serializer); + + @protected + void sse_encode_list_prim_u_64_strict( + Uint64List self, SseSerializer serializer); + + @protected + void sse_encode_list_prim_u_8_loose(List self, SseSerializer serializer); + + @protected + void sse_encode_list_prim_u_8_strict( + Uint8List self, SseSerializer serializer); + + @protected + void sse_encode_list_record_list_prim_u_32_strict_list_condition( + List<(Uint32List, List)> self, SseSerializer serializer); + + @protected + void sse_encode_list_record_string_list_prim_u_32_strict( + List<(String, Uint32List)> self, SseSerializer serializer); + + @protected + void sse_encode_list_record_u_32_list_condition( + List<(int, List)> self, SseSerializer serializer); + + @protected + void sse_encode_list_script_amount( + List self, SseSerializer serializer); + + @protected + void sse_encode_list_transaction_details( + List self, SseSerializer serializer); + + @protected + void sse_encode_list_tx_in(List self, SseSerializer serializer); + + @protected + void sse_encode_list_tx_out(List self, SseSerializer serializer); + + @protected + void sse_encode_local_utxo(LocalUtxo self, SseSerializer serializer); + + @protected + void sse_encode_lock_time(LockTime self, SseSerializer serializer); + + @protected + void sse_encode_network(Network self, SseSerializer serializer); + + @protected + void sse_encode_opt_Map_String_list_prim_u_32_strict( + Map? self, SseSerializer serializer); + + @protected + void sse_encode_opt_String(String? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_bdk_address( + BdkAddress? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_bdk_descriptor( + BdkDescriptor? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_bdk_policy( + BdkPolicy? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_bdk_script_buf( + BdkScriptBuf? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_bdk_transaction( + BdkTransaction? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_block_time( + BlockTime? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_bool(bool? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_f_32(double? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_fee_rate( + FeeRate? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_lock_time( + LockTime? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_psbt_sig_hash_type( + PsbtSigHashType? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_rbf_value( + RbfValue? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_record_out_point_input_usize( + (OutPoint, Input, BigInt)? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_rpc_sync_params( + RpcSyncParams? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_sign_options( + SignOptions? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_u_64(BigInt? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_u_8(int? self, SseSerializer serializer); + + @protected + void sse_encode_out_point(OutPoint self, SseSerializer serializer); + + @protected + void sse_encode_payload(Payload self, SseSerializer serializer); + + @protected + void sse_encode_pk_or_f(PkOrF self, SseSerializer serializer); + + @protected + void sse_encode_psbt_sig_hash_type( + PsbtSigHashType self, SseSerializer serializer); + + @protected + void sse_encode_rbf_value(RbfValue self, SseSerializer serializer); + + @protected + void sse_encode_record_bdk_address_u_32( + (BdkAddress, int) self, SseSerializer serializer); + + @protected + void sse_encode_record_bdk_psbt_transaction_details( + (BdkPsbt, TransactionDetails) self, SseSerializer serializer); + + @protected + void sse_encode_record_list_prim_u_32_strict_list_condition( + (Uint32List, List) self, SseSerializer serializer); + + @protected + void sse_encode_record_out_point_input_usize( + (OutPoint, Input, BigInt) self, SseSerializer serializer); + + @protected + void sse_encode_record_string_list_prim_u_32_strict( + (String, Uint32List) self, SseSerializer serializer); + + @protected + void sse_encode_record_u_32_list_condition( + (int, List) self, SseSerializer serializer); + + @protected + void sse_encode_rpc_config(RpcConfig self, SseSerializer serializer); + + @protected + void sse_encode_rpc_sync_params(RpcSyncParams self, SseSerializer serializer); + + @protected + void sse_encode_satisfaction(Satisfaction self, SseSerializer serializer); + + @protected + void sse_encode_satisfiable_item( + SatisfiableItem self, SseSerializer serializer); + + @protected + void sse_encode_script_amount(ScriptAmount self, SseSerializer serializer); + + @protected + void sse_encode_sign_options(SignOptions self, SseSerializer serializer); + + @protected + void sse_encode_sled_db_configuration( + SledDbConfiguration self, SseSerializer serializer); + + @protected + void sse_encode_sqlite_db_configuration( + SqliteDbConfiguration self, SseSerializer serializer); + + @protected + void sse_encode_transaction_details( + TransactionDetails self, SseSerializer serializer); + + @protected + void sse_encode_tx_in(TxIn self, SseSerializer serializer); + + @protected + void sse_encode_tx_out(TxOut self, SseSerializer serializer); + + @protected + void sse_encode_u_32(int self, SseSerializer serializer); + + @protected + void sse_encode_u_64(BigInt self, SseSerializer serializer); + + @protected + void sse_encode_u_8(int self, SseSerializer serializer); + + @protected + void sse_encode_u_8_array_4(U8Array4 self, SseSerializer serializer); + + @protected + void sse_encode_unit(void self, SseSerializer serializer); + + @protected + void sse_encode_usize(BigInt self, SseSerializer serializer); + + @protected + void sse_encode_variant(Variant self, SseSerializer serializer); + + @protected + void sse_encode_witness_version( + WitnessVersion self, SseSerializer serializer); + + @protected + void sse_encode_word_count(WordCount self, SseSerializer serializer); +} + +// Section: wire_class + +// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint + +/// generated by flutter_rust_bridge +class coreWire implements BaseWire { + factory coreWire.fromExternalLibrary(ExternalLibrary lib) => + coreWire(lib.ffiDynamicLibrary); + + /// Holds the symbol lookup function. + final ffi.Pointer Function(String symbolName) + _lookup; + + /// The symbols are looked up in [dynamicLibrary]. + coreWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + coreWire.fromLookup( + ffi.Pointer Function(String symbolName) + lookup) + : _lookup = lookup; + + void store_dart_post_cobject( + DartPostCObjectFnType ptr, + ) { + return _store_dart_post_cobject( + ptr, + ); + } + + late final _store_dart_post_cobjectPtr = + _lookup>( + 'store_dart_post_cobject'); + late final _store_dart_post_cobject = _store_dart_post_cobjectPtr + .asFunction(); + + void wire__crate__api__blockchain__bdk_blockchain_broadcast( + int port_, + ffi.Pointer ptr, + ffi.Pointer transaction, + ) { + return _wire__crate__api__blockchain__bdk_blockchain_broadcast( + port_, + ptr, + transaction, + ); + } + + late final _wire__crate__api__blockchain__bdk_blockchain_broadcastPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast'); + late final _wire__crate__api__blockchain__bdk_blockchain_broadcast = + _wire__crate__api__blockchain__bdk_blockchain_broadcastPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__blockchain__bdk_blockchain_create( + int port_, + ffi.Pointer blockchain_config, + ) { + return _wire__crate__api__blockchain__bdk_blockchain_create( + port_, + blockchain_config, + ); + } + + late final _wire__crate__api__blockchain__bdk_blockchain_createPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create'); + late final _wire__crate__api__blockchain__bdk_blockchain_create = + _wire__crate__api__blockchain__bdk_blockchain_createPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__blockchain__bdk_blockchain_estimate_fee( + int port_, + ffi.Pointer that, + int target, + ) { + return _wire__crate__api__blockchain__bdk_blockchain_estimate_fee( + port_, + that, + target, + ); + } + + late final _wire__crate__api__blockchain__bdk_blockchain_estimate_feePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, + ffi.Pointer, ffi.Uint64)>>( + 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee'); + late final _wire__crate__api__blockchain__bdk_blockchain_estimate_fee = + _wire__crate__api__blockchain__bdk_blockchain_estimate_feePtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire__crate__api__blockchain__bdk_blockchain_get_block_hash( + int port_, + ffi.Pointer that, + int height, + ) { + return _wire__crate__api__blockchain__bdk_blockchain_get_block_hash( + port_, + that, + height, + ); + } + + late final _wire__crate__api__blockchain__bdk_blockchain_get_block_hashPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, + ffi.Pointer, ffi.Uint32)>>( + 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash'); + late final _wire__crate__api__blockchain__bdk_blockchain_get_block_hash = + _wire__crate__api__blockchain__bdk_blockchain_get_block_hashPtr + .asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire__crate__api__blockchain__bdk_blockchain_get_height( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__blockchain__bdk_blockchain_get_height( + port_, + that, + ); + } + + late final _wire__crate__api__blockchain__bdk_blockchain_get_heightPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height'); + late final _wire__crate__api__blockchain__bdk_blockchain_get_height = + _wire__crate__api__blockchain__bdk_blockchain_get_heightPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__descriptor__bdk_descriptor_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_as_string( + that, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string'); + late final _wire__crate__api__descriptor__bdk_descriptor_as_string = + _wire__crate__api__descriptor__bdk_descriptor_as_stringPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco + wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( + ffi.Pointer that, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( + that, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weightPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight'); + late final _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight = + _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weightPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + void wire__crate__api__descriptor__bdk_descriptor_new( + int port_, + ffi.Pointer descriptor, + int network, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_new( + port_, + descriptor, + network, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, + ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new'); + late final _wire__crate__api__descriptor__bdk_descriptor_new = + _wire__crate__api__descriptor__bdk_descriptor_newPtr.asFunction< + void Function( + int, ffi.Pointer, int)>(); + + void wire__crate__api__descriptor__bdk_descriptor_new_bip44( + int port_, + ffi.Pointer secret_key, + int keychain_kind, + int network, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_new_bip44( + port_, + secret_key, + keychain_kind, + network, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44'); + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44 = + _wire__crate__api__descriptor__bdk_descriptor_new_bip44Ptr.asFunction< + void Function(int, ffi.Pointer, + int, int)>(); + + void wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( + int port_, + ffi.Pointer public_key, + ffi.Pointer fingerprint, + int keychain_kind, + int network, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44_publicPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public'); + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44_public = + _wire__crate__api__descriptor__bdk_descriptor_new_bip44_publicPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + int)>(); + + void wire__crate__api__descriptor__bdk_descriptor_new_bip49( + int port_, + ffi.Pointer secret_key, + int keychain_kind, + int network, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_new_bip49( + port_, + secret_key, + keychain_kind, + network, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49'); + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49 = + _wire__crate__api__descriptor__bdk_descriptor_new_bip49Ptr.asFunction< + void Function(int, ffi.Pointer, + int, int)>(); + + void wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( + int port_, + ffi.Pointer public_key, + ffi.Pointer fingerprint, + int keychain_kind, + int network, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49_publicPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public'); + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49_public = + _wire__crate__api__descriptor__bdk_descriptor_new_bip49_publicPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + int)>(); + + void wire__crate__api__descriptor__bdk_descriptor_new_bip84( + int port_, + ffi.Pointer secret_key, + int keychain_kind, + int network, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_new_bip84( + port_, + secret_key, + keychain_kind, + network, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84'); + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84 = + _wire__crate__api__descriptor__bdk_descriptor_new_bip84Ptr.asFunction< + void Function(int, ffi.Pointer, + int, int)>(); + + void wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( + int port_, + ffi.Pointer public_key, + ffi.Pointer fingerprint, + int keychain_kind, + int network, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84_publicPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public'); + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84_public = + _wire__crate__api__descriptor__bdk_descriptor_new_bip84_publicPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + int)>(); + + void wire__crate__api__descriptor__bdk_descriptor_new_bip86( + int port_, + ffi.Pointer secret_key, + int keychain_kind, + int network, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_new_bip86( + port_, + secret_key, + keychain_kind, + network, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86'); + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86 = + _wire__crate__api__descriptor__bdk_descriptor_new_bip86Ptr.asFunction< + void Function(int, ffi.Pointer, + int, int)>(); + + void wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( + int port_, + ffi.Pointer public_key, + ffi.Pointer fingerprint, + int keychain_kind, + int network, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86_publicPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public'); + late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86_public = + _wire__crate__api__descriptor__bdk_descriptor_new_bip86_publicPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + int)>(); + + WireSyncRust2DartDco + wire__crate__api__descriptor__bdk_descriptor_to_string_private( + ffi.Pointer that, + ) { + return _wire__crate__api__descriptor__bdk_descriptor_to_string_private( + that, + ); + } + + late final _wire__crate__api__descriptor__bdk_descriptor_to_string_privatePtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private'); + late final _wire__crate__api__descriptor__bdk_descriptor_to_string_private = + _wire__crate__api__descriptor__bdk_descriptor_to_string_privatePtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__key__bdk_derivation_path_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__key__bdk_derivation_path_as_string( + that, + ); + } + + late final _wire__crate__api__key__bdk_derivation_path_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string'); + late final _wire__crate__api__key__bdk_derivation_path_as_string = + _wire__crate__api__key__bdk_derivation_path_as_stringPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + void wire__crate__api__key__bdk_derivation_path_from_string( + int port_, + ffi.Pointer path, + ) { + return _wire__crate__api__key__bdk_derivation_path_from_string( + port_, + path, + ); + } + + late final _wire__crate__api__key__bdk_derivation_path_from_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string'); + late final _wire__crate__api__key__bdk_derivation_path_from_string = + _wire__crate__api__key__bdk_derivation_path_from_stringPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + WireSyncRust2DartDco + wire__crate__api__key__bdk_descriptor_public_key_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__key__bdk_descriptor_public_key_as_string( + that, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_public_key_as_stringPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string'); + late final _wire__crate__api__key__bdk_descriptor_public_key_as_string = + _wire__crate__api__key__bdk_descriptor_public_key_as_stringPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + void wire__crate__api__key__bdk_descriptor_public_key_derive( + int port_, + ffi.Pointer ptr, + ffi.Pointer path, + ) { + return _wire__crate__api__key__bdk_descriptor_public_key_derive( + port_, + ptr, + path, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_public_key_derivePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive'); + late final _wire__crate__api__key__bdk_descriptor_public_key_derive = + _wire__crate__api__key__bdk_descriptor_public_key_derivePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__key__bdk_descriptor_public_key_extend( + int port_, + ffi.Pointer ptr, + ffi.Pointer path, + ) { + return _wire__crate__api__key__bdk_descriptor_public_key_extend( + port_, + ptr, + path, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_public_key_extendPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend'); + late final _wire__crate__api__key__bdk_descriptor_public_key_extend = + _wire__crate__api__key__bdk_descriptor_public_key_extendPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__key__bdk_descriptor_public_key_from_string( + int port_, + ffi.Pointer public_key, + ) { + return _wire__crate__api__key__bdk_descriptor_public_key_from_string( + port_, + public_key, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_public_key_from_stringPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string'); + late final _wire__crate__api__key__bdk_descriptor_public_key_from_string = + _wire__crate__api__key__bdk_descriptor_public_key_from_stringPtr + .asFunction< + void Function(int, ffi.Pointer)>(); + + WireSyncRust2DartDco + wire__crate__api__key__bdk_descriptor_secret_key_as_public( + ffi.Pointer ptr, + ) { + return _wire__crate__api__key__bdk_descriptor_secret_key_as_public( + ptr, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_secret_key_as_publicPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public'); + late final _wire__crate__api__key__bdk_descriptor_secret_key_as_public = + _wire__crate__api__key__bdk_descriptor_secret_key_as_publicPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco + wire__crate__api__key__bdk_descriptor_secret_key_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__key__bdk_descriptor_secret_key_as_string( + that, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_secret_key_as_stringPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string'); + late final _wire__crate__api__key__bdk_descriptor_secret_key_as_string = + _wire__crate__api__key__bdk_descriptor_secret_key_as_stringPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + void wire__crate__api__key__bdk_descriptor_secret_key_create( + int port_, + int network, + ffi.Pointer mnemonic, + ffi.Pointer password, + ) { + return _wire__crate__api__key__bdk_descriptor_secret_key_create( + port_, + network, + mnemonic, + password, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_secret_key_createPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create'); + late final _wire__crate__api__key__bdk_descriptor_secret_key_create = + _wire__crate__api__key__bdk_descriptor_secret_key_createPtr.asFunction< + void Function(int, int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__key__bdk_descriptor_secret_key_derive( + int port_, + ffi.Pointer ptr, + ffi.Pointer path, + ) { + return _wire__crate__api__key__bdk_descriptor_secret_key_derive( + port_, + ptr, + path, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_secret_key_derivePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive'); + late final _wire__crate__api__key__bdk_descriptor_secret_key_derive = + _wire__crate__api__key__bdk_descriptor_secret_key_derivePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__key__bdk_descriptor_secret_key_extend( + int port_, + ffi.Pointer ptr, + ffi.Pointer path, + ) { + return _wire__crate__api__key__bdk_descriptor_secret_key_extend( + port_, + ptr, + path, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_secret_key_extendPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend'); + late final _wire__crate__api__key__bdk_descriptor_secret_key_extend = + _wire__crate__api__key__bdk_descriptor_secret_key_extendPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__key__bdk_descriptor_secret_key_from_string( + int port_, + ffi.Pointer secret_key, + ) { + return _wire__crate__api__key__bdk_descriptor_secret_key_from_string( + port_, + secret_key, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_secret_key_from_stringPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string'); + late final _wire__crate__api__key__bdk_descriptor_secret_key_from_string = + _wire__crate__api__key__bdk_descriptor_secret_key_from_stringPtr + .asFunction< + void Function(int, ffi.Pointer)>(); + + WireSyncRust2DartDco + wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( + ffi.Pointer that, + ) { + return _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( + that, + ); + } + + late final _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytesPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes'); + late final _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes = + _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytesPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__key__bdk_mnemonic_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__key__bdk_mnemonic_as_string( + that, + ); + } + + late final _wire__crate__api__key__bdk_mnemonic_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string'); + late final _wire__crate__api__key__bdk_mnemonic_as_string = + _wire__crate__api__key__bdk_mnemonic_as_stringPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + void wire__crate__api__key__bdk_mnemonic_from_entropy( + int port_, + ffi.Pointer entropy, + ) { + return _wire__crate__api__key__bdk_mnemonic_from_entropy( + port_, + entropy, + ); + } + + late final _wire__crate__api__key__bdk_mnemonic_from_entropyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy'); + late final _wire__crate__api__key__bdk_mnemonic_from_entropy = + _wire__crate__api__key__bdk_mnemonic_from_entropyPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__key__bdk_mnemonic_from_string( + int port_, + ffi.Pointer mnemonic, + ) { + return _wire__crate__api__key__bdk_mnemonic_from_string( + port_, + mnemonic, + ); + } + + late final _wire__crate__api__key__bdk_mnemonic_from_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string'); + late final _wire__crate__api__key__bdk_mnemonic_from_string = + _wire__crate__api__key__bdk_mnemonic_from_stringPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__key__bdk_mnemonic_new( + int port_, + int word_count, + ) { + return _wire__crate__api__key__bdk_mnemonic_new( + port_, + word_count, + ); + } + + late final _wire__crate__api__key__bdk_mnemonic_newPtr = + _lookup>( + 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new'); + late final _wire__crate__api__key__bdk_mnemonic_new = + _wire__crate__api__key__bdk_mnemonic_newPtr + .asFunction(); + + WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__psbt__bdk_psbt_as_string( + that, + ); + } + + late final _wire__crate__api__psbt__bdk_psbt_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string'); + late final _wire__crate__api__psbt__bdk_psbt_as_string = + _wire__crate__api__psbt__bdk_psbt_as_stringPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + void wire__crate__api__psbt__bdk_psbt_combine( + int port_, + ffi.Pointer ptr, + ffi.Pointer other, + ) { + return _wire__crate__api__psbt__bdk_psbt_combine( + port_, + ptr, + other, + ); + } + + late final _wire__crate__api__psbt__bdk_psbt_combinePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine'); + late final _wire__crate__api__psbt__bdk_psbt_combine = + _wire__crate__api__psbt__bdk_psbt_combinePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_extract_tx( + ffi.Pointer ptr, + ) { + return _wire__crate__api__psbt__bdk_psbt_extract_tx( + ptr, + ); + } + + late final _wire__crate__api__psbt__bdk_psbt_extract_txPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx'); + late final _wire__crate__api__psbt__bdk_psbt_extract_tx = + _wire__crate__api__psbt__bdk_psbt_extract_txPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_fee_amount( + ffi.Pointer that, + ) { + return _wire__crate__api__psbt__bdk_psbt_fee_amount( + that, + ); + } + + late final _wire__crate__api__psbt__bdk_psbt_fee_amountPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount'); + late final _wire__crate__api__psbt__bdk_psbt_fee_amount = + _wire__crate__api__psbt__bdk_psbt_fee_amountPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_fee_rate( + ffi.Pointer that, + ) { + return _wire__crate__api__psbt__bdk_psbt_fee_rate( + that, + ); + } + + late final _wire__crate__api__psbt__bdk_psbt_fee_ratePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate'); + late final _wire__crate__api__psbt__bdk_psbt_fee_rate = + _wire__crate__api__psbt__bdk_psbt_fee_ratePtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + void wire__crate__api__psbt__bdk_psbt_from_str( + int port_, + ffi.Pointer psbt_base64, + ) { + return _wire__crate__api__psbt__bdk_psbt_from_str( + port_, + psbt_base64, + ); + } + + late final _wire__crate__api__psbt__bdk_psbt_from_strPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str'); + late final _wire__crate__api__psbt__bdk_psbt_from_str = + _wire__crate__api__psbt__bdk_psbt_from_strPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_json_serialize( + ffi.Pointer that, + ) { + return _wire__crate__api__psbt__bdk_psbt_json_serialize( + that, + ); + } + + late final _wire__crate__api__psbt__bdk_psbt_json_serializePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize'); + late final _wire__crate__api__psbt__bdk_psbt_json_serialize = + _wire__crate__api__psbt__bdk_psbt_json_serializePtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_serialize( + ffi.Pointer that, + ) { + return _wire__crate__api__psbt__bdk_psbt_serialize( + that, + ); + } + + late final _wire__crate__api__psbt__bdk_psbt_serializePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize'); + late final _wire__crate__api__psbt__bdk_psbt_serialize = + _wire__crate__api__psbt__bdk_psbt_serializePtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_txid( + ffi.Pointer that, + ) { + return _wire__crate__api__psbt__bdk_psbt_txid( + that, + ); + } + + late final _wire__crate__api__psbt__bdk_psbt_txidPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid'); + late final _wire__crate__api__psbt__bdk_psbt_txid = + _wire__crate__api__psbt__bdk_psbt_txidPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_address_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_address_as_string( + that, + ); + } + + late final _wire__crate__api__types__bdk_address_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string'); + late final _wire__crate__api__types__bdk_address_as_string = + _wire__crate__api__types__bdk_address_as_stringPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + void wire__crate__api__types__bdk_address_from_script( + int port_, + ffi.Pointer script, + int network, + ) { + return _wire__crate__api__types__bdk_address_from_script( + port_, + script, + network, + ); + } + + late final _wire__crate__api__types__bdk_address_from_scriptPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script'); + late final _wire__crate__api__types__bdk_address_from_script = + _wire__crate__api__types__bdk_address_from_scriptPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire__crate__api__types__bdk_address_from_string( + int port_, + ffi.Pointer address, + int network, + ) { + return _wire__crate__api__types__bdk_address_from_string( + port_, + address, + network, + ); + } + + late final _wire__crate__api__types__bdk_address_from_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, + ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string'); + late final _wire__crate__api__types__bdk_address_from_string = + _wire__crate__api__types__bdk_address_from_stringPtr.asFunction< + void Function( + int, ffi.Pointer, int)>(); + + WireSyncRust2DartDco + wire__crate__api__types__bdk_address_is_valid_for_network( + ffi.Pointer that, + int network, + ) { + return _wire__crate__api__types__bdk_address_is_valid_for_network( + that, + network, + ); + } + + late final _wire__crate__api__types__bdk_address_is_valid_for_networkPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network'); + late final _wire__crate__api__types__bdk_address_is_valid_for_network = + _wire__crate__api__types__bdk_address_is_valid_for_networkPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, int)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_address_network( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_address_network( + that, + ); + } + + late final _wire__crate__api__types__bdk_address_networkPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network'); + late final _wire__crate__api__types__bdk_address_network = + _wire__crate__api__types__bdk_address_networkPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_address_payload( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_address_payload( + that, + ); + } + + late final _wire__crate__api__types__bdk_address_payloadPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload'); + late final _wire__crate__api__types__bdk_address_payload = + _wire__crate__api__types__bdk_address_payloadPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_address_script( + ffi.Pointer ptr, + ) { + return _wire__crate__api__types__bdk_address_script( + ptr, + ); + } + + late final _wire__crate__api__types__bdk_address_scriptPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script'); + late final _wire__crate__api__types__bdk_address_script = + _wire__crate__api__types__bdk_address_scriptPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_address_to_qr_uri( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_address_to_qr_uri( + that, + ); + } + + late final _wire__crate__api__types__bdk_address_to_qr_uriPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri'); + late final _wire__crate__api__types__bdk_address_to_qr_uri = + _wire__crate__api__types__bdk_address_to_qr_uriPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_policy_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_policy_as_string( + that, + ); + } + + late final _wire__crate__api__types__bdk_policy_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string'); + late final _wire__crate__api__types__bdk_policy_as_string = + _wire__crate__api__types__bdk_policy_as_stringPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_policy_contribution( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_policy_contribution( + that, + ); + } + + late final _wire__crate__api__types__bdk_policy_contributionPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution'); + late final _wire__crate__api__types__bdk_policy_contribution = + _wire__crate__api__types__bdk_policy_contributionPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_policy_id( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_policy_id( + that, + ); + } + + late final _wire__crate__api__types__bdk_policy_idPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id'); + late final _wire__crate__api__types__bdk_policy_id = + _wire__crate__api__types__bdk_policy_idPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_policy_item( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_policy_item( + that, + ); + } + + late final _wire__crate__api__types__bdk_policy_itemPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item'); + late final _wire__crate__api__types__bdk_policy_item = + _wire__crate__api__types__bdk_policy_itemPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_policy_requires_path( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_policy_requires_path( + that, + ); + } + + late final _wire__crate__api__types__bdk_policy_requires_pathPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path'); + late final _wire__crate__api__types__bdk_policy_requires_path = + _wire__crate__api__types__bdk_policy_requires_pathPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_policy_satisfaction( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_policy_satisfaction( + that, + ); + } + + late final _wire__crate__api__types__bdk_policy_satisfactionPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction'); + late final _wire__crate__api__types__bdk_policy_satisfaction = + _wire__crate__api__types__bdk_policy_satisfactionPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_script_buf_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_script_buf_as_string( + that, + ); + } + + late final _wire__crate__api__types__bdk_script_buf_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string'); + late final _wire__crate__api__types__bdk_script_buf_as_string = + _wire__crate__api__types__bdk_script_buf_as_stringPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__types__bdk_script_buf_empty() { + return _wire__crate__api__types__bdk_script_buf_empty(); + } + + late final _wire__crate__api__types__bdk_script_buf_emptyPtr = + _lookup>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty'); + late final _wire__crate__api__types__bdk_script_buf_empty = + _wire__crate__api__types__bdk_script_buf_emptyPtr + .asFunction(); + + void wire__crate__api__types__bdk_script_buf_from_hex( + int port_, + ffi.Pointer s, + ) { + return _wire__crate__api__types__bdk_script_buf_from_hex( + port_, + s, + ); + } + + late final _wire__crate__api__types__bdk_script_buf_from_hexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex'); + late final _wire__crate__api__types__bdk_script_buf_from_hex = + _wire__crate__api__types__bdk_script_buf_from_hexPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_script_buf_with_capacity( + int port_, + int capacity, + ) { + return _wire__crate__api__types__bdk_script_buf_with_capacity( + port_, + capacity, + ); + } + + late final _wire__crate__api__types__bdk_script_buf_with_capacityPtr = _lookup< + ffi.NativeFunction>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity'); + late final _wire__crate__api__types__bdk_script_buf_with_capacity = + _wire__crate__api__types__bdk_script_buf_with_capacityPtr + .asFunction(); + + void wire__crate__api__types__bdk_transaction_from_bytes( + int port_, + ffi.Pointer transaction_bytes, + ) { + return _wire__crate__api__types__bdk_transaction_from_bytes( + port_, + transaction_bytes, + ); + } + + late final _wire__crate__api__types__bdk_transaction_from_bytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes'); + late final _wire__crate__api__types__bdk_transaction_from_bytes = + _wire__crate__api__types__bdk_transaction_from_bytesPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_input( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_input( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_inputPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input'); + late final _wire__crate__api__types__bdk_transaction_input = + _wire__crate__api__types__bdk_transaction_inputPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_is_coin_base( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_is_coin_base( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_is_coin_basePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base'); + late final _wire__crate__api__types__bdk_transaction_is_coin_base = + _wire__crate__api__types__bdk_transaction_is_coin_basePtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_is_explicitly_rbf( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_is_explicitly_rbf( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_is_explicitly_rbfPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf'); + late final _wire__crate__api__types__bdk_transaction_is_explicitly_rbf = + _wire__crate__api__types__bdk_transaction_is_explicitly_rbfPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_is_lock_time_enabled( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_is_lock_time_enabled( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_is_lock_time_enabledPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled'); + late final _wire__crate__api__types__bdk_transaction_is_lock_time_enabled = + _wire__crate__api__types__bdk_transaction_is_lock_time_enabledPtr + .asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_lock_time( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_lock_time( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_lock_timePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time'); + late final _wire__crate__api__types__bdk_transaction_lock_time = + _wire__crate__api__types__bdk_transaction_lock_timePtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_new( + int port_, + int version, + ffi.Pointer lock_time, + ffi.Pointer input, + ffi.Pointer output, + ) { + return _wire__crate__api__types__bdk_transaction_new( + port_, + version, + lock_time, + input, + output, + ); + } + + late final _wire__crate__api__types__bdk_transaction_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new'); + late final _wire__crate__api__types__bdk_transaction_new = + _wire__crate__api__types__bdk_transaction_newPtr.asFunction< + void Function( + int, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_output( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_output( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_outputPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output'); + late final _wire__crate__api__types__bdk_transaction_output = + _wire__crate__api__types__bdk_transaction_outputPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_serialize( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_serialize( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_serializePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize'); + late final _wire__crate__api__types__bdk_transaction_serialize = + _wire__crate__api__types__bdk_transaction_serializePtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_size( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_size( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_sizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size'); + late final _wire__crate__api__types__bdk_transaction_size = + _wire__crate__api__types__bdk_transaction_sizePtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_txid( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_txid( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_txidPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid'); + late final _wire__crate__api__types__bdk_transaction_txid = + _wire__crate__api__types__bdk_transaction_txidPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_version( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_version( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version'); + late final _wire__crate__api__types__bdk_transaction_version = + _wire__crate__api__types__bdk_transaction_versionPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_vsize( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_vsize( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_vsizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize'); + late final _wire__crate__api__types__bdk_transaction_vsize = + _wire__crate__api__types__bdk_transaction_vsizePtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__types__bdk_transaction_weight( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__types__bdk_transaction_weight( + port_, + that, + ); + } + + late final _wire__crate__api__types__bdk_transaction_weightPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight'); + late final _wire__crate__api__types__bdk_transaction_weight = + _wire__crate__api__types__bdk_transaction_weightPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_get_address( + ffi.Pointer ptr, + ffi.Pointer address_index, + ) { + return _wire__crate__api__wallet__bdk_wallet_get_address( + ptr, + address_index, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_get_addressPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address'); + late final _wire__crate__api__wallet__bdk_wallet_get_address = + _wire__crate__api__wallet__bdk_wallet_get_addressPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer, + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_get_balance( + ffi.Pointer that, + ) { + return _wire__crate__api__wallet__bdk_wallet_get_balance( + that, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_get_balancePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance'); + late final _wire__crate__api__wallet__bdk_wallet_get_balance = + _wire__crate__api__wallet__bdk_wallet_get_balancePtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco + wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( + ffi.Pointer ptr, + int keychain, + ) { + return _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( + ptr, + keychain, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychainPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain'); + late final _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain = + _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychainPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, int)>(); + + WireSyncRust2DartDco + wire__crate__api__wallet__bdk_wallet_get_internal_address( + ffi.Pointer ptr, + ffi.Pointer address_index, + ) { + return _wire__crate__api__wallet__bdk_wallet_get_internal_address( + ptr, + address_index, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_get_internal_addressPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address'); + late final _wire__crate__api__wallet__bdk_wallet_get_internal_address = + _wire__crate__api__wallet__bdk_wallet_get_internal_addressPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__wallet__bdk_wallet_get_psbt_input( + int port_, + ffi.Pointer that, + ffi.Pointer utxo, + bool only_witness_utxo, + ffi.Pointer sighash_type, + ) { + return _wire__crate__api__wallet__bdk_wallet_get_psbt_input( + port_, + that, + utxo, + only_witness_utxo, + sighash_type, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_get_psbt_inputPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input'); + late final _wire__crate__api__wallet__bdk_wallet_get_psbt_input = + _wire__crate__api__wallet__bdk_wallet_get_psbt_inputPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_is_mine( + ffi.Pointer ptr, + ffi.Pointer script, + ) { + return _wire__crate__api__wallet__bdk_wallet_is_mine( + ptr, + script, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_is_minePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine'); + late final _wire__crate__api__wallet__bdk_wallet_is_mine = + _wire__crate__api__wallet__bdk_wallet_is_minePtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer, + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_list_transactions( + ffi.Pointer that, + bool include_raw, + ) { + return _wire__crate__api__wallet__bdk_wallet_list_transactions( + that, + include_raw, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_list_transactionsPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, ffi.Bool)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions'); + late final _wire__crate__api__wallet__bdk_wallet_list_transactions = + _wire__crate__api__wallet__bdk_wallet_list_transactionsPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, bool)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_list_unspent( + ffi.Pointer that, + ) { + return _wire__crate__api__wallet__bdk_wallet_list_unspent( + that, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_list_unspentPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent'); + late final _wire__crate__api__wallet__bdk_wallet_list_unspent = + _wire__crate__api__wallet__bdk_wallet_list_unspentPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_network( + ffi.Pointer that, + ) { + return _wire__crate__api__wallet__bdk_wallet_network( + that, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_networkPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network'); + late final _wire__crate__api__wallet__bdk_wallet_network = + _wire__crate__api__wallet__bdk_wallet_networkPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + void wire__crate__api__wallet__bdk_wallet_new( + int port_, + ffi.Pointer descriptor, + ffi.Pointer change_descriptor, + int network, + ffi.Pointer database_config, + ) { + return _wire__crate__api__wallet__bdk_wallet_new( + port_, + descriptor, + change_descriptor, + network, + database_config, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new'); + late final _wire__crate__api__wallet__bdk_wallet_new = + _wire__crate__api__wallet__bdk_wallet_newPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_policies( + ffi.Pointer ptr, + int keychain, + ) { + return _wire__crate__api__wallet__bdk_wallet_policies( + ptr, + keychain, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_policiesPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies'); + late final _wire__crate__api__wallet__bdk_wallet_policies = + _wire__crate__api__wallet__bdk_wallet_policiesPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, int)>(); + + void wire__crate__api__wallet__bdk_wallet_sign( + int port_, + ffi.Pointer ptr, + ffi.Pointer psbt, + ffi.Pointer sign_options, + ) { + return _wire__crate__api__wallet__bdk_wallet_sign( + port_, + ptr, + psbt, + sign_options, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_signPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign'); + late final _wire__crate__api__wallet__bdk_wallet_sign = + _wire__crate__api__wallet__bdk_wallet_signPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__wallet__bdk_wallet_sync( + int port_, + ffi.Pointer ptr, + ffi.Pointer blockchain, + ) { + return _wire__crate__api__wallet__bdk_wallet_sync( + port_, + ptr, + blockchain, + ); + } + + late final _wire__crate__api__wallet__bdk_wallet_syncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync'); + late final _wire__crate__api__wallet__bdk_wallet_sync = + _wire__crate__api__wallet__bdk_wallet_syncPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__wallet__finish_bump_fee_tx_builder( + int port_, + ffi.Pointer txid, + double fee_rate, + ffi.Pointer allow_shrinking, + ffi.Pointer wallet, + bool enable_rbf, + ffi.Pointer n_sequence, + ) { + return _wire__crate__api__wallet__finish_bump_fee_tx_builder( + port_, + txid, + fee_rate, + allow_shrinking, + wallet, + enable_rbf, + n_sequence, + ); + } + + late final _wire__crate__api__wallet__finish_bump_fee_tx_builderPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Float, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder'); + late final _wire__crate__api__wallet__finish_bump_fee_tx_builder = + _wire__crate__api__wallet__finish_bump_fee_tx_builderPtr.asFunction< + void Function( + int, + ffi.Pointer, + double, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + void wire__crate__api__wallet__tx_builder_finish( + int port_, + ffi.Pointer wallet, + ffi.Pointer recipients, + ffi.Pointer utxos, + ffi.Pointer foreign_utxo, + ffi.Pointer un_spendable, + int change_policy, + bool manually_selected_only, + ffi.Pointer fee_rate, + ffi.Pointer fee_absolute, + bool drain_wallet, + ffi.Pointer drain_to, + ffi.Pointer rbf, + ffi.Pointer + internal_policy_path, + ffi.Pointer + external_policy_path, + ffi.Pointer data, + ) { + return _wire__crate__api__wallet__tx_builder_finish( + port_, + wallet, + recipients, + utxos, + foreign_utxo, + un_spendable, + change_policy, + manually_selected_only, + fee_rate, + fee_absolute, + drain_wallet, + drain_to, + rbf, + internal_policy_path, + external_policy_path, + data, + ); + } + + late final _wire__crate__api__wallet__tx_builder_finishPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + wire_cst_list_record_string_list_prim_u_32_strict>, + ffi.Pointer< + wire_cst_list_record_string_list_prim_u_32_strict>, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish'); + late final _wire__crate__api__wallet__tx_builder_finish = + _wire__crate__api__wallet__tx_builder_finishPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddressPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress'); + late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress = + _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddressPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress = + _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath'); + late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath = + _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath = + _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain'); + late final _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain = + _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain = + _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr + .asFunction)>(); + + void + rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor'); + late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor = + _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor = + _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy'); + late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy = + _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicyPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy = + _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicyPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey'); + late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey = + _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey = + _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey'); + late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey = + _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey = + _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMapPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap'); + late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap = + _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMapPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMapPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap = + _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMapPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic'); + late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic = + _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic = + _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr + .asFunction)>(); + + void + rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase'); + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase = + _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase'); + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase = + _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr + .asFunction)>(); + + void + rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction'); + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction = + _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction'); + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction = + _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr + .asFunction)>(); + + ffi.Pointer cst_new_box_autoadd_address_error() { + return _cst_new_box_autoadd_address_error(); + } + + late final _cst_new_box_autoadd_address_errorPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_address_error'); + late final _cst_new_box_autoadd_address_error = + _cst_new_box_autoadd_address_errorPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_address_index() { + return _cst_new_box_autoadd_address_index(); + } + + late final _cst_new_box_autoadd_address_indexPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_address_index'); + late final _cst_new_box_autoadd_address_index = + _cst_new_box_autoadd_address_indexPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bdk_address() { + return _cst_new_box_autoadd_bdk_address(); + } + + late final _cst_new_box_autoadd_bdk_addressPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address'); + late final _cst_new_box_autoadd_bdk_address = + _cst_new_box_autoadd_bdk_addressPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bdk_blockchain() { + return _cst_new_box_autoadd_bdk_blockchain(); + } + + late final _cst_new_box_autoadd_bdk_blockchainPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain'); + late final _cst_new_box_autoadd_bdk_blockchain = + _cst_new_box_autoadd_bdk_blockchainPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_bdk_derivation_path() { + return _cst_new_box_autoadd_bdk_derivation_path(); + } + + late final _cst_new_box_autoadd_bdk_derivation_pathPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path'); + late final _cst_new_box_autoadd_bdk_derivation_path = + _cst_new_box_autoadd_bdk_derivation_pathPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bdk_descriptor() { + return _cst_new_box_autoadd_bdk_descriptor(); + } + + late final _cst_new_box_autoadd_bdk_descriptorPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor'); + late final _cst_new_box_autoadd_bdk_descriptor = + _cst_new_box_autoadd_bdk_descriptorPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_bdk_descriptor_public_key() { + return _cst_new_box_autoadd_bdk_descriptor_public_key(); + } + + late final _cst_new_box_autoadd_bdk_descriptor_public_keyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key'); + late final _cst_new_box_autoadd_bdk_descriptor_public_key = + _cst_new_box_autoadd_bdk_descriptor_public_keyPtr.asFunction< + ffi.Pointer Function()>(); + + ffi.Pointer + cst_new_box_autoadd_bdk_descriptor_secret_key() { + return _cst_new_box_autoadd_bdk_descriptor_secret_key(); + } + + late final _cst_new_box_autoadd_bdk_descriptor_secret_keyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key'); + late final _cst_new_box_autoadd_bdk_descriptor_secret_key = + _cst_new_box_autoadd_bdk_descriptor_secret_keyPtr.asFunction< + ffi.Pointer Function()>(); + + ffi.Pointer cst_new_box_autoadd_bdk_mnemonic() { + return _cst_new_box_autoadd_bdk_mnemonic(); + } + + late final _cst_new_box_autoadd_bdk_mnemonicPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic'); + late final _cst_new_box_autoadd_bdk_mnemonic = + _cst_new_box_autoadd_bdk_mnemonicPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bdk_policy() { + return _cst_new_box_autoadd_bdk_policy(); + } + + late final _cst_new_box_autoadd_bdk_policyPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy'); + late final _cst_new_box_autoadd_bdk_policy = + _cst_new_box_autoadd_bdk_policyPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bdk_psbt() { + return _cst_new_box_autoadd_bdk_psbt(); + } + + late final _cst_new_box_autoadd_bdk_psbtPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt'); + late final _cst_new_box_autoadd_bdk_psbt = _cst_new_box_autoadd_bdk_psbtPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bdk_script_buf() { + return _cst_new_box_autoadd_bdk_script_buf(); + } + + late final _cst_new_box_autoadd_bdk_script_bufPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf'); + late final _cst_new_box_autoadd_bdk_script_buf = + _cst_new_box_autoadd_bdk_script_bufPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bdk_transaction() { + return _cst_new_box_autoadd_bdk_transaction(); + } + + late final _cst_new_box_autoadd_bdk_transactionPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction'); + late final _cst_new_box_autoadd_bdk_transaction = + _cst_new_box_autoadd_bdk_transactionPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bdk_wallet() { + return _cst_new_box_autoadd_bdk_wallet(); + } + + late final _cst_new_box_autoadd_bdk_walletPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet'); + late final _cst_new_box_autoadd_bdk_wallet = + _cst_new_box_autoadd_bdk_walletPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_block_time() { + return _cst_new_box_autoadd_block_time(); + } + + late final _cst_new_box_autoadd_block_timePtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_block_time'); + late final _cst_new_box_autoadd_block_time = + _cst_new_box_autoadd_block_timePtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_blockchain_config() { + return _cst_new_box_autoadd_blockchain_config(); + } + + late final _cst_new_box_autoadd_blockchain_configPtr = _lookup< + ffi + .NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config'); + late final _cst_new_box_autoadd_blockchain_config = + _cst_new_box_autoadd_blockchain_configPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bool( + bool value, + ) { + return _cst_new_box_autoadd_bool( + value, + ); + } + + late final _cst_new_box_autoadd_boolPtr = + _lookup Function(ffi.Bool)>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_bool'); + late final _cst_new_box_autoadd_bool = _cst_new_box_autoadd_boolPtr + .asFunction Function(bool)>(); + + ffi.Pointer cst_new_box_autoadd_condition() { + return _cst_new_box_autoadd_condition(); + } + + late final _cst_new_box_autoadd_conditionPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_condition'); + late final _cst_new_box_autoadd_condition = _cst_new_box_autoadd_conditionPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_consensus_error() { + return _cst_new_box_autoadd_consensus_error(); + } + + late final _cst_new_box_autoadd_consensus_errorPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error'); + late final _cst_new_box_autoadd_consensus_error = + _cst_new_box_autoadd_consensus_errorPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_database_config() { + return _cst_new_box_autoadd_database_config(); + } + + late final _cst_new_box_autoadd_database_configPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_database_config'); + late final _cst_new_box_autoadd_database_config = + _cst_new_box_autoadd_database_configPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_descriptor_error() { + return _cst_new_box_autoadd_descriptor_error(); + } + + late final _cst_new_box_autoadd_descriptor_errorPtr = _lookup< + ffi + .NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error'); + late final _cst_new_box_autoadd_descriptor_error = + _cst_new_box_autoadd_descriptor_errorPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_electrum_config() { + return _cst_new_box_autoadd_electrum_config(); + } + + late final _cst_new_box_autoadd_electrum_configPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config'); + late final _cst_new_box_autoadd_electrum_config = + _cst_new_box_autoadd_electrum_configPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_esplora_config() { + return _cst_new_box_autoadd_esplora_config(); + } + + late final _cst_new_box_autoadd_esplora_configPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config'); + late final _cst_new_box_autoadd_esplora_config = + _cst_new_box_autoadd_esplora_configPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_f_32( + double value, + ) { + return _cst_new_box_autoadd_f_32( + value, + ); + } + + late final _cst_new_box_autoadd_f_32Ptr = + _lookup Function(ffi.Float)>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_f_32'); + late final _cst_new_box_autoadd_f_32 = _cst_new_box_autoadd_f_32Ptr + .asFunction Function(double)>(); + + ffi.Pointer cst_new_box_autoadd_fee_rate() { + return _cst_new_box_autoadd_fee_rate(); + } + + late final _cst_new_box_autoadd_fee_ratePtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate'); + late final _cst_new_box_autoadd_fee_rate = _cst_new_box_autoadd_fee_ratePtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_hex_error() { + return _cst_new_box_autoadd_hex_error(); + } + + late final _cst_new_box_autoadd_hex_errorPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_hex_error'); + late final _cst_new_box_autoadd_hex_error = _cst_new_box_autoadd_hex_errorPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_local_utxo() { + return _cst_new_box_autoadd_local_utxo(); + } + + late final _cst_new_box_autoadd_local_utxoPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo'); + late final _cst_new_box_autoadd_local_utxo = + _cst_new_box_autoadd_local_utxoPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_lock_time() { + return _cst_new_box_autoadd_lock_time(); + } + + late final _cst_new_box_autoadd_lock_timePtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_lock_time'); + late final _cst_new_box_autoadd_lock_time = _cst_new_box_autoadd_lock_timePtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_out_point() { + return _cst_new_box_autoadd_out_point(); + } + + late final _cst_new_box_autoadd_out_pointPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_out_point'); + late final _cst_new_box_autoadd_out_point = _cst_new_box_autoadd_out_pointPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_pk_or_f() { + return _cst_new_box_autoadd_pk_or_f(); + } + + late final _cst_new_box_autoadd_pk_or_fPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f'); + late final _cst_new_box_autoadd_pk_or_f = _cst_new_box_autoadd_pk_or_fPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_psbt_sig_hash_type() { + return _cst_new_box_autoadd_psbt_sig_hash_type(); + } + + late final _cst_new_box_autoadd_psbt_sig_hash_typePtr = _lookup< + ffi + .NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type'); + late final _cst_new_box_autoadd_psbt_sig_hash_type = + _cst_new_box_autoadd_psbt_sig_hash_typePtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_rbf_value() { + return _cst_new_box_autoadd_rbf_value(); + } + + late final _cst_new_box_autoadd_rbf_valuePtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value'); + late final _cst_new_box_autoadd_rbf_value = _cst_new_box_autoadd_rbf_valuePtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_record_out_point_input_usize() { + return _cst_new_box_autoadd_record_out_point_input_usize(); + } + + late final _cst_new_box_autoadd_record_out_point_input_usizePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize'); + late final _cst_new_box_autoadd_record_out_point_input_usize = + _cst_new_box_autoadd_record_out_point_input_usizePtr.asFunction< + ffi.Pointer Function()>(); + + ffi.Pointer cst_new_box_autoadd_rpc_config() { + return _cst_new_box_autoadd_rpc_config(); + } + + late final _cst_new_box_autoadd_rpc_configPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config'); + late final _cst_new_box_autoadd_rpc_config = + _cst_new_box_autoadd_rpc_configPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_rpc_sync_params() { + return _cst_new_box_autoadd_rpc_sync_params(); + } + + late final _cst_new_box_autoadd_rpc_sync_paramsPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params'); + late final _cst_new_box_autoadd_rpc_sync_params = + _cst_new_box_autoadd_rpc_sync_paramsPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_sign_options() { + return _cst_new_box_autoadd_sign_options(); + } + + late final _cst_new_box_autoadd_sign_optionsPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_sign_options'); + late final _cst_new_box_autoadd_sign_options = + _cst_new_box_autoadd_sign_optionsPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_sled_db_configuration() { + return _cst_new_box_autoadd_sled_db_configuration(); + } + + late final _cst_new_box_autoadd_sled_db_configurationPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration'); + late final _cst_new_box_autoadd_sled_db_configuration = + _cst_new_box_autoadd_sled_db_configurationPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_sqlite_db_configuration() { + return _cst_new_box_autoadd_sqlite_db_configuration(); + } + + late final _cst_new_box_autoadd_sqlite_db_configurationPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration'); + late final _cst_new_box_autoadd_sqlite_db_configuration = + _cst_new_box_autoadd_sqlite_db_configurationPtr.asFunction< + ffi.Pointer Function()>(); + + ffi.Pointer cst_new_box_autoadd_u_32( + int value, + ) { + return _cst_new_box_autoadd_u_32( + value, + ); + } + + late final _cst_new_box_autoadd_u_32Ptr = + _lookup Function(ffi.Uint32)>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_u_32'); + late final _cst_new_box_autoadd_u_32 = _cst_new_box_autoadd_u_32Ptr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_box_autoadd_u_64( + int value, + ) { + return _cst_new_box_autoadd_u_64( + value, + ); + } + + late final _cst_new_box_autoadd_u_64Ptr = + _lookup Function(ffi.Uint64)>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_u_64'); + late final _cst_new_box_autoadd_u_64 = _cst_new_box_autoadd_u_64Ptr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_box_autoadd_u_8( + int value, + ) { + return _cst_new_box_autoadd_u_8( + value, + ); + } + + late final _cst_new_box_autoadd_u_8Ptr = + _lookup Function(ffi.Uint8)>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_u_8'); + late final _cst_new_box_autoadd_u_8 = _cst_new_box_autoadd_u_8Ptr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_bdk_policy( + int len, + ) { + return _cst_new_list_bdk_policy( + len, + ); + } + + late final _cst_new_list_bdk_policyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_bdk_policy'); + late final _cst_new_list_bdk_policy = _cst_new_list_bdk_policyPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_condition( + int len, + ) { + return _cst_new_list_condition( + len, + ); + } + + late final _cst_new_list_conditionPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_condition'); + late final _cst_new_list_condition = _cst_new_list_conditionPtr + .asFunction Function(int)>(); + + ffi.Pointer + cst_new_list_list_prim_u_8_strict( + int len, + ) { + return _cst_new_list_list_prim_u_8_strict( + len, + ); + } + + late final _cst_new_list_list_prim_u_8_strictPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>( + 'frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict'); + late final _cst_new_list_list_prim_u_8_strict = + _cst_new_list_list_prim_u_8_strictPtr.asFunction< + ffi.Pointer Function(int)>(); + + ffi.Pointer cst_new_list_local_utxo( + int len, + ) { + return _cst_new_list_local_utxo( + len, + ); + } + + late final _cst_new_list_local_utxoPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_local_utxo'); + late final _cst_new_list_local_utxo = _cst_new_list_local_utxoPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_out_point( + int len, + ) { + return _cst_new_list_out_point( + len, + ); + } + + late final _cst_new_list_out_pointPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_out_point'); + late final _cst_new_list_out_point = _cst_new_list_out_pointPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_pk_or_f( + int len, + ) { + return _cst_new_list_pk_or_f( + len, + ); + } + + late final _cst_new_list_pk_or_fPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_pk_or_f'); + late final _cst_new_list_pk_or_f = _cst_new_list_pk_or_fPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_prim_u_32_strict( + int len, + ) { + return _cst_new_list_prim_u_32_strict( + len, + ); + } + + late final _cst_new_list_prim_u_32_strictPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_prim_u_32_strict'); + late final _cst_new_list_prim_u_32_strict = _cst_new_list_prim_u_32_strictPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_prim_u_64_strict( + int len, + ) { + return _cst_new_list_prim_u_64_strict( + len, + ); + } + + late final _cst_new_list_prim_u_64_strictPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_prim_u_64_strict'); + late final _cst_new_list_prim_u_64_strict = _cst_new_list_prim_u_64_strictPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_prim_u_8_loose( + int len, + ) { + return _cst_new_list_prim_u_8_loose( + len, + ); + } + + late final _cst_new_list_prim_u_8_loosePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_prim_u_8_loose'); + late final _cst_new_list_prim_u_8_loose = _cst_new_list_prim_u_8_loosePtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_prim_u_8_strict( + int len, + ) { + return _cst_new_list_prim_u_8_strict( + len, + ); + } + + late final _cst_new_list_prim_u_8_strictPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_prim_u_8_strict'); + late final _cst_new_list_prim_u_8_strict = _cst_new_list_prim_u_8_strictPtr + .asFunction Function(int)>(); + + ffi.Pointer + cst_new_list_record_list_prim_u_32_strict_list_condition( + int len, + ) { + return _cst_new_list_record_list_prim_u_32_strict_list_condition( + len, + ); + } + + late final _cst_new_list_record_list_prim_u_32_strict_list_conditionPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer< + wire_cst_list_record_list_prim_u_32_strict_list_condition> + Function(ffi.Int32)>>( + 'frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition'); + late final _cst_new_list_record_list_prim_u_32_strict_list_condition = + _cst_new_list_record_list_prim_u_32_strict_list_conditionPtr.asFunction< + ffi.Pointer + Function(int)>(); + + ffi.Pointer + cst_new_list_record_string_list_prim_u_32_strict( + int len, + ) { + return _cst_new_list_record_string_list_prim_u_32_strict( + len, + ); + } + + late final _cst_new_list_record_string_list_prim_u_32_strictPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer + Function(ffi.Int32)>>( + 'frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict'); + late final _cst_new_list_record_string_list_prim_u_32_strict = + _cst_new_list_record_string_list_prim_u_32_strictPtr.asFunction< + ffi.Pointer + Function(int)>(); + + ffi.Pointer + cst_new_list_record_u_32_list_condition( + int len, + ) { + return _cst_new_list_record_u_32_list_condition( + len, + ); + } + + late final _cst_new_list_record_u_32_list_conditionPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>( + 'frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition'); + late final _cst_new_list_record_u_32_list_condition = + _cst_new_list_record_u_32_list_conditionPtr.asFunction< + ffi.Pointer Function( + int)>(); + + ffi.Pointer cst_new_list_script_amount( + int len, + ) { + return _cst_new_list_script_amount( + len, + ); + } + + late final _cst_new_list_script_amountPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_script_amount'); + late final _cst_new_list_script_amount = _cst_new_list_script_amountPtr + .asFunction Function(int)>(); + + ffi.Pointer + cst_new_list_transaction_details( + int len, + ) { + return _cst_new_list_transaction_details( + len, + ); + } + + late final _cst_new_list_transaction_detailsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>( + 'frbgen_bdk_flutter_cst_new_list_transaction_details'); + late final _cst_new_list_transaction_details = + _cst_new_list_transaction_detailsPtr.asFunction< + ffi.Pointer Function(int)>(); + + ffi.Pointer cst_new_list_tx_in( + int len, + ) { + return _cst_new_list_tx_in( + len, + ); + } + + late final _cst_new_list_tx_inPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_tx_in'); + late final _cst_new_list_tx_in = _cst_new_list_tx_inPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_tx_out( + int len, + ) { + return _cst_new_list_tx_out( + len, + ); + } + + late final _cst_new_list_tx_outPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_tx_out'); + late final _cst_new_list_tx_out = _cst_new_list_tx_outPtr + .asFunction Function(int)>(); + + int dummy_method_to_enforce_bundling() { + return _dummy_method_to_enforce_bundling(); + } + + late final _dummy_method_to_enforce_bundlingPtr = + _lookup>( + 'dummy_method_to_enforce_bundling'); + late final _dummy_method_to_enforce_bundling = + _dummy_method_to_enforce_bundlingPtr.asFunction(); +} + +typedef DartPostCObjectFnType + = ffi.Pointer>; +typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( + DartPort port_id, ffi.Pointer message); +typedef DartDartPostCObjectFnTypeFunction = bool Function( + DartDartPort port_id, ffi.Pointer message); +typedef DartPort = ffi.Int64; +typedef DartDartPort = int; + +final class wire_cst_bdk_blockchain extends ffi.Struct { + @ffi.UintPtr() + external int ptr; +} + +final class wire_cst_list_prim_u_8_strict extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_bdk_transaction extends ffi.Struct { + external ffi.Pointer s; +} + +final class wire_cst_electrum_config extends ffi.Struct { + external ffi.Pointer url; + + external ffi.Pointer socks5; + + @ffi.Uint8() + external int retry; + + external ffi.Pointer timeout; + + @ffi.Uint64() + external int stop_gap; + + @ffi.Bool() + external bool validate_domain; +} + +final class wire_cst_BlockchainConfig_Electrum extends ffi.Struct { + external ffi.Pointer config; +} + +final class wire_cst_esplora_config extends ffi.Struct { + external ffi.Pointer base_url; + + external ffi.Pointer proxy; + + external ffi.Pointer concurrency; + + @ffi.Uint64() + external int stop_gap; + + external ffi.Pointer timeout; +} + +final class wire_cst_BlockchainConfig_Esplora extends ffi.Struct { + external ffi.Pointer config; +} + +final class wire_cst_Auth_UserPass extends ffi.Struct { + external ffi.Pointer username; + + external ffi.Pointer password; +} + +final class wire_cst_Auth_Cookie extends ffi.Struct { + external ffi.Pointer file; +} + +final class AuthKind extends ffi.Union { + external wire_cst_Auth_UserPass UserPass; + + external wire_cst_Auth_Cookie Cookie; +} + +final class wire_cst_auth extends ffi.Struct { + @ffi.Int32() + external int tag; + + external AuthKind kind; +} + +final class wire_cst_rpc_sync_params extends ffi.Struct { + @ffi.Uint64() + external int start_script_count; + + @ffi.Uint64() + external int start_time; + + @ffi.Bool() + external bool force_start_time; + + @ffi.Uint64() + external int poll_rate_sec; +} + +final class wire_cst_rpc_config extends ffi.Struct { + external ffi.Pointer url; + + external wire_cst_auth auth; + + @ffi.Int32() + external int network; + + external ffi.Pointer wallet_name; + + external ffi.Pointer sync_params; +} + +final class wire_cst_BlockchainConfig_Rpc extends ffi.Struct { + external ffi.Pointer config; +} + +final class BlockchainConfigKind extends ffi.Union { + external wire_cst_BlockchainConfig_Electrum Electrum; + + external wire_cst_BlockchainConfig_Esplora Esplora; + + external wire_cst_BlockchainConfig_Rpc Rpc; +} + +final class wire_cst_blockchain_config extends ffi.Struct { + @ffi.Int32() + external int tag; + + external BlockchainConfigKind kind; +} + +final class wire_cst_bdk_descriptor extends ffi.Struct { + @ffi.UintPtr() + external int extended_descriptor; + + @ffi.UintPtr() + external int key_map; +} + +final class wire_cst_bdk_descriptor_secret_key extends ffi.Struct { + @ffi.UintPtr() + external int ptr; +} + +final class wire_cst_bdk_descriptor_public_key extends ffi.Struct { + @ffi.UintPtr() + external int ptr; +} + +final class wire_cst_bdk_derivation_path extends ffi.Struct { + @ffi.UintPtr() + external int ptr; +} + +final class wire_cst_bdk_mnemonic extends ffi.Struct { + @ffi.UintPtr() + external int ptr; +} + +final class wire_cst_list_prim_u_8_loose extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_bdk_psbt extends ffi.Struct { + @ffi.UintPtr() + external int ptr; +} + +final class wire_cst_bdk_address extends ffi.Struct { + @ffi.UintPtr() + external int ptr; +} + +final class wire_cst_bdk_script_buf extends ffi.Struct { + external ffi.Pointer bytes; +} + +final class wire_cst_bdk_policy extends ffi.Struct { + @ffi.UintPtr() + external int ptr; +} + +final class wire_cst_LockTime_Blocks extends ffi.Struct { + @ffi.Uint32() + external int field0; +} + +final class wire_cst_LockTime_Seconds extends ffi.Struct { + @ffi.Uint32() + external int field0; +} + +final class LockTimeKind extends ffi.Union { + external wire_cst_LockTime_Blocks Blocks; + + external wire_cst_LockTime_Seconds Seconds; +} + +final class wire_cst_lock_time extends ffi.Struct { + @ffi.Int32() + external int tag; + + external LockTimeKind kind; +} + +final class wire_cst_out_point extends ffi.Struct { + external ffi.Pointer txid; + + @ffi.Uint32() + external int vout; +} + +final class wire_cst_list_list_prim_u_8_strict extends ffi.Struct { + external ffi.Pointer> ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_tx_in extends ffi.Struct { + external wire_cst_out_point previous_output; + + external wire_cst_bdk_script_buf script_sig; + + @ffi.Uint32() + external int sequence; + + external ffi.Pointer witness; +} + +final class wire_cst_list_tx_in extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_tx_out extends ffi.Struct { + @ffi.Uint64() + external int value; + + external wire_cst_bdk_script_buf script_pubkey; +} + +final class wire_cst_list_tx_out extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_bdk_wallet extends ffi.Struct { + @ffi.UintPtr() + external int ptr; +} + +final class wire_cst_AddressIndex_Peek extends ffi.Struct { + @ffi.Uint32() + external int index; +} + +final class wire_cst_AddressIndex_Reset extends ffi.Struct { + @ffi.Uint32() + external int index; +} + +final class AddressIndexKind extends ffi.Union { + external wire_cst_AddressIndex_Peek Peek; + + external wire_cst_AddressIndex_Reset Reset; +} + +final class wire_cst_address_index extends ffi.Struct { + @ffi.Int32() + external int tag; + + external AddressIndexKind kind; +} + +final class wire_cst_local_utxo extends ffi.Struct { + external wire_cst_out_point outpoint; + + external wire_cst_tx_out txout; + + @ffi.Int32() + external int keychain; + + @ffi.Bool() + external bool is_spent; +} + +final class wire_cst_psbt_sig_hash_type extends ffi.Struct { + @ffi.Uint32() + external int inner; +} + +final class wire_cst_sqlite_db_configuration extends ffi.Struct { + external ffi.Pointer path; +} + +final class wire_cst_DatabaseConfig_Sqlite extends ffi.Struct { + external ffi.Pointer config; +} + +final class wire_cst_sled_db_configuration extends ffi.Struct { + external ffi.Pointer path; + + external ffi.Pointer tree_name; +} + +final class wire_cst_DatabaseConfig_Sled extends ffi.Struct { + external ffi.Pointer config; +} + +final class DatabaseConfigKind extends ffi.Union { + external wire_cst_DatabaseConfig_Sqlite Sqlite; + + external wire_cst_DatabaseConfig_Sled Sled; +} + +final class wire_cst_database_config extends ffi.Struct { + @ffi.Int32() + external int tag; + + external DatabaseConfigKind kind; +} + +final class wire_cst_sign_options extends ffi.Struct { + @ffi.Bool() + external bool trust_witness_utxo; + + external ffi.Pointer assume_height; + + @ffi.Bool() + external bool allow_all_sighashes; + + @ffi.Bool() + external bool remove_partial_sigs; + + @ffi.Bool() + external bool try_finalize; + + @ffi.Bool() + external bool sign_with_tap_internal_key; + + @ffi.Bool() + external bool allow_grinding; +} + +final class wire_cst_script_amount extends ffi.Struct { + external wire_cst_bdk_script_buf script; + + @ffi.Uint64() + external int amount; +} + +final class wire_cst_list_script_amount extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_out_point extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_input extends ffi.Struct { + external ffi.Pointer s; +} + +final class wire_cst_record_out_point_input_usize extends ffi.Struct { + external wire_cst_out_point field0; + + external wire_cst_input field1; + + @ffi.UintPtr() + external int field2; +} + +final class wire_cst_RbfValue_Value extends ffi.Struct { + @ffi.Uint32() + external int field0; +} + +final class RbfValueKind extends ffi.Union { + external wire_cst_RbfValue_Value Value; +} + +final class wire_cst_rbf_value extends ffi.Struct { + @ffi.Int32() + external int tag; + + external RbfValueKind kind; +} + +final class wire_cst_list_prim_u_32_strict extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_record_string_list_prim_u_32_strict extends ffi.Struct { + external ffi.Pointer field0; + + external ffi.Pointer field1; +} + +final class wire_cst_list_record_string_list_prim_u_32_strict + extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_AddressError_Base58 extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_AddressError_Bech32 extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_AddressError_InvalidBech32Variant extends ffi.Struct { + @ffi.Int32() + external int expected; + + @ffi.Int32() + external int found; +} + +final class wire_cst_AddressError_InvalidWitnessVersion extends ffi.Struct { + @ffi.Uint8() + external int field0; +} + +final class wire_cst_AddressError_UnparsableWitnessVersion extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_AddressError_InvalidWitnessProgramLength + extends ffi.Struct { + @ffi.UintPtr() + external int field0; +} + +final class wire_cst_AddressError_InvalidSegwitV0ProgramLength + extends ffi.Struct { + @ffi.UintPtr() + external int field0; +} + +final class wire_cst_AddressError_UnknownAddressType extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_AddressError_NetworkValidation extends ffi.Struct { + @ffi.Int32() + external int network_required; + + @ffi.Int32() + external int network_found; + + external ffi.Pointer address; +} + +final class AddressErrorKind extends ffi.Union { + external wire_cst_AddressError_Base58 Base58; + + external wire_cst_AddressError_Bech32 Bech32; + + external wire_cst_AddressError_InvalidBech32Variant InvalidBech32Variant; + + external wire_cst_AddressError_InvalidWitnessVersion InvalidWitnessVersion; + + external wire_cst_AddressError_UnparsableWitnessVersion + UnparsableWitnessVersion; + + external wire_cst_AddressError_InvalidWitnessProgramLength + InvalidWitnessProgramLength; + + external wire_cst_AddressError_InvalidSegwitV0ProgramLength + InvalidSegwitV0ProgramLength; + + external wire_cst_AddressError_UnknownAddressType UnknownAddressType; + + external wire_cst_AddressError_NetworkValidation NetworkValidation; +} + +final class wire_cst_address_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external AddressErrorKind kind; +} + +final class wire_cst_block_time extends ffi.Struct { + @ffi.Uint32() + external int height; + + @ffi.Uint64() + external int timestamp; +} + +final class wire_cst_condition extends ffi.Struct { + external ffi.Pointer csv; + + external ffi.Pointer timelock; +} + +final class wire_cst_ConsensusError_Io extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_ConsensusError_OversizedVectorAllocation + extends ffi.Struct { + @ffi.UintPtr() + external int requested; + + @ffi.UintPtr() + external int max; +} + +final class wire_cst_ConsensusError_InvalidChecksum extends ffi.Struct { + external ffi.Pointer expected; + + external ffi.Pointer actual; +} + +final class wire_cst_ConsensusError_ParseFailed extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_ConsensusError_UnsupportedSegwitFlag extends ffi.Struct { + @ffi.Uint8() + external int field0; +} + +final class ConsensusErrorKind extends ffi.Union { + external wire_cst_ConsensusError_Io Io; + + external wire_cst_ConsensusError_OversizedVectorAllocation + OversizedVectorAllocation; + + external wire_cst_ConsensusError_InvalidChecksum InvalidChecksum; + + external wire_cst_ConsensusError_ParseFailed ParseFailed; + + external wire_cst_ConsensusError_UnsupportedSegwitFlag UnsupportedSegwitFlag; +} + +final class wire_cst_consensus_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external ConsensusErrorKind kind; +} + +final class wire_cst_DescriptorError_Key extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_DescriptorError_Policy extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_DescriptorError_InvalidDescriptorCharacter + extends ffi.Struct { + @ffi.Uint8() + external int field0; +} + +final class wire_cst_DescriptorError_Bip32 extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_DescriptorError_Base58 extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_DescriptorError_Pk extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_DescriptorError_Miniscript extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_DescriptorError_Hex extends ffi.Struct { + external ffi.Pointer field0; +} + +final class DescriptorErrorKind extends ffi.Union { + external wire_cst_DescriptorError_Key Key; + + external wire_cst_DescriptorError_Policy Policy; + + external wire_cst_DescriptorError_InvalidDescriptorCharacter + InvalidDescriptorCharacter; + + external wire_cst_DescriptorError_Bip32 Bip32; + + external wire_cst_DescriptorError_Base58 Base58; + + external wire_cst_DescriptorError_Pk Pk; + + external wire_cst_DescriptorError_Miniscript Miniscript; + + external wire_cst_DescriptorError_Hex Hex; +} + +final class wire_cst_descriptor_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external DescriptorErrorKind kind; +} + +final class wire_cst_fee_rate extends ffi.Struct { + @ffi.Float() + external double sat_per_vb; +} + +final class wire_cst_HexError_InvalidChar extends ffi.Struct { + @ffi.Uint8() + external int field0; +} + +final class wire_cst_HexError_OddLengthString extends ffi.Struct { + @ffi.UintPtr() + external int field0; +} + +final class wire_cst_HexError_InvalidLength extends ffi.Struct { + @ffi.UintPtr() + external int field0; + + @ffi.UintPtr() + external int field1; +} + +final class HexErrorKind extends ffi.Union { + external wire_cst_HexError_InvalidChar InvalidChar; + + external wire_cst_HexError_OddLengthString OddLengthString; + + external wire_cst_HexError_InvalidLength InvalidLength; +} + +final class wire_cst_hex_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external HexErrorKind kind; +} + +final class wire_cst_PkOrF_Pubkey extends ffi.Struct { + external ffi.Pointer value; +} + +final class wire_cst_PkOrF_XOnlyPubkey extends ffi.Struct { + external ffi.Pointer value; +} + +final class wire_cst_PkOrF_Fingerprint extends ffi.Struct { + external ffi.Pointer value; +} + +final class PkOrFKind extends ffi.Union { + external wire_cst_PkOrF_Pubkey Pubkey; + + external wire_cst_PkOrF_XOnlyPubkey XOnlyPubkey; + + external wire_cst_PkOrF_Fingerprint Fingerprint; +} + +final class wire_cst_pk_or_f extends ffi.Struct { + @ffi.Int32() + external int tag; + + external PkOrFKind kind; +} + +final class wire_cst_list_bdk_policy extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_condition extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_local_utxo extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_pk_or_f extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_prim_u_64_strict extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_record_list_prim_u_32_strict_list_condition + extends ffi.Struct { + external ffi.Pointer field0; + + external ffi.Pointer field1; +} + +final class wire_cst_list_record_list_prim_u_32_strict_list_condition + extends ffi.Struct { + external ffi.Pointer + ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_record_u_32_list_condition extends ffi.Struct { + @ffi.Uint32() + external int field0; + + external ffi.Pointer field1; +} + +final class wire_cst_list_record_u_32_list_condition extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_transaction_details extends ffi.Struct { + external ffi.Pointer transaction; + + external ffi.Pointer txid; + + @ffi.Uint64() + external int received; + + @ffi.Uint64() + external int sent; + + external ffi.Pointer fee; + + external ffi.Pointer confirmation_time; +} + +final class wire_cst_list_transaction_details extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_balance extends ffi.Struct { + @ffi.Uint64() + external int immature; + + @ffi.Uint64() + external int trusted_pending; + + @ffi.Uint64() + external int untrusted_pending; + + @ffi.Uint64() + external int confirmed; + + @ffi.Uint64() + external int spendable; + + @ffi.Uint64() + external int total; +} + +final class wire_cst_BdkError_Hex extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Consensus extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_VerifyTransaction extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Address extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Descriptor extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_InvalidU32Bytes extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Generic extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_OutputBelowDustLimit extends ffi.Struct { + @ffi.UintPtr() + external int field0; +} + +final class wire_cst_BdkError_InsufficientFunds extends ffi.Struct { + @ffi.Uint64() + external int needed; + + @ffi.Uint64() + external int available; +} + +final class wire_cst_BdkError_FeeRateTooLow extends ffi.Struct { + @ffi.Float() + external double needed; +} + +final class wire_cst_BdkError_FeeTooLow extends ffi.Struct { + @ffi.Uint64() + external int needed; +} + +final class wire_cst_BdkError_MissingKeyOrigin extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Key extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_SpendingPolicyRequired extends ffi.Struct { + @ffi.Int32() + external int field0; +} + +final class wire_cst_BdkError_InvalidPolicyPathError extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Signer extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_InvalidNetwork extends ffi.Struct { + @ffi.Int32() + external int requested; + + @ffi.Int32() + external int found; +} + +final class wire_cst_BdkError_InvalidOutpoint extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Encode extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Miniscript extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_MiniscriptPsbt extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Bip32 extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Bip39 extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Secp256k1 extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Json extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Psbt extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_PsbtParse extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_MissingCachedScripts extends ffi.Struct { + @ffi.UintPtr() + external int field0; + + @ffi.UintPtr() + external int field1; +} + +final class wire_cst_BdkError_Electrum extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Esplora extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Sled extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Rpc extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_Rusqlite extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_InvalidInput extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_InvalidLockTime extends ffi.Struct { + external ffi.Pointer field0; +} + +final class wire_cst_BdkError_InvalidTransaction extends ffi.Struct { + external ffi.Pointer field0; +} + +final class BdkErrorKind extends ffi.Union { + external wire_cst_BdkError_Hex Hex; + + external wire_cst_BdkError_Consensus Consensus; + + external wire_cst_BdkError_VerifyTransaction VerifyTransaction; + + external wire_cst_BdkError_Address Address; + + external wire_cst_BdkError_Descriptor Descriptor; + + external wire_cst_BdkError_InvalidU32Bytes InvalidU32Bytes; + + external wire_cst_BdkError_Generic Generic; + + external wire_cst_BdkError_OutputBelowDustLimit OutputBelowDustLimit; + + external wire_cst_BdkError_InsufficientFunds InsufficientFunds; + + external wire_cst_BdkError_FeeRateTooLow FeeRateTooLow; + + external wire_cst_BdkError_FeeTooLow FeeTooLow; + + external wire_cst_BdkError_MissingKeyOrigin MissingKeyOrigin; + + external wire_cst_BdkError_Key Key; + + external wire_cst_BdkError_SpendingPolicyRequired SpendingPolicyRequired; + + external wire_cst_BdkError_InvalidPolicyPathError InvalidPolicyPathError; + + external wire_cst_BdkError_Signer Signer; + + external wire_cst_BdkError_InvalidNetwork InvalidNetwork; + + external wire_cst_BdkError_InvalidOutpoint InvalidOutpoint; + + external wire_cst_BdkError_Encode Encode; + + external wire_cst_BdkError_Miniscript Miniscript; + + external wire_cst_BdkError_MiniscriptPsbt MiniscriptPsbt; + + external wire_cst_BdkError_Bip32 Bip32; + + external wire_cst_BdkError_Bip39 Bip39; + + external wire_cst_BdkError_Secp256k1 Secp256k1; + + external wire_cst_BdkError_Json Json; + + external wire_cst_BdkError_Psbt Psbt; + + external wire_cst_BdkError_PsbtParse PsbtParse; + + external wire_cst_BdkError_MissingCachedScripts MissingCachedScripts; + + external wire_cst_BdkError_Electrum Electrum; + + external wire_cst_BdkError_Esplora Esplora; + + external wire_cst_BdkError_Sled Sled; + + external wire_cst_BdkError_Rpc Rpc; + + external wire_cst_BdkError_Rusqlite Rusqlite; + + external wire_cst_BdkError_InvalidInput InvalidInput; + + external wire_cst_BdkError_InvalidLockTime InvalidLockTime; + + external wire_cst_BdkError_InvalidTransaction InvalidTransaction; +} + +final class wire_cst_bdk_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external BdkErrorKind kind; +} + +final class wire_cst_Payload_PubkeyHash extends ffi.Struct { + external ffi.Pointer pubkey_hash; +} + +final class wire_cst_Payload_ScriptHash extends ffi.Struct { + external ffi.Pointer script_hash; +} + +final class wire_cst_Payload_WitnessProgram extends ffi.Struct { + @ffi.Int32() + external int version; + + external ffi.Pointer program; +} + +final class PayloadKind extends ffi.Union { + external wire_cst_Payload_PubkeyHash PubkeyHash; + + external wire_cst_Payload_ScriptHash ScriptHash; + + external wire_cst_Payload_WitnessProgram WitnessProgram; +} + +final class wire_cst_payload extends ffi.Struct { + @ffi.Int32() + external int tag; + + external PayloadKind kind; +} + +final class wire_cst_record_bdk_address_u_32 extends ffi.Struct { + external wire_cst_bdk_address field0; + + @ffi.Uint32() + external int field1; +} + +final class wire_cst_record_bdk_psbt_transaction_details extends ffi.Struct { + external wire_cst_bdk_psbt field0; + + external wire_cst_transaction_details field1; +} + +final class wire_cst_Satisfaction_Partial extends ffi.Struct { + @ffi.Uint64() + external int n; + + @ffi.Uint64() + external int m; + + external ffi.Pointer items; + + external ffi.Pointer sorted; + + external ffi.Pointer conditions; +} + +final class wire_cst_Satisfaction_PartialComplete extends ffi.Struct { + @ffi.Uint64() + external int n; + + @ffi.Uint64() + external int m; + + external ffi.Pointer items; + + external ffi.Pointer sorted; + + external ffi + .Pointer + conditions; +} + +final class wire_cst_Satisfaction_Complete extends ffi.Struct { + external ffi.Pointer condition; +} + +final class wire_cst_Satisfaction_None extends ffi.Struct { + external ffi.Pointer msg; +} + +final class SatisfactionKind extends ffi.Union { + external wire_cst_Satisfaction_Partial Partial; + + external wire_cst_Satisfaction_PartialComplete PartialComplete; + + external wire_cst_Satisfaction_Complete Complete; + + external wire_cst_Satisfaction_None None; +} + +final class wire_cst_satisfaction extends ffi.Struct { + @ffi.Int32() + external int tag; + + external SatisfactionKind kind; +} + +final class wire_cst_SatisfiableItem_EcdsaSignature extends ffi.Struct { + external ffi.Pointer key; +} + +final class wire_cst_SatisfiableItem_SchnorrSignature extends ffi.Struct { + external ffi.Pointer key; +} + +final class wire_cst_SatisfiableItem_Sha256Preimage extends ffi.Struct { + external ffi.Pointer hash; +} + +final class wire_cst_SatisfiableItem_Hash256Preimage extends ffi.Struct { + external ffi.Pointer hash; +} + +final class wire_cst_SatisfiableItem_Ripemd160Preimage extends ffi.Struct { + external ffi.Pointer hash; +} + +final class wire_cst_SatisfiableItem_Hash160Preimage extends ffi.Struct { + external ffi.Pointer hash; +} + +final class wire_cst_SatisfiableItem_AbsoluteTimelock extends ffi.Struct { + external ffi.Pointer value; +} + +final class wire_cst_SatisfiableItem_RelativeTimelock extends ffi.Struct { + @ffi.Uint32() + external int value; +} + +final class wire_cst_SatisfiableItem_Multisig extends ffi.Struct { + external ffi.Pointer keys; + + @ffi.Uint64() + external int threshold; +} + +final class wire_cst_SatisfiableItem_Thresh extends ffi.Struct { + external ffi.Pointer items; + + @ffi.Uint64() + external int threshold; +} + +final class SatisfiableItemKind extends ffi.Union { + external wire_cst_SatisfiableItem_EcdsaSignature EcdsaSignature; + + external wire_cst_SatisfiableItem_SchnorrSignature SchnorrSignature; + + external wire_cst_SatisfiableItem_Sha256Preimage Sha256Preimage; + + external wire_cst_SatisfiableItem_Hash256Preimage Hash256Preimage; + + external wire_cst_SatisfiableItem_Ripemd160Preimage Ripemd160Preimage; + + external wire_cst_SatisfiableItem_Hash160Preimage Hash160Preimage; + + external wire_cst_SatisfiableItem_AbsoluteTimelock AbsoluteTimelock; + + external wire_cst_SatisfiableItem_RelativeTimelock RelativeTimelock; + + external wire_cst_SatisfiableItem_Multisig Multisig; + + external wire_cst_SatisfiableItem_Thresh Thresh; +} + +final class wire_cst_satisfiable_item extends ffi.Struct { + @ffi.Int32() + external int tag; + + external SatisfiableItemKind kind; +} diff --git a/lib/src/generated/lib.dart b/lib/src/generated/lib.dart new file mode 100644 index 00000000..5e7aab92 --- /dev/null +++ b/lib/src/generated/lib.dart @@ -0,0 +1,55 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'package:collection/collection.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +// Rust type: RustOpaqueNom +abstract class Address implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom +abstract class DerivationPath implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom +abstract class AnyBlockchain implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom +abstract class ExtendedDescriptor implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom +abstract class Policy implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom +abstract class DescriptorPublicKey implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom +abstract class DescriptorSecretKey implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom +abstract class KeyMap implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom +abstract class Mnemonic implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom >> +abstract class MutexWalletAnyDatabase implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom> +abstract class MutexPartiallySignedTransaction implements RustOpaqueInterface {} + +class U8Array4 extends NonGrowableListView { + static const arraySize = 4; + + @internal + Uint8List get inner => _inner; + final Uint8List _inner; + + U8Array4(this._inner) + : assert(_inner.length == arraySize), + super(_inner); + + U8Array4.init() : this(Uint8List(arraySize)); +} diff --git a/lib/src/root.dart b/lib/src/root.dart new file mode 100644 index 00000000..fe73e4f0 --- /dev/null +++ b/lib/src/root.dart @@ -0,0 +1,1369 @@ +import 'dart:typed_data'; +import 'package:bdk_flutter/src/utils/utils.dart'; + +import 'generated/api/blockchain.dart'; +import 'generated/api/descriptor.dart'; +import 'generated/api/error.dart'; +import 'generated/api/key.dart'; +import 'generated/api/psbt.dart'; +import 'generated/api/types.dart' as types; +import 'generated/api/wallet.dart'; + +///A Bitcoin address. +class Address extends types.BdkAddress { + Address._({required super.ptr}); + + /// [Address] constructor + static Future
fromScript( + {required ScriptBuf script, required types.Network network}) async { + try { + await Api.initialize(); + final res = + await types.BdkAddress.fromScript(script: script, network: network); + return Address._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// [Address] constructor + static Future
fromString( + {required String s, required types.Network network}) async { + try { + await Api.initialize(); + final res = + await types.BdkAddress.fromString(address: s, network: network); + return Address._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Generates a script pubkey spending to this address + ScriptBuf scriptPubkey() { + try { + return ScriptBuf(bytes: types.BdkAddress.script(ptr: this).bytes); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + //Creates a URI string bitcoin:address optimized to be encoded in QR codes. + /// If the address is bech32, both the schema and the address become uppercase. If the address is base58, the schema is lowercase and the address is left mixed case. + /// Quoting BIP 173 "inside QR codes uppercase SHOULD be used, as those permit the use of alphanumeric mode, which is 45% more compact than the normal byte mode." + /// Note however that despite BIP21 explicitly stating that the bitcoin: prefix should be parsed as case-insensitive many wallets got this wrong and don't parse correctly. See compatibility table. + /// If you want to avoid allocation you can use alternate display instead: + @override + String toQrUri() { + try { + return super.toQrUri(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Parsed addresses do not always have one network. The problem is that legacy testnet, regtest and signet addresses use the same prefix instead of multiple different ones. + ///When parsing, such addresses are always assumed to be testnet addresses (the same is true for bech32 signet addresses). + ///So if one wants to check if an address belongs to a certain network a simple comparison is not enough anymore. Instead this function can be used. + @override + bool isValidForNetwork({required types.Network network}) { + try { + return super.isValidForNetwork(network: network); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///The network on which this address is usable. + @override + types.Network network() { + try { + return super.network(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///The type of the address. + @override + types.Payload payload() { + try { + return super.payload(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + @override + String toString() { + return super.asString(); + } +} + +/// Blockchain backends module provides the implementation of a few commonly-used backends like Electrum, and Esplora. +class Blockchain extends BdkBlockchain { + Blockchain._({required super.ptr}); + + /// [Blockchain] constructor + + static Future create({required BlockchainConfig config}) async { + try { + await Api.initialize(); + final res = await BdkBlockchain.create(blockchainConfig: config); + return Blockchain._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// [Blockchain] constructor for creating `Esplora` blockchain in `Mutinynet` + /// Esplora url: https://mutinynet.com/api/ + static Future createMutinynet({ + int stopGap = 20, + }) async { + final config = BlockchainConfig.esplora( + config: EsploraConfig( + baseUrl: 'https://mutinynet.com/api/', + stopGap: BigInt.from(stopGap), + ), + ); + return create(config: config); + } + + /// [Blockchain] constructor for creating `Esplora` blockchain in `Testnet` + /// Esplora url: https://testnet.ltbl.io/api + static Future createTestnet({ + int stopGap = 20, + }) async { + final config = BlockchainConfig.esplora( + config: EsploraConfig( + baseUrl: 'https://testnet.ltbl.io/api', + stopGap: BigInt.from(stopGap), + ), + ); + return create(config: config); + } + + ///Estimate the fee rate required to confirm a transaction in a given target of blocks + @override + Future estimateFee({required BigInt target, hint}) async { + try { + return super.estimateFee(target: target); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///The function for broadcasting a transaction + Future broadcast({required Transaction transaction, hint}) async { + try { + return BdkBlockchain.broadcast(ptr: this, transaction: transaction); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///The function for getting block hash by block height + @override + Future getBlockHash({required int height, hint}) async { + try { + return super.getBlockHash(height: height); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///The function for getting the current height of the blockchain. + @override + Future getHeight({hint}) { + try { + return super.getHeight(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } +} + +/// The BumpFeeTxBuilder is used to bump the fee on a transaction that has been broadcast and has its RBF flag set to true. +class BumpFeeTxBuilder { + int? _nSequence; + Address? _allowShrinking; + bool _enableRbf = false; + final String txid; + final double feeRate; + + BumpFeeTxBuilder({required this.txid, required this.feeRate}); + + ///Explicitly tells the wallet that it is allowed to reduce the amount of the output matching this `address` in order to bump the transaction fee. Without specifying this the wallet will attempt to find a change output to shrink instead. + /// + /// Note that the output may shrink to below the dust limit and therefore be removed. If it is preserved then it is currently not guaranteed to be in the same position as it was originally. + /// + /// Throws and exception if address can’t be found among the recipients of the transaction we are bumping. + BumpFeeTxBuilder allowShrinking(Address address) { + _allowShrinking = address; + return this; + } + + ///Enable signaling RBF + /// + /// This will use the default nSequence value of `0xFFFFFFFD` + BumpFeeTxBuilder enableRbf() { + _enableRbf = true; + return this; + } + + ///Enable signaling RBF with a specific nSequence value + /// + /// This can cause conflicts if the wallet’s descriptors contain an “older†(OP_CSV) operator and the given nsequence is lower than the CSV value. + /// + /// If the nsequence is higher than `0xFFFFFFFD` an error will be thrown, since it would not be a valid nSequence to signal RBF. + + BumpFeeTxBuilder enableRbfWithSequence(int nSequence) { + _nSequence = nSequence; + return this; + } + + /// Finish building the transaction. Returns the [PartiallySignedTransaction]& [TransactionDetails]. + Future<(PartiallySignedTransaction, TransactionDetails)> finish( + Wallet wallet) async { + try { + final res = await finishBumpFeeTxBuilder( + txid: txid.toString(), + enableRbf: _enableRbf, + feeRate: feeRate, + wallet: wallet, + nSequence: _nSequence, + allowShrinking: _allowShrinking); + return ( + PartiallySignedTransaction._(ptr: res.$1.ptr), + TransactionDetails( + transaction: (res.$2.transaction?.s == null) + ? null + : Transaction._(s: res.$2.transaction!.s), + txid: res.$2.txid, + received: res.$2.received, + sent: res.$2.sent, + confirmationTime: res.$2.confirmationTime) + ); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } +} + +///A `BIP-32` derivation path +class DerivationPath extends BdkDerivationPath { + DerivationPath._({required super.ptr}); + + /// [DerivationPath] constructor + static Future create({required String path}) async { + try { + await Api.initialize(); + final res = await BdkDerivationPath.fromString(path: path); + return DerivationPath._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + @override + String toString() { + return super.asString(); + } +} + +///Script descriptor +class Descriptor extends BdkDescriptor { + Descriptor._({required super.extendedDescriptor, required super.keyMap}); + + /// [Descriptor] constructor + static Future create( + {required String descriptor, required types.Network network}) async { + try { + await Api.initialize(); + final res = await BdkDescriptor.newInstance( + descriptor: descriptor, network: network); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///BIP44 template. Expands to pkh(key/44'/{0,1}'/0'/{0,1}/*) + /// + /// Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). + static Future newBip44( + {required DescriptorSecretKey secretKey, + required types.Network network, + required types.KeychainKind keychain}) async { + try { + await Api.initialize(); + final res = await BdkDescriptor.newBip44( + secretKey: secretKey, network: network, keychainKind: keychain); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///BIP44 public template. Expands to pkh(key/{0,1}/*) + /// + /// This assumes that the key used has already been derived with m/44'/0'/0' for Mainnet or m/44'/1'/0' for Testnet. + /// + /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs. + static Future newBip44Public( + {required DescriptorPublicKey publicKey, + required String fingerPrint, + required types.Network network, + required types.KeychainKind keychain}) async { + try { + await Api.initialize(); + final res = await BdkDescriptor.newBip44Public( + network: network, + keychainKind: keychain, + publicKey: publicKey, + fingerprint: fingerPrint); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///BIP49 template. Expands to sh(wpkh(key/49'/{0,1}'/0'/{0,1}/*)) + /// + ///Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). + static Future newBip49( + {required DescriptorSecretKey secretKey, + required types.Network network, + required types.KeychainKind keychain}) async { + try { + await Api.initialize(); + final res = await BdkDescriptor.newBip49( + secretKey: secretKey, network: network, keychainKind: keychain); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///BIP49 public template. Expands to sh(wpkh(key/{0,1}/*)) + /// + /// This assumes that the key used has already been derived with m/49'/0'/0'. + /// + /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs. + static Future newBip49Public( + {required DescriptorPublicKey publicKey, + required String fingerPrint, + required types.Network network, + required types.KeychainKind keychain}) async { + try { + await Api.initialize(); + final res = await BdkDescriptor.newBip49Public( + network: network, + keychainKind: keychain, + publicKey: publicKey, + fingerprint: fingerPrint); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///BIP84 template. Expands to wpkh(key/84'/{0,1}'/0'/{0,1}/*) + /// + ///Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). + static Future newBip84( + {required DescriptorSecretKey secretKey, + required types.Network network, + required types.KeychainKind keychain}) async { + try { + await Api.initialize(); + final res = await BdkDescriptor.newBip84( + secretKey: secretKey, network: network, keychainKind: keychain); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///BIP84 public template. Expands to wpkh(key/{0,1}/*) + /// + /// This assumes that the key used has already been derived with m/84'/0'/0'. + /// + /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs. + static Future newBip84Public( + {required DescriptorPublicKey publicKey, + required String fingerPrint, + required types.Network network, + required types.KeychainKind keychain}) async { + try { + await Api.initialize(); + final res = await BdkDescriptor.newBip84Public( + network: network, + keychainKind: keychain, + publicKey: publicKey, + fingerprint: fingerPrint); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///BIP86 template. Expands to tr(key/86'/{0,1}'/0'/{0,1}/*) + /// + /// Since there are hardened derivation steps, this template requires a private derivable key (generally a xprv/tprv). + static Future newBip86( + {required DescriptorSecretKey secretKey, + required types.Network network, + required types.KeychainKind keychain}) async { + try { + await Api.initialize(); + final res = await BdkDescriptor.newBip86( + secretKey: secretKey, network: network, keychainKind: keychain); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///BIP86 public template. Expands to tr(key/{0,1}/*) + /// + /// This assumes that the key used has already been derived with m/86'/0'/0' for Mainnet or m/86'/1'/0' for Testnet. + /// + /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs. + static Future newBip86Public( + {required DescriptorPublicKey publicKey, + required String fingerPrint, + required types.Network network, + required types.KeychainKind keychain}) async { + try { + await Api.initialize(); + final res = await BdkDescriptor.newBip86Public( + network: network, + keychainKind: keychain, + publicKey: publicKey, + fingerprint: fingerPrint); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Return the public version of the output descriptor. + @override + String toString() { + return super.asString(); + } + + ///Return the private version of the output descriptor if available, otherwise return the public version. + @override + String toStringPrivate({hint}) { + try { + return super.toStringPrivate(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Computes an upper bound on the difference between a non-satisfied TxIn's segwit_weight and a satisfied TxIn's segwit_weight + @override + BigInt maxSatisfactionWeight({hint}) { + try { + return super.maxSatisfactionWeight(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } +} + +///An extended public key. +class DescriptorPublicKey extends BdkDescriptorPublicKey { + DescriptorPublicKey._({required super.ptr}); + + /// [DescriptorPublicKey] constructor + static Future fromString(String publicKey) async { + try { + await Api.initialize(); + final res = await BdkDescriptorPublicKey.fromString(publicKey: publicKey); + return DescriptorPublicKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Get the public key as string. + @override + String toString() { + return super.asString(); + } + + ///Derive a public descriptor at a given path. + Future derive( + {required DerivationPath path, hint}) async { + try { + final res = await BdkDescriptorPublicKey.derive(ptr: this, path: path); + return DescriptorPublicKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Extend the public descriptor with a custom path. + Future extend( + {required DerivationPath path, hint}) async { + try { + final res = await BdkDescriptorPublicKey.extend(ptr: this, path: path); + return DescriptorPublicKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } +} + +///Script descriptor +class DescriptorSecretKey extends BdkDescriptorSecretKey { + DescriptorSecretKey._({required super.ptr}); + + /// [DescriptorSecretKey] constructor + static Future fromString(String secretKey) async { + try { + await Api.initialize(); + final res = await BdkDescriptorSecretKey.fromString(secretKey: secretKey); + return DescriptorSecretKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// [DescriptorSecretKey] constructor + static Future create( + {required types.Network network, + required Mnemonic mnemonic, + String? password}) async { + try { + await Api.initialize(); + final res = await BdkDescriptorSecretKey.create( + network: network, mnemonic: mnemonic, password: password); + return DescriptorSecretKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Derived the XPrv using the derivation path + Future derive(DerivationPath path) async { + try { + final res = await BdkDescriptorSecretKey.derive(ptr: this, path: path); + return DescriptorSecretKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Extends the XPrv using the derivation path + Future extend(DerivationPath path) async { + try { + final res = await BdkDescriptorSecretKey.extend(ptr: this, path: path); + return DescriptorSecretKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Returns the public version of this key. + DescriptorPublicKey toPublic() { + try { + final res = BdkDescriptorSecretKey.asPublic(ptr: this); + return DescriptorPublicKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Get the private key as string. + @override + String toString() { + return super.asString(); + } + + ///Get the private key as bytes. + @override + Uint8List secretBytes({hint}) { + try { + return super.secretBytes(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } +} + +///Mnemonic phrases are a human-readable version of the private keys. Supported number of words are 12, 18, and 24. +class Mnemonic extends BdkMnemonic { + Mnemonic._({required super.ptr}); + + /// Generates [Mnemonic] with given [WordCount] + /// + /// [Mnemonic] constructor + static Future create(types.WordCount wordCount) async { + try { + await Api.initialize(); + final res = await BdkMnemonic.newInstance(wordCount: wordCount); + return Mnemonic._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Create a new [Mnemonic] in the specified language from the given entropy. + /// Entropy must be a multiple of 32 bits (4 bytes) and 128-256 bits in length. + /// + /// [Mnemonic] constructor + static Future fromEntropy(List entropy) async { + try { + await Api.initialize(); + final res = await BdkMnemonic.fromEntropy(entropy: entropy); + return Mnemonic._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Parse a [Mnemonic] with given string + /// + /// [Mnemonic] constructor + static Future fromString(String mnemonic) async { + try { + await Api.initialize(); + final res = await BdkMnemonic.fromString(mnemonic: mnemonic); + return Mnemonic._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Returns Mnemonic as string + @override + String toString() { + return super.asString(); + } +} + +///A Partially Signed Transaction +class PartiallySignedTransaction extends BdkPsbt { + PartiallySignedTransaction._({required super.ptr}); + + /// Parse a [PartiallySignedTransaction] with given Base64 string + /// + /// [PartiallySignedTransaction] constructor + static Future fromString( + String psbtBase64) async { + try { + await Api.initialize(); + final res = await BdkPsbt.fromStr(psbtBase64: psbtBase64); + return PartiallySignedTransaction._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Return fee amount + @override + BigInt? feeAmount({hint}) { + try { + return super.feeAmount(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Return fee rate + @override + types.FeeRate? feeRate({hint}) { + try { + return super.feeRate(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + @override + String jsonSerialize({hint}) { + try { + return super.jsonSerialize(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + @override + String toString() { + return super.asString(); + } + + ///Serialize as raw binary data + @override + Uint8List serialize({hint}) { + try { + return super.serialize(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Return the transaction as bytes. + Transaction extractTx() { + try { + final res = BdkPsbt.extractTx(ptr: this); + return Transaction._(s: res.s); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Combines this [PartiallySignedTransaction] with other PSBT as described by BIP 174. + Future combine( + PartiallySignedTransaction other) async { + try { + final res = await BdkPsbt.combine(ptr: this, other: other); + return PartiallySignedTransaction._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Returns the [PartiallySignedTransaction]'s transaction id + @override + String txid({hint}) { + try { + return super.txid(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } +} + +class Policy extends types.BdkPolicy { + Policy._({required super.ptr}); + + ///Identifier for this policy node + @override + String id() { + return super.id(); + } + + @override + String toString() { + try { + return super.asString(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Return whether or not a specific path in the policy tree is required to unambiguously create a transaction + + ///What this means is that for some spending policies the user should select which paths in the tree it intends to satisfy while signing, because the transaction must be created differently based on that. + @override + bool requiresPath() { + return super.requiresPath(); + } + + ///Type of this policy node + @override + types.SatisfiableItem item() { + return super.item().when( + ecdsaSignature: (e) => types.SatisfiableItem.ecdsaSignature(key: e), + schnorrSignature: (e) => types.SatisfiableItem.ecdsaSignature(key: e), + sha256Preimage: (e) => types.SatisfiableItem.sha256Preimage(hash: e), + hash256Preimage: (e) => + types.SatisfiableItem.hash256Preimage(hash: e), + ripemd160Preimage: (e) => + types.SatisfiableItem.ripemd160Preimage(hash: e), + hash160Preimage: (e) => + types.SatisfiableItem.hash160Preimage(hash: e), + absoluteTimelock: (e) => + types.SatisfiableItem.absoluteTimelock(value: e), + relativeTimelock: (e) => + types.SatisfiableItem.relativeTimelock(value: e), + multisig: (e, f) => + types.SatisfiableItem.multisig(keys: e, threshold: f), + thresh: (e, f) => types.SatisfiableItem.thresh( + items: e.map((e) => Policy._(ptr: e.ptr)).toList(), threshold: f), + ); + } + + ///How much a given PSBT already satisfies this policy node in terms of signatures + @override + types.Satisfaction satisfaction() { + return super.satisfaction(); + } + + ///How the wallet's descriptor can satisfy this policy node + @override + types.Satisfaction contribution() { + return super.contribution(); + } +} + +///Bitcoin script. +class ScriptBuf extends types.BdkScriptBuf { + /// [ScriptBuf] constructor + ScriptBuf({required super.bytes}); + + ///Creates a new empty script. + static Future empty() async { + try { + await Api.initialize(); + return ScriptBuf(bytes: types.BdkScriptBuf.empty().bytes); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Creates a new empty script with pre-allocated capacity. + static Future withCapacity(BigInt capacity) async { + try { + await Api.initialize(); + final res = await types.BdkScriptBuf.withCapacity(capacity: capacity); + return ScriptBuf(bytes: res.bytes); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Creates a ScriptBuf from a hex string. + static Future fromHex(String s) async { + try { + await Api.initialize(); + final res = await types.BdkScriptBuf.fromHex(s: s); + return ScriptBuf(bytes: res.bytes); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + @override + String toString() { + return super.asString(); + } +} + +///A bitcoin transaction. +class Transaction extends types.BdkTransaction { + Transaction._({required super.s}); + + /// [Transaction] constructor + /// Decode an object with a well-defined format. + // This is the method that should be implemented for a typical, fixed sized type implementing this trait. + static Future fromBytes({ + required List transactionBytes, + }) async { + try { + await Api.initialize(); + final res = await types.BdkTransaction.fromBytes( + transactionBytes: transactionBytes); + return Transaction._(s: res.s); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + @override + String toString() { + return s; + } +} + +///A transaction builder +/// +/// A TxBuilder is created by calling TxBuilder or BumpFeeTxBuilder on a wallet. +/// After assigning it, you set options on it until finally calling finish to consume the builder and generate the transaction. +class TxBuilder { + final List _recipients = []; + final List _utxos = []; + final List _unSpendable = []; + (types.OutPoint, types.Input, BigInt)? _foreignUtxo; + bool _manuallySelectedOnly = false; + double? _feeRate; + types.ChangeSpendPolicy _changeSpendPolicy = + types.ChangeSpendPolicy.changeAllowed; + BigInt? _feeAbsolute; + bool _drainWallet = false; + ScriptBuf? _drainTo; + types.RbfValue? _rbfValue; + List _data = []; + Map? _internalPolicyPath; + Map? _externalPolicyPath; + + ///Add data as an output, using OP_RETURN + TxBuilder addData({required List data}) { + _data = data; + return this; + } + + ///Add a recipient to the internal list + TxBuilder addRecipient(ScriptBuf script, BigInt amount) { + _recipients.add(types.ScriptAmount(script: script, amount: amount)); + return this; + } + + ///Add a utxo to the internal list of unspendable utxos + /// + /// It's important to note that the "must-be-spent" utxos added with TxBuilder().addUtxo have priority over this. + /// See the docs of the two linked methods for more details. + TxBuilder unSpendable(List outpoints) { + for (var e in outpoints) { + _unSpendable.add(e); + } + return this; + } + + ///Add a utxo to the internal list of utxos that must be spent + /// + /// These have priority over the "unspendable" utxos, meaning that if a utxo is present both in the "utxos" and the "unspendable" list, it will be spent. + TxBuilder addUtxo(types.OutPoint outpoint) { + _utxos.add(outpoint); + return this; + } + + ///Add the list of outpoints to the internal list of UTXOs that must be spent. + /// + ///If an error occurs while adding any of the UTXOs then none of them are added and the error is returned. + /// + /// These have priority over the "unspendable" utxos, meaning that if a utxo is present both in the "utxos" and the "unspendable" list, it will be spent. + TxBuilder addUtxos(List outpoints) { + for (var e in outpoints) { + _utxos.add(e); + } + return this; + } + + ///Add a foreign UTXO i.e. a UTXO not owned by this wallet. + ///At a minimum to add a foreign UTXO we need: + /// + /// outpoint: To add it to the raw transaction. + /// psbt_input: To know the value. + /// satisfaction_weight: To know how much weight/vbytes the input will add to the transaction for fee calculation. + /// There are several security concerns about adding foreign UTXOs that application developers should consider. First, how do you know the value of the input is correct? If a non_witness_utxo is provided in the psbt_input then this method implicitly verifies the value by checking it against the transaction. If only a witness_utxo is provided then this method doesn't verify the value but just takes it as a given – it is up to you to check that whoever sent you the input_psbt was not lying! + /// + /// Secondly, you must somehow provide satisfaction_weight of the input. Depending on your application it may be important that this be known precisely.If not, + /// a malicious counterparty may fool you into putting in a value that is too low, giving the transaction a lower than expected feerate. They could also fool + /// you into putting a value that is too high causing you to pay a fee that is too high. The party who is broadcasting the transaction can of course check the + /// real input weight matches the expected weight prior to broadcasting. + TxBuilder addForeignUtxo(types.Input psbtInput, types.OutPoint outPoint, + BigInt satisfactionWeight) { + _foreignUtxo = (outPoint, psbtInput, satisfactionWeight); + return this; + } + + ///Do not spend change outputs + /// + /// This effectively adds all the change outputs to the "unspendable" list. See TxBuilder().addUtxos + TxBuilder doNotSpendChange() { + _changeSpendPolicy = types.ChangeSpendPolicy.changeForbidden; + return this; + } + + ///Spend all the available inputs. This respects filters like TxBuilder().unSpendable and the change policy. + TxBuilder drainWallet() { + _drainWallet = true; + return this; + } + + ///Sets the address to drain excess coins to. + /// + /// Usually, when there are excess coins they are sent to a change address generated by the wallet. + /// This option replaces the usual change address with an arbitrary scriptPubkey of your choosing. + /// Just as with a change output, if the drain output is not needed (the excess coins are too small) it will not be included in the resulting transaction. T + /// he only difference is that it is valid to use drainTo without setting any ordinary recipients with add_recipient (but it is perfectly fine to add recipients as well). + /// + /// If you choose not to set any recipients, you should either provide the utxos that the transaction should spend via add_utxos, or set drainWallet to spend all of them. + /// + /// When bumping the fees of a transaction made with this option, you probably want to use allowShrinking to allow this output to be reduced to pay for the extra fees. + TxBuilder drainTo(ScriptBuf script) { + _drainTo = script; + return this; + } + + ///Enable signaling RBF with a specific nSequence value + /// + /// This can cause conflicts if the wallet's descriptors contain an "older" (OP_CSV) operator and the given nsequence is lower than the CSV value. + /// + ///If the nsequence is higher than 0xFFFFFFFD an error will be thrown, since it would not be a valid nSequence to signal RBF. + TxBuilder enableRbfWithSequence(int nSequence) { + _rbfValue = types.RbfValue.value(nSequence); + return this; + } + + ///Enable signaling RBF + /// + /// This will use the default nSequence value of 0xFFFFFFFD. + TxBuilder enableRbf() { + _rbfValue = types.RbfValue.rbfDefault(); + return this; + } + + ///Set an absolute fee + TxBuilder feeAbsolute(BigInt feeAmount) { + _feeAbsolute = feeAmount; + return this; + } + + ///Set a custom fee rate + TxBuilder feeRate(double satPerVbyte) { + _feeRate = satPerVbyte; + return this; + } + + ///Replace the recipients already added with a new list + TxBuilder setRecipients(List<(ScriptBuf script, BigInt amount)> recipients) { + for (var (s, a) in recipients) { + _recipients.add(types.ScriptAmount(amount: a, script: s)); + } + return this; + } + + ///Only spend utxos added by add_utxo. + /// + /// The wallet will not add additional utxos to the transaction even if they are needed to make the transaction valid. + TxBuilder manuallySelectedOnly() { + _manuallySelectedOnly = true; + return this; + } + + ///Add a utxo to the internal list of unspendable utxos + /// + /// It's important to note that the "must-be-spent" utxos added with TxBuilder().addUtxo + /// have priority over this. See the docs of the two linked methods for more details. + TxBuilder addUnSpendable(types.OutPoint unSpendable) { + _unSpendable.add(unSpendable); + return this; + } + + ///Set the policy path to use while creating the transaction for a given keychain. + ///This method accepts a map where the key is the policy node id (see policy.id()) and the value is the list of the indexes of the items that are intended to be satisfied from the policy node (see SatisfiableItem.Thresh.items). + TxBuilder policyPath( + types.KeychainKind keychain, Map path) { + switch (keychain) { + case types.KeychainKind.externalChain: + _externalPolicyPath = path; + break; + case types.KeychainKind.internalChain: + _internalPolicyPath = path; + break; + } + return this; + } + + ///Only spend change outputs + /// + /// This effectively adds all the non-change outputs to the "unspendable" list. + TxBuilder onlySpendChange() { + _changeSpendPolicy = types.ChangeSpendPolicy.onlyChange; + return this; + } + + ///Finish building the transaction. + /// + /// Returns a [PartiallySignedTransaction] & [TransactionDetails] + + Future<(PartiallySignedTransaction, TransactionDetails)> finish( + Wallet wallet) async { + if (_recipients.isEmpty && _drainTo == null) { + throw NoRecipientsException(); + } + try { + final res = await txBuilderFinish( + wallet: wallet, + recipients: _recipients, + utxos: _utxos, + foreignUtxo: _foreignUtxo, + unSpendable: _unSpendable, + manuallySelectedOnly: _manuallySelectedOnly, + drainWallet: _drainWallet, + externalPolicyPath: _externalPolicyPath, + internalPolicyPath: _internalPolicyPath, + rbf: _rbfValue, + drainTo: _drainTo, + feeAbsolute: _feeAbsolute, + feeRate: _feeRate, + data: _data, + changePolicy: _changeSpendPolicy); + + return ( + PartiallySignedTransaction._(ptr: res.$1.ptr), + TransactionDetails( + transaction: (res.$2.transaction?.s == null) + ? null + : Transaction._(s: res.$2.transaction!.s), + txid: res.$2.txid, + received: res.$2.received, + sent: res.$2.sent, + confirmationTime: res.$2.confirmationTime) + ); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } +} + +/// The Wallet acts as a way of coherently interfacing with output descriptors and related transactions. Its main components are: +/// +/// 1. Output descriptors from which it can derive addresses. +/// 2. A Database where it tracks transactions and utxos related to the descriptors. +/// 3. Signers that can contribute signatures to addresses instantiated from the descriptors. +class Wallet extends BdkWallet { + Wallet._({required super.ptr}); + + /// [Wallet] constructor + + ///Create a wallet. + // The only way this can fail is if the descriptors passed in do not match the checksums in database. + static Future create({ + required Descriptor descriptor, + Descriptor? changeDescriptor, + required types.Network network, + required types.DatabaseConfig databaseConfig, + }) async { + try { + await Api.initialize(); + final res = await BdkWallet.newInstance( + descriptor: descriptor, + changeDescriptor: changeDescriptor, + network: network, + databaseConfig: databaseConfig, + ); + return Wallet._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Return a derived address using the external descriptor, see AddressIndex for available address index selection + /// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) + /// then the same address will always be returned for any AddressIndex. + AddressInfo getAddress({required types.AddressIndex addressIndex, hint}) { + try { + final res = BdkWallet.getAddress(ptr: this, addressIndex: addressIndex); + return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates + /// on the internal database, which first needs to be Wallet.sync manually. + @override + types.Balance getBalance({hint}) { + try { + return super.getBalance(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Returns the descriptor used to create addresses for a particular keychain. + Future getDescriptorForKeychain( + {required types.KeychainKind keychain, hint}) async { + try { + final res = + BdkWallet.getDescriptorForKeychain(ptr: this, keychain: keychain); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Return a derived address using the internal (change) descriptor. + /// + /// If the wallet doesn't have an internal descriptor it will use the external descriptor. + /// + /// see [AddressIndex] for available address index selection strategies. If none of the keys + /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always + /// be returned for any [AddressIndex]. + + AddressInfo getInternalAddress( + {required types.AddressIndex addressIndex, hint}) { + try { + final res = + BdkWallet.getInternalAddress(ptr: this, addressIndex: addressIndex); + return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///get the corresponding PSBT Input for a LocalUtxo + @override + Future getPsbtInput( + {required types.LocalUtxo utxo, + required bool onlyWitnessUtxo, + types.PsbtSigHashType? sighashType, + hint}) async { + try { + return super.getPsbtInput( + utxo: utxo, + onlyWitnessUtxo: onlyWitnessUtxo, + sighashType: sighashType); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Return whether or not a script is part of this wallet (either internal or external). + bool isMine({required ScriptBuf script}) { + try { + return BdkWallet.isMine(ptr: this, script: script); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. + @override + List listTransactions({required bool includeRaw, hint}) { + try { + return super + .listTransactions(includeRaw: includeRaw) + .map((e) => TransactionDetails( + transaction: (e.transaction?.s == null) + ? null + : Transaction._(s: e.transaction!.s), + txid: e.txid, + received: e.received, + sent: e.sent, + confirmationTime: e.confirmationTime)) + .toList(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Return the list of unspent outputs of this wallet. Note that this method only operates on the internal database, + /// which first needs to be Wallet.sync manually. + /// TODO; Update; create custom LocalUtxo + @override + List listUnspent({hint}) { + try { + return super.listUnspent(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Get the Bitcoin network the wallet is using. + @override + types.Network network({hint}) { + try { + return super.network(); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Sign a transaction with all the wallet's signers. This function returns an encapsulated bool that + /// has the value true if the PSBT was finalized, or false otherwise. + /// + /// The [SignOptions] can be used to tweak the behavior of the software signers, and the way + /// the transaction is finalized at the end. Note that it can't be guaranteed that *every* + /// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined + /// in this library will. + Future sign( + {required PartiallySignedTransaction psbt, + types.SignOptions? signOptions, + hint}) async { + try { + final res = + await BdkWallet.sign(ptr: this, psbt: psbt, signOptions: signOptions); + return res; + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Sync the internal database with the blockchain. + + Future sync({required Blockchain blockchain, hint}) async { + try { + final res = await BdkWallet.sync(ptr: this, blockchain: blockchain); + return res; + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + ///Return the spending policies for the wallet's descriptor + Policy? policies(types.KeychainKind keychain) { + try { + final res = BdkWallet.policies(ptr: this, keychain: keychain); + if (res == null) return null; + return Policy._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapBdkError(e); + } + } + + /// Verify a transaction against the consensus rules + /// + /// This function uses `bitcoinconsensus` to verify transactions by fetching the required data + /// from the Wallet Database or using the [`Blockchain`]. + /// + /// Depending on the capabilities of the + /// [Blockchain] backend, the method could fail when called with old "historical" transactions or + /// with unconfirmed transactions that have been evicted from the backend's memory. + /// Make sure you sync the wallet to get the optimal results. + // Future verifyTx({required Transaction tx}) async { + // try { + // await BdkWallet.verifyTx(ptr: this, tx: tx); + // } on BdkError catch (e) { + // throw mapBdkError(e); + // } + // } +} + +///A derived address and the index it was found at For convenience this automatically derefs to Address +class AddressInfo { + ///Child index of this address + final int index; + + /// Address + final Address address; + + AddressInfo(this.index, this.address); +} + +class TxIn extends types.TxIn { + TxIn( + {required super.previousOutput, + required ScriptBuf scriptSig, + required super.sequence, + required super.witness}) + : super(scriptSig: scriptSig); +} + +///A transaction output, which defines new coins to be created from old ones. +class TxOut extends types.TxOut { + TxOut({required super.value, required ScriptBuf scriptPubkey}) + : super(scriptPubkey: scriptPubkey); +} + +class TransactionDetails extends types.TransactionDetails { + TransactionDetails( + {Transaction? transaction, + required super.txid, + required super.received, + required super.sent, + super.confirmationTime, + super.fee}) + : super(transaction: transaction); +} diff --git a/lib/src/utils/exceptions.dart b/lib/src/utils/exceptions.dart new file mode 100644 index 00000000..05ae163d --- /dev/null +++ b/lib/src/utils/exceptions.dart @@ -0,0 +1,459 @@ +import '../generated/api/error.dart'; + +abstract class BdkFfiException implements Exception { + String? message; + BdkFfiException({this.message}); + @override + String toString() => + (message != null) ? '$runtimeType( $message )' : runtimeType.toString(); +} + +/// Exception thrown when trying to add an invalid byte value, or empty list to txBuilder.addData +class InvalidByteException extends BdkFfiException { + /// Constructs the [InvalidByteException] + InvalidByteException({super.message}); +} + +/// Exception thrown when output created is under the dust limit, 546 sats +class OutputBelowDustLimitException extends BdkFfiException { + /// Constructs the [OutputBelowDustLimitException] + OutputBelowDustLimitException({super.message}); +} + +/// Exception thrown when a there is an error in Partially signed bitcoin transaction +class PsbtException extends BdkFfiException { + /// Constructs the [PsbtException] + PsbtException({super.message}); +} + +/// Exception thrown when a there is an error in Partially signed bitcoin transaction +class PsbtParseException extends BdkFfiException { + /// Constructs the [PsbtParseException] + PsbtParseException({super.message}); +} + +class GenericException extends BdkFfiException { + /// Constructs the [GenericException] + GenericException({super.message}); +} + +class Bip32Exception extends BdkFfiException { + /// Constructs the [Bip32Exception] + Bip32Exception({super.message}); +} + +/// Exception thrown when a tx is build without recipients +class NoRecipientsException extends BdkFfiException { + /// Constructs the [NoRecipientsException] + NoRecipientsException({super.message}); +} + +/// Exception thrown when trying to convert Bare and Public key script to address +class ScriptDoesntHaveAddressFormException extends BdkFfiException { + /// Constructs the [ScriptDoesntHaveAddressFormException] + ScriptDoesntHaveAddressFormException({super.message}); +} + +/// Exception thrown when manuallySelectedOnly() is called but no utxos has been passed +class NoUtxosSelectedException extends BdkFfiException { + /// Constructs the [NoUtxosSelectedException] + NoUtxosSelectedException({super.message}); +} + +/// Branch and bound coin selection possible attempts with sufficiently big UTXO set could grow exponentially, +/// thus a limit is set, and when hit, this exception is thrown +class BnBTotalTriesExceededException extends BdkFfiException { + /// Constructs the [BnBTotalTriesExceededException] + BnBTotalTriesExceededException({super.message}); +} + +///Branch and bound coin selection tries to avoid needing a change by finding the right inputs for the desired outputs plus fee, +/// if there is not such combination this exception is thrown +class BnBNoExactMatchException extends BdkFfiException { + /// Constructs the [BnBNoExactMatchException] + BnBNoExactMatchException({super.message}); +} + +///Exception thrown when trying to replace a tx that has a sequence >= 0xFFFFFFFE +class IrreplaceableTransactionException extends BdkFfiException { + /// Constructs the [IrreplaceableTransactionException] + IrreplaceableTransactionException({super.message}); +} + +///Exception thrown when the keys are invalid +class KeyException extends BdkFfiException { + /// Constructs the [KeyException] + KeyException({super.message}); +} + +///Exception thrown when spending policy is not compatible with this KeychainKind +class SpendingPolicyRequiredException extends BdkFfiException { + /// Constructs the [SpendingPolicyRequiredException] + SpendingPolicyRequiredException({super.message}); +} + +///Transaction verification Exception +class VerificationException extends BdkFfiException { + /// Constructs the [VerificationException] + VerificationException({super.message}); +} + +///Exception thrown when progress value is not between 0.0 (included) and 100.0 (included) +class InvalidProgressValueException extends BdkFfiException { + /// Constructs the [InvalidProgressValueException] + InvalidProgressValueException({super.message}); +} + +///Progress update error (maybe the channel has been closed) +class ProgressUpdateException extends BdkFfiException { + /// Constructs the [ProgressUpdateException] + ProgressUpdateException({super.message}); +} + +///Exception thrown when the requested outpoint doesn’t exist in the tx (vout greater than available outputs) +class InvalidOutpointException extends BdkFfiException { + /// Constructs the [InvalidOutpointException] + InvalidOutpointException({super.message}); +} + +class EncodeException extends BdkFfiException { + /// Constructs the [EncodeException] + EncodeException({super.message}); +} + +class MiniscriptPsbtException extends BdkFfiException { + /// Constructs the [MiniscriptPsbtException] + MiniscriptPsbtException({super.message}); +} + +class SignerException extends BdkFfiException { + /// Constructs the [SignerException] + SignerException({super.message}); +} + +///Exception thrown when there is an error while extracting and manipulating policies +class InvalidPolicyPathException extends BdkFfiException { + /// Constructs the [InvalidPolicyPathException] + InvalidPolicyPathException({super.message}); +} + +/// Exception thrown when extended key in the descriptor is neither be a master key itself (having depth = 0) or have an explicit origin provided +class MissingKeyOriginException extends BdkFfiException { + /// Constructs the [MissingKeyOriginException] + MissingKeyOriginException({super.message}); +} + +///Exception thrown when trying to spend an UTXO that is not in the internal database +class UnknownUtxoException extends BdkFfiException { + /// Constructs the [UnknownUtxoException] + UnknownUtxoException({super.message}); +} + +///Exception thrown when trying to bump a transaction that is already confirmed +class TransactionNotFoundException extends BdkFfiException { + /// Constructs the [TransactionNotFoundException] + TransactionNotFoundException({super.message}); +} + +///Exception thrown when node doesn’t have data to estimate a fee rate +class FeeRateUnavailableException extends BdkFfiException { + /// Constructs the [FeeRateUnavailableException] + FeeRateUnavailableException({super.message}); +} + +///Exception thrown when the descriptor checksum mismatch +class ChecksumMismatchException extends BdkFfiException { + /// Constructs the [ChecksumMismatchException] + ChecksumMismatchException({super.message}); +} + +///Exception thrown when sync attempt failed due to missing scripts in cache which are needed to satisfy stopGap. +class MissingCachedScriptsException extends BdkFfiException { + /// Constructs the [MissingCachedScriptsException] + MissingCachedScriptsException({super.message}); +} + +///Exception thrown when wallet’s UTXO set is not enough to cover recipient’s requested plus fee +class InsufficientFundsException extends BdkFfiException { + /// Constructs the [InsufficientFundsException] + InsufficientFundsException({super.message}); +} + +///Exception thrown when bumping a tx, the fee rate requested is lower than required +class FeeRateTooLowException extends BdkFfiException { + /// Constructs the [FeeRateTooLowException] + FeeRateTooLowException({super.message}); +} + +///Exception thrown when bumping a tx, the absolute fee requested is lower than replaced tx absolute fee +class FeeTooLowException extends BdkFfiException { + /// Constructs the [FeeTooLowException] + FeeTooLowException({super.message}); +} + +///Sled database error +class SledException extends BdkFfiException { + /// Constructs the [SledException] + SledException({super.message}); +} + +///Exception thrown when there is an error in parsing and usage of descriptors +class DescriptorException extends BdkFfiException { + /// Constructs the [DescriptorException] + DescriptorException({super.message}); +} + +///Miniscript exception +class MiniscriptException extends BdkFfiException { + /// Constructs the [MiniscriptException] + MiniscriptException({super.message}); +} + +///Esplora Client exception +class EsploraException extends BdkFfiException { + /// Constructs the [EsploraException] + EsploraException({super.message}); +} + +class Secp256k1Exception extends BdkFfiException { + /// Constructs the [ Secp256k1Exception] + Secp256k1Exception({super.message}); +} + +///Exception thrown when trying to bump a transaction that is already confirmed +class TransactionConfirmedException extends BdkFfiException { + /// Constructs the [TransactionConfirmedException] + TransactionConfirmedException({super.message}); +} + +class ElectrumException extends BdkFfiException { + /// Constructs the [ElectrumException] + ElectrumException({super.message}); +} + +class RpcException extends BdkFfiException { + /// Constructs the [RpcException] + RpcException({super.message}); +} + +class RusqliteException extends BdkFfiException { + /// Constructs the [RusqliteException] + RusqliteException({super.message}); +} + +class InvalidNetworkException extends BdkFfiException { + /// Constructs the [InvalidNetworkException] + InvalidNetworkException({super.message}); +} + +class JsonException extends BdkFfiException { + /// Constructs the [JsonException] + JsonException({super.message}); +} + +class HexException extends BdkFfiException { + /// Constructs the [HexException] + HexException({super.message}); +} + +class AddressException extends BdkFfiException { + /// Constructs the [AddressException] + AddressException({super.message}); +} + +class ConsensusException extends BdkFfiException { + /// Constructs the [ConsensusException] + ConsensusException({super.message}); +} + +class Bip39Exception extends BdkFfiException { + /// Constructs the [Bip39Exception] + Bip39Exception({super.message}); +} + +class InvalidTransactionException extends BdkFfiException { + /// Constructs the [InvalidTransactionException] + InvalidTransactionException({super.message}); +} + +class InvalidLockTimeException extends BdkFfiException { + /// Constructs the [InvalidLockTimeException] + InvalidLockTimeException({super.message}); +} + +class InvalidInputException extends BdkFfiException { + /// Constructs the [InvalidInputException] + InvalidInputException({super.message}); +} + +class VerifyTransactionException extends BdkFfiException { + /// Constructs the [VerifyTransactionException] + VerifyTransactionException({super.message}); +} + +Exception mapHexError(HexError error) { + return error.when( + invalidChar: (e) => HexException(message: "Non-hexadecimal character $e"), + oddLengthString: (e) => + HexException(message: "Purported hex string had odd length $e"), + invalidLength: (BigInt expected, BigInt found) => HexException( + message: + "Tried to parse fixed-length hash from a string with the wrong type; \n expected: ${expected.toString()}, found: ${found.toString()}.")); +} + +Exception mapAddressError(AddressError error) { + return error.when( + base58: (e) => AddressException(message: "Base58 encoding error: $e"), + bech32: (e) => AddressException(message: "Bech32 encoding error: $e"), + emptyBech32Payload: () => + AddressException(message: "The bech32 payload was empty."), + invalidBech32Variant: (e, f) => AddressException( + message: + "Invalid bech32 variant: The wrong checksum algorithm was used. See BIP-0350; \n expected:$e, found: $f "), + invalidWitnessVersion: (e) => AddressException( + message: + "Invalid witness version script: $e, version must be 0 to 16 inclusive."), + unparsableWitnessVersion: (e) => AddressException( + message: "Unable to parse witness version from string: $e"), + malformedWitnessVersion: () => AddressException( + message: + "Bitcoin script opcode does not match any known witness version, the script is malformed."), + invalidWitnessProgramLength: (e) => AddressException( + message: + "Invalid witness program length: $e, The witness program must be between 2 and 40 bytes in length."), + invalidSegwitV0ProgramLength: (e) => AddressException( + message: + "Invalid segwitV0 program length: $e, A v0 witness program must be either of length 20 or 32."), + uncompressedPubkey: () => AddressException( + message: "An uncompressed pubkey was used where it is not allowed."), + excessiveScriptSize: () => AddressException( + message: "Address size more than 520 bytes is not allowed."), + unrecognizedScript: () => AddressException( + message: + "Unrecognized script: Script is not a p2pkh, p2sh or witness program."), + unknownAddressType: (e) => AddressException( + message: "Unknown address type: $e, Address type is either invalid or not supported in rust-bitcoin."), + networkValidation: (required, found, _) => AddressException(message: "Address’s network differs from required one; \n required: $required, found: $found ")); +} + +Exception mapDescriptorError(DescriptorError error) { + return error.when( + invalidHdKeyPath: () => DescriptorException( + message: + "Invalid HD Key path, such as having a wildcard but a length != 1"), + invalidDescriptorChecksum: () => DescriptorException( + message: "The provided descriptor doesn’t match its checksum"), + hardenedDerivationXpub: () => DescriptorException( + message: "The provided descriptor doesn’t match its checksum"), + multiPath: () => + DescriptorException(message: "The descriptor contains multipath keys"), + key: (e) => KeyException(message: e), + policy: (e) => DescriptorException( + message: "Error while extracting and manipulating policies: $e"), + bip32: (e) => Bip32Exception(message: e), + base58: (e) => + DescriptorException(message: "Error during base58 decoding: $e"), + pk: (e) => KeyException(message: e), + miniscript: (e) => MiniscriptException(message: e), + hex: (e) => HexException(message: e), + invalidDescriptorCharacter: (e) => DescriptorException( + message: "Invalid byte found in the descriptor checksum: $e"), + ); +} + +Exception mapConsensusError(ConsensusError error) { + return error.when( + io: (e) => ConsensusException(message: "I/O error: $e"), + oversizedVectorAllocation: (e, f) => ConsensusException( + message: + "Tried to allocate an oversized vector. The capacity requested: $e, found: $f "), + invalidChecksum: (e, f) => ConsensusException( + message: + "Checksum was invalid, expected: ${e.toString()}, actual:${f.toString()}"), + nonMinimalVarInt: () => ConsensusException( + message: "VarInt was encoded in a non-minimal way."), + parseFailed: (e) => ConsensusException(message: "Parsing error: $e"), + unsupportedSegwitFlag: (e) => + ConsensusException(message: "Unsupported segwit flag $e")); +} + +Exception mapBdkError(BdkError error) { + return error.when( + noUtxosSelected: () => NoUtxosSelectedException( + message: + "manuallySelectedOnly option is selected but no utxo has been passed"), + invalidU32Bytes: (e) => InvalidByteException( + message: + 'Wrong number of bytes found when trying to convert the bytes, ${e.toString()}'), + generic: (e) => GenericException(message: e), + scriptDoesntHaveAddressForm: () => ScriptDoesntHaveAddressFormException(), + noRecipients: () => NoRecipientsException( + message: "Failed to build a transaction without recipients"), + outputBelowDustLimit: (e) => OutputBelowDustLimitException( + message: + 'Output created is under the dust limit (546 sats). Output value: ${e.toString()}'), + insufficientFunds: (needed, available) => InsufficientFundsException( + message: + "Wallet's UTXO set is not enough to cover recipient's requested plus fee; \n Needed: $needed, Available: $available"), + bnBTotalTriesExceeded: () => BnBTotalTriesExceededException( + message: + "Utxo branch and bound coin selection attempts have reached its limit"), + bnBNoExactMatch: () => BnBNoExactMatchException( + message: + "Utxo branch and bound coin selection failed to find the correct inputs for the desired outputs."), + unknownUtxo: () => UnknownUtxoException( + message: "Utxo not found in the internal database"), + transactionNotFound: () => TransactionNotFoundException(), + transactionConfirmed: () => TransactionConfirmedException(), + irreplaceableTransaction: () => IrreplaceableTransactionException( + message: + "Trying to replace the transaction that has a sequence >= 0xFFFFFFFE"), + feeRateTooLow: (e) => FeeRateTooLowException( + message: + "The Fee rate requested is lower than required. Required: ${e.toString()}"), + feeTooLow: (e) => FeeTooLowException( + message: + "The absolute fee requested is lower than replaced tx's absolute fee; \n Required: ${e.toString()}"), + feeRateUnavailable: () => FeeRateUnavailableException( + message: "Node doesn't have data to estimate a fee rate"), + missingKeyOrigin: (e) => MissingKeyOriginException(message: e.toString()), + key: (e) => KeyException(message: e.toString()), + checksumMismatch: () => ChecksumMismatchException(), + spendingPolicyRequired: (e) => SpendingPolicyRequiredException( + message: "Spending policy is not compatible with: ${e.toString()}"), + invalidPolicyPathError: (e) => + InvalidPolicyPathException(message: e.toString()), + signer: (e) => SignerException(message: e.toString()), + invalidNetwork: (requested, found) => InvalidNetworkException( + message: 'Requested; $requested, Found: $found'), + invalidOutpoint: (e) => InvalidOutpointException( + message: + "${e.toString()} doesn’t exist in the tx (vout greater than available outputs)"), + descriptor: (e) => mapDescriptorError(e), + encode: (e) => EncodeException(message: e.toString()), + miniscript: (e) => MiniscriptException(message: e.toString()), + miniscriptPsbt: (e) => MiniscriptPsbtException(message: e.toString()), + bip32: (e) => Bip32Exception(message: e.toString()), + secp256K1: (e) => Secp256k1Exception(message: e.toString()), + missingCachedScripts: (missingCount, lastCount) => + MissingCachedScriptsException( + message: + 'Sync attempt failed due to missing scripts in cache which are needed to satisfy stop_gap; \n MissingCount: $missingCount, LastCount: $lastCount '), + json: (e) => JsonException(message: e.toString()), + hex: (e) => mapHexError(e), + psbt: (e) => PsbtException(message: e.toString()), + psbtParse: (e) => PsbtParseException(message: e.toString()), + electrum: (e) => ElectrumException(message: e.toString()), + esplora: (e) => EsploraException(message: e.toString()), + sled: (e) => SledException(message: e.toString()), + rpc: (e) => RpcException(message: e.toString()), + rusqlite: (e) => RusqliteException(message: e.toString()), + consensus: (e) => mapConsensusError(e), + address: (e) => mapAddressError(e), + bip39: (e) => Bip39Exception(message: e.toString()), + invalidInput: (e) => InvalidInputException(message: e), + invalidLockTime: (e) => InvalidLockTimeException(message: e), + invalidTransaction: (e) => InvalidTransactionException(message: e), + verifyTransaction: (e) => VerifyTransactionException(message: e), + ); +} diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart new file mode 100644 index 00000000..45294f8f --- /dev/null +++ b/lib/src/utils/utils.dart @@ -0,0 +1,15 @@ +import '../generated/frb_generated.dart'; + +export 'exceptions.dart'; + +class Api { + static Future initialize() async { + try { + if (!core.instance.initialized) { + await core.init(); + } + } catch (e) { + throw Exception("Failed to initialize bdk-flutter"); + } + } +} diff --git a/macos/.gitignore b/macos/.gitignore new file mode 100644 index 00000000..09a762be --- /dev/null +++ b/macos/.gitignore @@ -0,0 +1,41 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh +Flutter/ +Frameworks/* +!Frameworks/.gitkeep diff --git a/macos/Classes/EnforceBundling.swift b/macos/Classes/EnforceBundling.swift new file mode 100644 index 00000000..f95cacb9 --- /dev/null +++ b/macos/Classes/EnforceBundling.swift @@ -0,0 +1,4 @@ +public func dummyMethodToEnforceBundling() -> Int64 { + return dummy_method_to_enforce_bundling() +} +let dummyVar = dummyMethodToEnforceBundling(); diff --git a/macos/Classes/bdk_flutter.c b/macos/Classes/bdk_flutter.c new file mode 100644 index 00000000..e69de29b diff --git a/macos/Classes/frb_generated.h b/macos/Classes/frb_generated.h new file mode 100644 index 00000000..2430b240 --- /dev/null +++ b/macos/Classes/frb_generated.h @@ -0,0 +1,1542 @@ +#include +#include +#include +// EXTRA BEGIN +typedef struct DartCObject *WireSyncRust2DartDco; +typedef struct WireSyncRust2DartSse { + uint8_t *ptr; + int32_t len; +} WireSyncRust2DartSse; + +typedef int64_t DartPort; +typedef bool (*DartPostCObjectFnType)(DartPort port_id, void *message); +void store_dart_post_cobject(DartPostCObjectFnType ptr); +// EXTRA END +typedef struct _Dart_Handle* Dart_Handle; + +typedef struct wire_cst_bdk_blockchain { + uintptr_t ptr; +} wire_cst_bdk_blockchain; + +typedef struct wire_cst_list_prim_u_8_strict { + uint8_t *ptr; + int32_t len; +} wire_cst_list_prim_u_8_strict; + +typedef struct wire_cst_bdk_transaction { + struct wire_cst_list_prim_u_8_strict *s; +} wire_cst_bdk_transaction; + +typedef struct wire_cst_electrum_config { + struct wire_cst_list_prim_u_8_strict *url; + struct wire_cst_list_prim_u_8_strict *socks5; + uint8_t retry; + uint8_t *timeout; + uint64_t stop_gap; + bool validate_domain; +} wire_cst_electrum_config; + +typedef struct wire_cst_BlockchainConfig_Electrum { + struct wire_cst_electrum_config *config; +} wire_cst_BlockchainConfig_Electrum; + +typedef struct wire_cst_esplora_config { + struct wire_cst_list_prim_u_8_strict *base_url; + struct wire_cst_list_prim_u_8_strict *proxy; + uint8_t *concurrency; + uint64_t stop_gap; + uint64_t *timeout; +} wire_cst_esplora_config; + +typedef struct wire_cst_BlockchainConfig_Esplora { + struct wire_cst_esplora_config *config; +} wire_cst_BlockchainConfig_Esplora; + +typedef struct wire_cst_Auth_UserPass { + struct wire_cst_list_prim_u_8_strict *username; + struct wire_cst_list_prim_u_8_strict *password; +} wire_cst_Auth_UserPass; + +typedef struct wire_cst_Auth_Cookie { + struct wire_cst_list_prim_u_8_strict *file; +} wire_cst_Auth_Cookie; + +typedef union AuthKind { + struct wire_cst_Auth_UserPass UserPass; + struct wire_cst_Auth_Cookie Cookie; +} AuthKind; + +typedef struct wire_cst_auth { + int32_t tag; + union AuthKind kind; +} wire_cst_auth; + +typedef struct wire_cst_rpc_sync_params { + uint64_t start_script_count; + uint64_t start_time; + bool force_start_time; + uint64_t poll_rate_sec; +} wire_cst_rpc_sync_params; + +typedef struct wire_cst_rpc_config { + struct wire_cst_list_prim_u_8_strict *url; + struct wire_cst_auth auth; + int32_t network; + struct wire_cst_list_prim_u_8_strict *wallet_name; + struct wire_cst_rpc_sync_params *sync_params; +} wire_cst_rpc_config; + +typedef struct wire_cst_BlockchainConfig_Rpc { + struct wire_cst_rpc_config *config; +} wire_cst_BlockchainConfig_Rpc; + +typedef union BlockchainConfigKind { + struct wire_cst_BlockchainConfig_Electrum Electrum; + struct wire_cst_BlockchainConfig_Esplora Esplora; + struct wire_cst_BlockchainConfig_Rpc Rpc; +} BlockchainConfigKind; + +typedef struct wire_cst_blockchain_config { + int32_t tag; + union BlockchainConfigKind kind; +} wire_cst_blockchain_config; + +typedef struct wire_cst_bdk_descriptor { + uintptr_t extended_descriptor; + uintptr_t key_map; +} wire_cst_bdk_descriptor; + +typedef struct wire_cst_bdk_descriptor_secret_key { + uintptr_t ptr; +} wire_cst_bdk_descriptor_secret_key; + +typedef struct wire_cst_bdk_descriptor_public_key { + uintptr_t ptr; +} wire_cst_bdk_descriptor_public_key; + +typedef struct wire_cst_bdk_derivation_path { + uintptr_t ptr; +} wire_cst_bdk_derivation_path; + +typedef struct wire_cst_bdk_mnemonic { + uintptr_t ptr; +} wire_cst_bdk_mnemonic; + +typedef struct wire_cst_list_prim_u_8_loose { + uint8_t *ptr; + int32_t len; +} wire_cst_list_prim_u_8_loose; + +typedef struct wire_cst_bdk_psbt { + uintptr_t ptr; +} wire_cst_bdk_psbt; + +typedef struct wire_cst_bdk_address { + uintptr_t ptr; +} wire_cst_bdk_address; + +typedef struct wire_cst_bdk_script_buf { + struct wire_cst_list_prim_u_8_strict *bytes; +} wire_cst_bdk_script_buf; + +typedef struct wire_cst_bdk_policy { + uintptr_t ptr; +} wire_cst_bdk_policy; + +typedef struct wire_cst_LockTime_Blocks { + uint32_t field0; +} wire_cst_LockTime_Blocks; + +typedef struct wire_cst_LockTime_Seconds { + uint32_t field0; +} wire_cst_LockTime_Seconds; + +typedef union LockTimeKind { + struct wire_cst_LockTime_Blocks Blocks; + struct wire_cst_LockTime_Seconds Seconds; +} LockTimeKind; + +typedef struct wire_cst_lock_time { + int32_t tag; + union LockTimeKind kind; +} wire_cst_lock_time; + +typedef struct wire_cst_out_point { + struct wire_cst_list_prim_u_8_strict *txid; + uint32_t vout; +} wire_cst_out_point; + +typedef struct wire_cst_list_list_prim_u_8_strict { + struct wire_cst_list_prim_u_8_strict **ptr; + int32_t len; +} wire_cst_list_list_prim_u_8_strict; + +typedef struct wire_cst_tx_in { + struct wire_cst_out_point previous_output; + struct wire_cst_bdk_script_buf script_sig; + uint32_t sequence; + struct wire_cst_list_list_prim_u_8_strict *witness; +} wire_cst_tx_in; + +typedef struct wire_cst_list_tx_in { + struct wire_cst_tx_in *ptr; + int32_t len; +} wire_cst_list_tx_in; + +typedef struct wire_cst_tx_out { + uint64_t value; + struct wire_cst_bdk_script_buf script_pubkey; +} wire_cst_tx_out; + +typedef struct wire_cst_list_tx_out { + struct wire_cst_tx_out *ptr; + int32_t len; +} wire_cst_list_tx_out; + +typedef struct wire_cst_bdk_wallet { + uintptr_t ptr; +} wire_cst_bdk_wallet; + +typedef struct wire_cst_AddressIndex_Peek { + uint32_t index; +} wire_cst_AddressIndex_Peek; + +typedef struct wire_cst_AddressIndex_Reset { + uint32_t index; +} wire_cst_AddressIndex_Reset; + +typedef union AddressIndexKind { + struct wire_cst_AddressIndex_Peek Peek; + struct wire_cst_AddressIndex_Reset Reset; +} AddressIndexKind; + +typedef struct wire_cst_address_index { + int32_t tag; + union AddressIndexKind kind; +} wire_cst_address_index; + +typedef struct wire_cst_local_utxo { + struct wire_cst_out_point outpoint; + struct wire_cst_tx_out txout; + int32_t keychain; + bool is_spent; +} wire_cst_local_utxo; + +typedef struct wire_cst_psbt_sig_hash_type { + uint32_t inner; +} wire_cst_psbt_sig_hash_type; + +typedef struct wire_cst_sqlite_db_configuration { + struct wire_cst_list_prim_u_8_strict *path; +} wire_cst_sqlite_db_configuration; + +typedef struct wire_cst_DatabaseConfig_Sqlite { + struct wire_cst_sqlite_db_configuration *config; +} wire_cst_DatabaseConfig_Sqlite; + +typedef struct wire_cst_sled_db_configuration { + struct wire_cst_list_prim_u_8_strict *path; + struct wire_cst_list_prim_u_8_strict *tree_name; +} wire_cst_sled_db_configuration; + +typedef struct wire_cst_DatabaseConfig_Sled { + struct wire_cst_sled_db_configuration *config; +} wire_cst_DatabaseConfig_Sled; + +typedef union DatabaseConfigKind { + struct wire_cst_DatabaseConfig_Sqlite Sqlite; + struct wire_cst_DatabaseConfig_Sled Sled; +} DatabaseConfigKind; + +typedef struct wire_cst_database_config { + int32_t tag; + union DatabaseConfigKind kind; +} wire_cst_database_config; + +typedef struct wire_cst_sign_options { + bool trust_witness_utxo; + uint32_t *assume_height; + bool allow_all_sighashes; + bool remove_partial_sigs; + bool try_finalize; + bool sign_with_tap_internal_key; + bool allow_grinding; +} wire_cst_sign_options; + +typedef struct wire_cst_script_amount { + struct wire_cst_bdk_script_buf script; + uint64_t amount; +} wire_cst_script_amount; + +typedef struct wire_cst_list_script_amount { + struct wire_cst_script_amount *ptr; + int32_t len; +} wire_cst_list_script_amount; + +typedef struct wire_cst_list_out_point { + struct wire_cst_out_point *ptr; + int32_t len; +} wire_cst_list_out_point; + +typedef struct wire_cst_input { + struct wire_cst_list_prim_u_8_strict *s; +} wire_cst_input; + +typedef struct wire_cst_record_out_point_input_usize { + struct wire_cst_out_point field0; + struct wire_cst_input field1; + uintptr_t field2; +} wire_cst_record_out_point_input_usize; + +typedef struct wire_cst_RbfValue_Value { + uint32_t field0; +} wire_cst_RbfValue_Value; + +typedef union RbfValueKind { + struct wire_cst_RbfValue_Value Value; +} RbfValueKind; + +typedef struct wire_cst_rbf_value { + int32_t tag; + union RbfValueKind kind; +} wire_cst_rbf_value; + +typedef struct wire_cst_list_prim_u_32_strict { + uint32_t *ptr; + int32_t len; +} wire_cst_list_prim_u_32_strict; + +typedef struct wire_cst_record_string_list_prim_u_32_strict { + struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_32_strict *field1; +} wire_cst_record_string_list_prim_u_32_strict; + +typedef struct wire_cst_list_record_string_list_prim_u_32_strict { + struct wire_cst_record_string_list_prim_u_32_strict *ptr; + int32_t len; +} wire_cst_list_record_string_list_prim_u_32_strict; + +typedef struct wire_cst_AddressError_Base58 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_AddressError_Base58; + +typedef struct wire_cst_AddressError_Bech32 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_AddressError_Bech32; + +typedef struct wire_cst_AddressError_InvalidBech32Variant { + int32_t expected; + int32_t found; +} wire_cst_AddressError_InvalidBech32Variant; + +typedef struct wire_cst_AddressError_InvalidWitnessVersion { + uint8_t field0; +} wire_cst_AddressError_InvalidWitnessVersion; + +typedef struct wire_cst_AddressError_UnparsableWitnessVersion { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_AddressError_UnparsableWitnessVersion; + +typedef struct wire_cst_AddressError_InvalidWitnessProgramLength { + uintptr_t field0; +} wire_cst_AddressError_InvalidWitnessProgramLength; + +typedef struct wire_cst_AddressError_InvalidSegwitV0ProgramLength { + uintptr_t field0; +} wire_cst_AddressError_InvalidSegwitV0ProgramLength; + +typedef struct wire_cst_AddressError_UnknownAddressType { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_AddressError_UnknownAddressType; + +typedef struct wire_cst_AddressError_NetworkValidation { + int32_t network_required; + int32_t network_found; + struct wire_cst_list_prim_u_8_strict *address; +} wire_cst_AddressError_NetworkValidation; + +typedef union AddressErrorKind { + struct wire_cst_AddressError_Base58 Base58; + struct wire_cst_AddressError_Bech32 Bech32; + struct wire_cst_AddressError_InvalidBech32Variant InvalidBech32Variant; + struct wire_cst_AddressError_InvalidWitnessVersion InvalidWitnessVersion; + struct wire_cst_AddressError_UnparsableWitnessVersion UnparsableWitnessVersion; + struct wire_cst_AddressError_InvalidWitnessProgramLength InvalidWitnessProgramLength; + struct wire_cst_AddressError_InvalidSegwitV0ProgramLength InvalidSegwitV0ProgramLength; + struct wire_cst_AddressError_UnknownAddressType UnknownAddressType; + struct wire_cst_AddressError_NetworkValidation NetworkValidation; +} AddressErrorKind; + +typedef struct wire_cst_address_error { + int32_t tag; + union AddressErrorKind kind; +} wire_cst_address_error; + +typedef struct wire_cst_block_time { + uint32_t height; + uint64_t timestamp; +} wire_cst_block_time; + +typedef struct wire_cst_condition { + uint32_t *csv; + struct wire_cst_lock_time *timelock; +} wire_cst_condition; + +typedef struct wire_cst_ConsensusError_Io { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_ConsensusError_Io; + +typedef struct wire_cst_ConsensusError_OversizedVectorAllocation { + uintptr_t requested; + uintptr_t max; +} wire_cst_ConsensusError_OversizedVectorAllocation; + +typedef struct wire_cst_ConsensusError_InvalidChecksum { + struct wire_cst_list_prim_u_8_strict *expected; + struct wire_cst_list_prim_u_8_strict *actual; +} wire_cst_ConsensusError_InvalidChecksum; + +typedef struct wire_cst_ConsensusError_ParseFailed { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_ConsensusError_ParseFailed; + +typedef struct wire_cst_ConsensusError_UnsupportedSegwitFlag { + uint8_t field0; +} wire_cst_ConsensusError_UnsupportedSegwitFlag; + +typedef union ConsensusErrorKind { + struct wire_cst_ConsensusError_Io Io; + struct wire_cst_ConsensusError_OversizedVectorAllocation OversizedVectorAllocation; + struct wire_cst_ConsensusError_InvalidChecksum InvalidChecksum; + struct wire_cst_ConsensusError_ParseFailed ParseFailed; + struct wire_cst_ConsensusError_UnsupportedSegwitFlag UnsupportedSegwitFlag; +} ConsensusErrorKind; + +typedef struct wire_cst_consensus_error { + int32_t tag; + union ConsensusErrorKind kind; +} wire_cst_consensus_error; + +typedef struct wire_cst_DescriptorError_Key { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Key; + +typedef struct wire_cst_DescriptorError_Policy { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Policy; + +typedef struct wire_cst_DescriptorError_InvalidDescriptorCharacter { + uint8_t field0; +} wire_cst_DescriptorError_InvalidDescriptorCharacter; + +typedef struct wire_cst_DescriptorError_Bip32 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Bip32; + +typedef struct wire_cst_DescriptorError_Base58 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Base58; + +typedef struct wire_cst_DescriptorError_Pk { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Pk; + +typedef struct wire_cst_DescriptorError_Miniscript { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Miniscript; + +typedef struct wire_cst_DescriptorError_Hex { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_DescriptorError_Hex; + +typedef union DescriptorErrorKind { + struct wire_cst_DescriptorError_Key Key; + struct wire_cst_DescriptorError_Policy Policy; + struct wire_cst_DescriptorError_InvalidDescriptorCharacter InvalidDescriptorCharacter; + struct wire_cst_DescriptorError_Bip32 Bip32; + struct wire_cst_DescriptorError_Base58 Base58; + struct wire_cst_DescriptorError_Pk Pk; + struct wire_cst_DescriptorError_Miniscript Miniscript; + struct wire_cst_DescriptorError_Hex Hex; +} DescriptorErrorKind; + +typedef struct wire_cst_descriptor_error { + int32_t tag; + union DescriptorErrorKind kind; +} wire_cst_descriptor_error; + +typedef struct wire_cst_fee_rate { + float sat_per_vb; +} wire_cst_fee_rate; + +typedef struct wire_cst_HexError_InvalidChar { + uint8_t field0; +} wire_cst_HexError_InvalidChar; + +typedef struct wire_cst_HexError_OddLengthString { + uintptr_t field0; +} wire_cst_HexError_OddLengthString; + +typedef struct wire_cst_HexError_InvalidLength { + uintptr_t field0; + uintptr_t field1; +} wire_cst_HexError_InvalidLength; + +typedef union HexErrorKind { + struct wire_cst_HexError_InvalidChar InvalidChar; + struct wire_cst_HexError_OddLengthString OddLengthString; + struct wire_cst_HexError_InvalidLength InvalidLength; +} HexErrorKind; + +typedef struct wire_cst_hex_error { + int32_t tag; + union HexErrorKind kind; +} wire_cst_hex_error; + +typedef struct wire_cst_PkOrF_Pubkey { + struct wire_cst_list_prim_u_8_strict *value; +} wire_cst_PkOrF_Pubkey; + +typedef struct wire_cst_PkOrF_XOnlyPubkey { + struct wire_cst_list_prim_u_8_strict *value; +} wire_cst_PkOrF_XOnlyPubkey; + +typedef struct wire_cst_PkOrF_Fingerprint { + struct wire_cst_list_prim_u_8_strict *value; +} wire_cst_PkOrF_Fingerprint; + +typedef union PkOrFKind { + struct wire_cst_PkOrF_Pubkey Pubkey; + struct wire_cst_PkOrF_XOnlyPubkey XOnlyPubkey; + struct wire_cst_PkOrF_Fingerprint Fingerprint; +} PkOrFKind; + +typedef struct wire_cst_pk_or_f { + int32_t tag; + union PkOrFKind kind; +} wire_cst_pk_or_f; + +typedef struct wire_cst_list_bdk_policy { + struct wire_cst_bdk_policy *ptr; + int32_t len; +} wire_cst_list_bdk_policy; + +typedef struct wire_cst_list_condition { + struct wire_cst_condition *ptr; + int32_t len; +} wire_cst_list_condition; + +typedef struct wire_cst_list_local_utxo { + struct wire_cst_local_utxo *ptr; + int32_t len; +} wire_cst_list_local_utxo; + +typedef struct wire_cst_list_pk_or_f { + struct wire_cst_pk_or_f *ptr; + int32_t len; +} wire_cst_list_pk_or_f; + +typedef struct wire_cst_list_prim_u_64_strict { + uint64_t *ptr; + int32_t len; +} wire_cst_list_prim_u_64_strict; + +typedef struct wire_cst_record_list_prim_u_32_strict_list_condition { + struct wire_cst_list_prim_u_32_strict *field0; + struct wire_cst_list_condition *field1; +} wire_cst_record_list_prim_u_32_strict_list_condition; + +typedef struct wire_cst_list_record_list_prim_u_32_strict_list_condition { + struct wire_cst_record_list_prim_u_32_strict_list_condition *ptr; + int32_t len; +} wire_cst_list_record_list_prim_u_32_strict_list_condition; + +typedef struct wire_cst_record_u_32_list_condition { + uint32_t field0; + struct wire_cst_list_condition *field1; +} wire_cst_record_u_32_list_condition; + +typedef struct wire_cst_list_record_u_32_list_condition { + struct wire_cst_record_u_32_list_condition *ptr; + int32_t len; +} wire_cst_list_record_u_32_list_condition; + +typedef struct wire_cst_transaction_details { + struct wire_cst_bdk_transaction *transaction; + struct wire_cst_list_prim_u_8_strict *txid; + uint64_t received; + uint64_t sent; + uint64_t *fee; + struct wire_cst_block_time *confirmation_time; +} wire_cst_transaction_details; + +typedef struct wire_cst_list_transaction_details { + struct wire_cst_transaction_details *ptr; + int32_t len; +} wire_cst_list_transaction_details; + +typedef struct wire_cst_balance { + uint64_t immature; + uint64_t trusted_pending; + uint64_t untrusted_pending; + uint64_t confirmed; + uint64_t spendable; + uint64_t total; +} wire_cst_balance; + +typedef struct wire_cst_BdkError_Hex { + struct wire_cst_hex_error *field0; +} wire_cst_BdkError_Hex; + +typedef struct wire_cst_BdkError_Consensus { + struct wire_cst_consensus_error *field0; +} wire_cst_BdkError_Consensus; + +typedef struct wire_cst_BdkError_VerifyTransaction { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_VerifyTransaction; + +typedef struct wire_cst_BdkError_Address { + struct wire_cst_address_error *field0; +} wire_cst_BdkError_Address; + +typedef struct wire_cst_BdkError_Descriptor { + struct wire_cst_descriptor_error *field0; +} wire_cst_BdkError_Descriptor; + +typedef struct wire_cst_BdkError_InvalidU32Bytes { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidU32Bytes; + +typedef struct wire_cst_BdkError_Generic { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Generic; + +typedef struct wire_cst_BdkError_OutputBelowDustLimit { + uintptr_t field0; +} wire_cst_BdkError_OutputBelowDustLimit; + +typedef struct wire_cst_BdkError_InsufficientFunds { + uint64_t needed; + uint64_t available; +} wire_cst_BdkError_InsufficientFunds; + +typedef struct wire_cst_BdkError_FeeRateTooLow { + float needed; +} wire_cst_BdkError_FeeRateTooLow; + +typedef struct wire_cst_BdkError_FeeTooLow { + uint64_t needed; +} wire_cst_BdkError_FeeTooLow; + +typedef struct wire_cst_BdkError_MissingKeyOrigin { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_MissingKeyOrigin; + +typedef struct wire_cst_BdkError_Key { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Key; + +typedef struct wire_cst_BdkError_SpendingPolicyRequired { + int32_t field0; +} wire_cst_BdkError_SpendingPolicyRequired; + +typedef struct wire_cst_BdkError_InvalidPolicyPathError { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidPolicyPathError; + +typedef struct wire_cst_BdkError_Signer { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Signer; + +typedef struct wire_cst_BdkError_InvalidNetwork { + int32_t requested; + int32_t found; +} wire_cst_BdkError_InvalidNetwork; + +typedef struct wire_cst_BdkError_InvalidOutpoint { + struct wire_cst_out_point *field0; +} wire_cst_BdkError_InvalidOutpoint; + +typedef struct wire_cst_BdkError_Encode { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Encode; + +typedef struct wire_cst_BdkError_Miniscript { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Miniscript; + +typedef struct wire_cst_BdkError_MiniscriptPsbt { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_MiniscriptPsbt; + +typedef struct wire_cst_BdkError_Bip32 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Bip32; + +typedef struct wire_cst_BdkError_Bip39 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Bip39; + +typedef struct wire_cst_BdkError_Secp256k1 { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Secp256k1; + +typedef struct wire_cst_BdkError_Json { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Json; + +typedef struct wire_cst_BdkError_Psbt { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Psbt; + +typedef struct wire_cst_BdkError_PsbtParse { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_PsbtParse; + +typedef struct wire_cst_BdkError_MissingCachedScripts { + uintptr_t field0; + uintptr_t field1; +} wire_cst_BdkError_MissingCachedScripts; + +typedef struct wire_cst_BdkError_Electrum { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Electrum; + +typedef struct wire_cst_BdkError_Esplora { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Esplora; + +typedef struct wire_cst_BdkError_Sled { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Sled; + +typedef struct wire_cst_BdkError_Rpc { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Rpc; + +typedef struct wire_cst_BdkError_Rusqlite { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_Rusqlite; + +typedef struct wire_cst_BdkError_InvalidInput { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidInput; + +typedef struct wire_cst_BdkError_InvalidLockTime { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidLockTime; + +typedef struct wire_cst_BdkError_InvalidTransaction { + struct wire_cst_list_prim_u_8_strict *field0; +} wire_cst_BdkError_InvalidTransaction; + +typedef union BdkErrorKind { + struct wire_cst_BdkError_Hex Hex; + struct wire_cst_BdkError_Consensus Consensus; + struct wire_cst_BdkError_VerifyTransaction VerifyTransaction; + struct wire_cst_BdkError_Address Address; + struct wire_cst_BdkError_Descriptor Descriptor; + struct wire_cst_BdkError_InvalidU32Bytes InvalidU32Bytes; + struct wire_cst_BdkError_Generic Generic; + struct wire_cst_BdkError_OutputBelowDustLimit OutputBelowDustLimit; + struct wire_cst_BdkError_InsufficientFunds InsufficientFunds; + struct wire_cst_BdkError_FeeRateTooLow FeeRateTooLow; + struct wire_cst_BdkError_FeeTooLow FeeTooLow; + struct wire_cst_BdkError_MissingKeyOrigin MissingKeyOrigin; + struct wire_cst_BdkError_Key Key; + struct wire_cst_BdkError_SpendingPolicyRequired SpendingPolicyRequired; + struct wire_cst_BdkError_InvalidPolicyPathError InvalidPolicyPathError; + struct wire_cst_BdkError_Signer Signer; + struct wire_cst_BdkError_InvalidNetwork InvalidNetwork; + struct wire_cst_BdkError_InvalidOutpoint InvalidOutpoint; + struct wire_cst_BdkError_Encode Encode; + struct wire_cst_BdkError_Miniscript Miniscript; + struct wire_cst_BdkError_MiniscriptPsbt MiniscriptPsbt; + struct wire_cst_BdkError_Bip32 Bip32; + struct wire_cst_BdkError_Bip39 Bip39; + struct wire_cst_BdkError_Secp256k1 Secp256k1; + struct wire_cst_BdkError_Json Json; + struct wire_cst_BdkError_Psbt Psbt; + struct wire_cst_BdkError_PsbtParse PsbtParse; + struct wire_cst_BdkError_MissingCachedScripts MissingCachedScripts; + struct wire_cst_BdkError_Electrum Electrum; + struct wire_cst_BdkError_Esplora Esplora; + struct wire_cst_BdkError_Sled Sled; + struct wire_cst_BdkError_Rpc Rpc; + struct wire_cst_BdkError_Rusqlite Rusqlite; + struct wire_cst_BdkError_InvalidInput InvalidInput; + struct wire_cst_BdkError_InvalidLockTime InvalidLockTime; + struct wire_cst_BdkError_InvalidTransaction InvalidTransaction; +} BdkErrorKind; + +typedef struct wire_cst_bdk_error { + int32_t tag; + union BdkErrorKind kind; +} wire_cst_bdk_error; + +typedef struct wire_cst_Payload_PubkeyHash { + struct wire_cst_list_prim_u_8_strict *pubkey_hash; +} wire_cst_Payload_PubkeyHash; + +typedef struct wire_cst_Payload_ScriptHash { + struct wire_cst_list_prim_u_8_strict *script_hash; +} wire_cst_Payload_ScriptHash; + +typedef struct wire_cst_Payload_WitnessProgram { + int32_t version; + struct wire_cst_list_prim_u_8_strict *program; +} wire_cst_Payload_WitnessProgram; + +typedef union PayloadKind { + struct wire_cst_Payload_PubkeyHash PubkeyHash; + struct wire_cst_Payload_ScriptHash ScriptHash; + struct wire_cst_Payload_WitnessProgram WitnessProgram; +} PayloadKind; + +typedef struct wire_cst_payload { + int32_t tag; + union PayloadKind kind; +} wire_cst_payload; + +typedef struct wire_cst_record_bdk_address_u_32 { + struct wire_cst_bdk_address field0; + uint32_t field1; +} wire_cst_record_bdk_address_u_32; + +typedef struct wire_cst_record_bdk_psbt_transaction_details { + struct wire_cst_bdk_psbt field0; + struct wire_cst_transaction_details field1; +} wire_cst_record_bdk_psbt_transaction_details; + +typedef struct wire_cst_Satisfaction_Partial { + uint64_t n; + uint64_t m; + struct wire_cst_list_prim_u_64_strict *items; + bool *sorted; + struct wire_cst_list_record_u_32_list_condition *conditions; +} wire_cst_Satisfaction_Partial; + +typedef struct wire_cst_Satisfaction_PartialComplete { + uint64_t n; + uint64_t m; + struct wire_cst_list_prim_u_64_strict *items; + bool *sorted; + struct wire_cst_list_record_list_prim_u_32_strict_list_condition *conditions; +} wire_cst_Satisfaction_PartialComplete; + +typedef struct wire_cst_Satisfaction_Complete { + struct wire_cst_condition *condition; +} wire_cst_Satisfaction_Complete; + +typedef struct wire_cst_Satisfaction_None { + struct wire_cst_list_prim_u_8_strict *msg; +} wire_cst_Satisfaction_None; + +typedef union SatisfactionKind { + struct wire_cst_Satisfaction_Partial Partial; + struct wire_cst_Satisfaction_PartialComplete PartialComplete; + struct wire_cst_Satisfaction_Complete Complete; + struct wire_cst_Satisfaction_None None; +} SatisfactionKind; + +typedef struct wire_cst_satisfaction { + int32_t tag; + union SatisfactionKind kind; +} wire_cst_satisfaction; + +typedef struct wire_cst_SatisfiableItem_EcdsaSignature { + struct wire_cst_pk_or_f *key; +} wire_cst_SatisfiableItem_EcdsaSignature; + +typedef struct wire_cst_SatisfiableItem_SchnorrSignature { + struct wire_cst_pk_or_f *key; +} wire_cst_SatisfiableItem_SchnorrSignature; + +typedef struct wire_cst_SatisfiableItem_Sha256Preimage { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_SatisfiableItem_Sha256Preimage; + +typedef struct wire_cst_SatisfiableItem_Hash256Preimage { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_SatisfiableItem_Hash256Preimage; + +typedef struct wire_cst_SatisfiableItem_Ripemd160Preimage { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_SatisfiableItem_Ripemd160Preimage; + +typedef struct wire_cst_SatisfiableItem_Hash160Preimage { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_SatisfiableItem_Hash160Preimage; + +typedef struct wire_cst_SatisfiableItem_AbsoluteTimelock { + struct wire_cst_lock_time *value; +} wire_cst_SatisfiableItem_AbsoluteTimelock; + +typedef struct wire_cst_SatisfiableItem_RelativeTimelock { + uint32_t value; +} wire_cst_SatisfiableItem_RelativeTimelock; + +typedef struct wire_cst_SatisfiableItem_Multisig { + struct wire_cst_list_pk_or_f *keys; + uint64_t threshold; +} wire_cst_SatisfiableItem_Multisig; + +typedef struct wire_cst_SatisfiableItem_Thresh { + struct wire_cst_list_bdk_policy *items; + uint64_t threshold; +} wire_cst_SatisfiableItem_Thresh; + +typedef union SatisfiableItemKind { + struct wire_cst_SatisfiableItem_EcdsaSignature EcdsaSignature; + struct wire_cst_SatisfiableItem_SchnorrSignature SchnorrSignature; + struct wire_cst_SatisfiableItem_Sha256Preimage Sha256Preimage; + struct wire_cst_SatisfiableItem_Hash256Preimage Hash256Preimage; + struct wire_cst_SatisfiableItem_Ripemd160Preimage Ripemd160Preimage; + struct wire_cst_SatisfiableItem_Hash160Preimage Hash160Preimage; + struct wire_cst_SatisfiableItem_AbsoluteTimelock AbsoluteTimelock; + struct wire_cst_SatisfiableItem_RelativeTimelock RelativeTimelock; + struct wire_cst_SatisfiableItem_Multisig Multisig; + struct wire_cst_SatisfiableItem_Thresh Thresh; +} SatisfiableItemKind; + +typedef struct wire_cst_satisfiable_item { + int32_t tag; + union SatisfiableItemKind kind; +} wire_cst_satisfiable_item; + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast(int64_t port_, + struct wire_cst_bdk_blockchain *ptr, + struct wire_cst_bdk_transaction *transaction); + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create(int64_t port_, + struct wire_cst_blockchain_config *blockchain_config); + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee(int64_t port_, + struct wire_cst_bdk_blockchain *that, + uint64_t target); + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash(int64_t port_, + struct wire_cst_bdk_blockchain *that, + uint32_t height); + +void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height(int64_t port_, + struct wire_cst_bdk_blockchain *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string(struct wire_cst_bdk_descriptor *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight(struct wire_cst_bdk_descriptor *that); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *descriptor, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *secret_key, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *public_key, + struct wire_cst_list_prim_u_8_strict *fingerprint, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *secret_key, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *public_key, + struct wire_cst_list_prim_u_8_strict *fingerprint, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *secret_key, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *public_key, + struct wire_cst_list_prim_u_8_strict *fingerprint, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *secret_key, + int32_t keychain_kind, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *public_key, + struct wire_cst_list_prim_u_8_strict *fingerprint, + int32_t keychain_kind, + int32_t network); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private(struct wire_cst_bdk_descriptor *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string(struct wire_cst_bdk_derivation_path *that); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *path); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string(struct wire_cst_bdk_descriptor_public_key *that); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *ptr, + struct wire_cst_bdk_derivation_path *path); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *ptr, + struct wire_cst_bdk_derivation_path *path); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *public_key); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public(struct wire_cst_bdk_descriptor_secret_key *ptr); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string(struct wire_cst_bdk_descriptor_secret_key *that); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create(int64_t port_, + int32_t network, + struct wire_cst_bdk_mnemonic *mnemonic, + struct wire_cst_list_prim_u_8_strict *password); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *ptr, + struct wire_cst_bdk_derivation_path *path); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *ptr, + struct wire_cst_bdk_derivation_path *path); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *secret_key); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes(struct wire_cst_bdk_descriptor_secret_key *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string(struct wire_cst_bdk_mnemonic *that); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy(int64_t port_, + struct wire_cst_list_prim_u_8_loose *entropy); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *mnemonic); + +void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new(int64_t port_, int32_t word_count); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string(struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine(int64_t port_, + struct wire_cst_bdk_psbt *ptr, + struct wire_cst_bdk_psbt *other); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx(struct wire_cst_bdk_psbt *ptr); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount(struct wire_cst_bdk_psbt *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate(struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str(int64_t port_, + struct wire_cst_list_prim_u_8_strict *psbt_base64); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize(struct wire_cst_bdk_psbt *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize(struct wire_cst_bdk_psbt *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid(struct wire_cst_bdk_psbt *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string(struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script(int64_t port_, + struct wire_cst_bdk_script_buf *script, + int32_t network); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *address, + int32_t network); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network(struct wire_cst_bdk_address *that, + int32_t network); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network(struct wire_cst_bdk_address *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload(struct wire_cst_bdk_address *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script(struct wire_cst_bdk_address *ptr); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri(struct wire_cst_bdk_address *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction(struct wire_cst_bdk_policy *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string(struct wire_cst_bdk_script_buf *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty(void); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity(int64_t port_, + uintptr_t capacity); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes(int64_t port_, + struct wire_cst_list_prim_u_8_loose *transaction_bytes); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new(int64_t port_, + int32_t version, + struct wire_cst_lock_time *lock_time, + struct wire_cst_list_tx_in *input, + struct wire_cst_list_tx_out *output); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight(int64_t port_, + struct wire_cst_bdk_transaction *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address(struct wire_cst_bdk_wallet *ptr, + struct wire_cst_address_index *address_index); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance(struct wire_cst_bdk_wallet *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain(struct wire_cst_bdk_wallet *ptr, + int32_t keychain); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address(struct wire_cst_bdk_wallet *ptr, + struct wire_cst_address_index *address_index); + +void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(int64_t port_, + struct wire_cst_bdk_wallet *that, + struct wire_cst_local_utxo *utxo, + bool only_witness_utxo, + struct wire_cst_psbt_sig_hash_type *sighash_type); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_script_buf *script); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions(struct wire_cst_bdk_wallet *that, + bool include_raw); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent(struct wire_cst_bdk_wallet *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network(struct wire_cst_bdk_wallet *that); + +void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new(int64_t port_, + struct wire_cst_bdk_descriptor *descriptor, + struct wire_cst_bdk_descriptor *change_descriptor, + int32_t network, + struct wire_cst_database_config *database_config); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies(struct wire_cst_bdk_wallet *ptr, + int32_t keychain); + +void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_psbt *psbt, + struct wire_cst_sign_options *sign_options); + +void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_blockchain *blockchain); + +void frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder(int64_t port_, + struct wire_cst_list_prim_u_8_strict *txid, + float fee_rate, + struct wire_cst_bdk_address *allow_shrinking, + struct wire_cst_bdk_wallet *wallet, + bool enable_rbf, + uint32_t *n_sequence); + +void frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish(int64_t port_, + struct wire_cst_bdk_wallet *wallet, + struct wire_cst_list_script_amount *recipients, + struct wire_cst_list_out_point *utxos, + struct wire_cst_record_out_point_input_usize *foreign_utxo, + struct wire_cst_list_out_point *un_spendable, + int32_t change_policy, + bool manually_selected_only, + float *fee_rate, + uint64_t *fee_absolute, + bool drain_wallet, + struct wire_cst_bdk_script_buf *drain_to, + struct wire_cst_rbf_value *rbf, + struct wire_cst_list_record_string_list_prim_u_32_strict *internal_policy_path, + struct wire_cst_list_record_string_list_prim_u_32_strict *external_policy_path, + struct wire_cst_list_prim_u_8_loose *data); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); + +struct wire_cst_address_error *frbgen_bdk_flutter_cst_new_box_autoadd_address_error(void); + +struct wire_cst_address_index *frbgen_bdk_flutter_cst_new_box_autoadd_address_index(void); + +struct wire_cst_bdk_address *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address(void); + +struct wire_cst_bdk_blockchain *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain(void); + +struct wire_cst_bdk_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path(void); + +struct wire_cst_bdk_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor(void); + +struct wire_cst_bdk_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key(void); + +struct wire_cst_bdk_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key(void); + +struct wire_cst_bdk_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic(void); + +struct wire_cst_bdk_policy *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy(void); + +struct wire_cst_bdk_psbt *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt(void); + +struct wire_cst_bdk_script_buf *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf(void); + +struct wire_cst_bdk_transaction *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction(void); + +struct wire_cst_bdk_wallet *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet(void); + +struct wire_cst_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_block_time(void); + +struct wire_cst_blockchain_config *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config(void); + +bool *frbgen_bdk_flutter_cst_new_box_autoadd_bool(bool value); + +struct wire_cst_condition *frbgen_bdk_flutter_cst_new_box_autoadd_condition(void); + +struct wire_cst_consensus_error *frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error(void); + +struct wire_cst_database_config *frbgen_bdk_flutter_cst_new_box_autoadd_database_config(void); + +struct wire_cst_descriptor_error *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error(void); + +struct wire_cst_electrum_config *frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config(void); + +struct wire_cst_esplora_config *frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config(void); + +float *frbgen_bdk_flutter_cst_new_box_autoadd_f_32(float value); + +struct wire_cst_fee_rate *frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate(void); + +struct wire_cst_hex_error *frbgen_bdk_flutter_cst_new_box_autoadd_hex_error(void); + +struct wire_cst_local_utxo *frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo(void); + +struct wire_cst_lock_time *frbgen_bdk_flutter_cst_new_box_autoadd_lock_time(void); + +struct wire_cst_out_point *frbgen_bdk_flutter_cst_new_box_autoadd_out_point(void); + +struct wire_cst_pk_or_f *frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f(void); + +struct wire_cst_psbt_sig_hash_type *frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type(void); + +struct wire_cst_rbf_value *frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value(void); + +struct wire_cst_record_out_point_input_usize *frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize(void); + +struct wire_cst_rpc_config *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config(void); + +struct wire_cst_rpc_sync_params *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params(void); + +struct wire_cst_sign_options *frbgen_bdk_flutter_cst_new_box_autoadd_sign_options(void); + +struct wire_cst_sled_db_configuration *frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration(void); + +struct wire_cst_sqlite_db_configuration *frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration(void); + +uint32_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_32(uint32_t value); + +uint64_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_64(uint64_t value); + +uint8_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_8(uint8_t value); + +struct wire_cst_list_bdk_policy *frbgen_bdk_flutter_cst_new_list_bdk_policy(int32_t len); + +struct wire_cst_list_condition *frbgen_bdk_flutter_cst_new_list_condition(int32_t len); + +struct wire_cst_list_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict(int32_t len); + +struct wire_cst_list_local_utxo *frbgen_bdk_flutter_cst_new_list_local_utxo(int32_t len); + +struct wire_cst_list_out_point *frbgen_bdk_flutter_cst_new_list_out_point(int32_t len); + +struct wire_cst_list_pk_or_f *frbgen_bdk_flutter_cst_new_list_pk_or_f(int32_t len); + +struct wire_cst_list_prim_u_32_strict *frbgen_bdk_flutter_cst_new_list_prim_u_32_strict(int32_t len); + +struct wire_cst_list_prim_u_64_strict *frbgen_bdk_flutter_cst_new_list_prim_u_64_strict(int32_t len); + +struct wire_cst_list_prim_u_8_loose *frbgen_bdk_flutter_cst_new_list_prim_u_8_loose(int32_t len); + +struct wire_cst_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_prim_u_8_strict(int32_t len); + +struct wire_cst_list_record_list_prim_u_32_strict_list_condition *frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition(int32_t len); + +struct wire_cst_list_record_string_list_prim_u_32_strict *frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict(int32_t len); + +struct wire_cst_list_record_u_32_list_condition *frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition(int32_t len); + +struct wire_cst_list_script_amount *frbgen_bdk_flutter_cst_new_list_script_amount(int32_t len); + +struct wire_cst_list_transaction_details *frbgen_bdk_flutter_cst_new_list_transaction_details(int32_t len); + +struct wire_cst_list_tx_in *frbgen_bdk_flutter_cst_new_list_tx_in(int32_t len); + +struct wire_cst_list_tx_out *frbgen_bdk_flutter_cst_new_list_tx_out(int32_t len); +static int64_t dummy_method_to_enforce_bundling(void) { + int64_t dummy_var = 0; + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_address_error); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_address_index); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_block_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_bool); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_condition); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_database_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_f_32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_hex_error); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_out_point); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sign_options); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_64); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_8); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_bdk_policy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_condition); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_local_utxo); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_out_point); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_pk_or_f); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_32_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_64_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_loose); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_script_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_transaction_details); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_in); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_out); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish); + dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); + return dummy_var; +} diff --git a/macos/bdk_flutter.podspec b/macos/bdk_flutter.podspec new file mode 100644 index 00000000..5e88ecd3 --- /dev/null +++ b/macos/bdk_flutter.podspec @@ -0,0 +1,36 @@ +Pod::Spec.new do |s| + s.name = 'bdk_flutter' + s.version = "0.31.3" + s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' + s.description = <<-DESC + A new Flutter plugin 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.platform = :osx, '10.11' + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } + s.swift_version = '5.0' + s.dependency 'FlutterMacOS' + s.osx.deployment_target = '14.0' + s.script_phase = { + :name => 'Build Rust library', + # First argument is relative path to the `rust` folder, second is name of rust library + :script => 'sh "$PODS_TARGET_SRCROOT/../cargokit/build_pod.sh" ../rust bdk_flutter', + :execution_position => :before_compile, + :input_files => ['${BUILT_PRODUCTS_DIR}/cargokit_phony'], + # Let XCode know that the static library referenced in -force_load below is + # created by this build step. + :output_files => ["${BUILT_PRODUCTS_DIR}/libbdk_flutter.a"], + } + s.pod_target_xcconfig = { + 'DEFINES_MODULE' => 'YES', + 'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/libbdk_flutter.a', + 'DEAD_CODE_STRIPPING' => 'YES', + 'STRIP_INSTALLED_PRODUCT[config=Release][sdk=*][arch=*]' => "YES", + 'STRIP_STYLE[config=Release][sdk=*][arch=*]' => "non-global", + 'DEPLOYMENT_POSTPROCESSING[config=Release][sdk=*][arch=*]' => "YES", + } +end diff --git a/makefile b/makefile new file mode 100644 index 00000000..a003e3c9 --- /dev/null +++ b/makefile @@ -0,0 +1,29 @@ +.DEFAULT_GOAL := help +PROJECTNAME=$(shell basename "$(PWD)") + +.PHONY: help +help: makefile + @echo + @echo " Available actions in "$(PROJECTNAME)":" + @echo + @sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /' + @echo + +## init: Install missing dependencies. +init: + cargo install flutter_rust_bridge_codegen --version 2.0.0 +## : + +all: init generate-bindings + +generate-bindings: + @echo "[GENERATING FRB CODE] $@" + flutter_rust_bridge_codegen generate + @echo "[Done ✅]" + + + + + + + diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 00000000..1d3c7320 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,621 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_cli_annotations: + dependency: transitive + description: + name: build_cli_annotations + sha256: b59d2769769efd6c9ff6d4c4cede0be115a566afc591705c2040b707534b1172 + url: "https://pub.dev" + source: hosted + version: "2.1.0" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" + url: "https://pub.dev" + source: hosted + version: "2.4.11" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe + url: "https://pub.dev" + source: hosted + version: "7.3.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" + source: hosted + version: "0.4.1" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: "direct main" + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: "direct main" + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + ffigen: + dependency: "direct dev" + description: + name: ffigen + sha256: "3e12e80ccb6539bb3917217bb6f32709220efb737de0d0fa8736da0b7cb507da" + url: "https://pub.dev" + source: hosted + version: "12.0.0" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_rust_bridge: + dependency: "direct main" + description: + name: flutter_rust_bridge + sha256: f703c4b50e253e53efc604d50281bbaefe82d615856f8ae1e7625518ae252e98 + url: "https://pub.dev" + source: hosted + version: "2.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 + url: "https://pub.dev" + source: hosted + version: "2.5.2" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: "direct dev" + description: + name: lints + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: "direct main" + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + mime: + dependency: transitive + description: + name: mime + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + url: "https://pub.dev" + source: hosted + version: "1.0.5" + mockito: + dependency: "direct main" + description: + name: mockito + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" + url: "https://pub.dev" + source: hosted + version: "5.4.4" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + quiver: + dependency: transitive + description: + name: quiver + sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + url: "https://pub.dev" + source: hosted + version: "3.2.1" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" + url: "https://pub.dev" + source: hosted + version: "0.1.5" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 + url: "https://pub.dev" + source: hosted + version: "3.0.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + yaml_edit: + dependency: transitive + description: + name: yaml_edit + sha256: e9c1a3543d2da0db3e90270dbb1e4eebc985ee5e3ffe468d83224472b2194a5f + url: "https://pub.dev" + source: hosted + version: "2.2.1" +sdks: + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 00000000..f2c2ee14 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,36 @@ +name: bdk_flutter +description: A Flutter library for the Bitcoin Development Kit(bdk) (https://bitcoindevkit.org/) +version: 0.31.3 +homepage: https://github.com/LtbLightning/bdk-flutter + +environment: + sdk: ">=3.1.5 <4.0.0" + flutter: ">=3.0.0" + +dependencies: + flutter: + sdk: flutter + flutter_rust_bridge: ">=2.0.0 < 2.1.0" + ffi: ^2.1.3 + freezed_annotation: ^2.4.4 + mockito: ^5.4.4 + collection: ^1.18.0 + meta: ^1.15.0 + +dev_dependencies: + flutter_test: + sdk: flutter + ffigen: ^12.0.0 + freezed: ^2.5.2 + build_runner: ^2.4.8 + lints: ^5.0.0 + +flutter: + plugin: + platforms: + android: + ffiPlugin: true + ios: + ffiPlugin: true + macos: + ffiPlugin: true diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 00000000..4e3fbdf7 --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,1592 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allo-isolate" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b6d794345b06592d0ebeed8e477e41b71e5a0a49df4fc0e4184d5938b99509" +dependencies = [ + "anyhow", + "atomic", + "backtrace", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "android_log-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ecc8056bf6ab9892dcd53216c83d1597487d7dacac16c8df6b877d127df9937" + +[[package]] +name = "android_logger" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c494134f746c14dc653a35a4ea5aca24ac368529da5370ecf41fe0341c35772f" +dependencies = [ + "android_log-sys", + "env_logger", + "log", + "once_cell", +] + +[[package]] +name = "anyhow" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-trait" +version = "0.1.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[package]] +name = "atomic" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" + +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "bdk" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc1fc1a92e0943bfbcd6eb7d32c1b2a79f2f1357eb1e2eee9d7f36d6d7ca44a" +dependencies = [ + "ahash 0.7.8", + "async-trait", + "bdk-macros", + "bip39", + "bitcoin", + "core-rpc", + "electrum-client", + "esplora-client", + "getrandom", + "js-sys", + "log", + "miniscript", + "rand", + "rusqlite", + "serde", + "serde_json", + "sled", + "tokio", +] + +[[package]] +name = "bdk-macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81c1980e50ae23bb6efa9283ae8679d6ea2c6fa6a99fe62533f65f4a25a1a56c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bdk_flutter" +version = "0.31.3" +dependencies = [ + "anyhow", + "assert_matches", + "bdk", + "flutter_rust_bridge", + "rand", + "serde", + "serde_json", +] + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes 0.11.0", + "serde", + "unicode-normalization", +] + +[[package]] +name = "bitcoin" +version = "0.30.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1945a5048598e4189e239d3f809b19bdad4845c4b2ba400d304d2dcf26d2c462" +dependencies = [ + "base64 0.13.1", + "bech32", + "bitcoin-private", + "bitcoin_hashes 0.12.0", + "hex_lit", + "secp256k1", + "serde", +] + +[[package]] +name = "bitcoin-internals" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f9997f8650dd818369931b5672a18dbef95324d0513aa99aae758de8ce86e5b" + +[[package]] +name = "bitcoin-private" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" + +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + +[[package]] +name = "bitcoin_hashes" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" +dependencies = [ + "bitcoin-private", + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "build-target" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "832133bbabbbaa9fbdba793456a2827627a7d2b8fb96032fa1e7666d7895832b" + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bytemuck" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "core-rpc" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d77079e1b71c2778d6e1daf191adadcd4ff5ec3ccad8298a79061d865b235b" +dependencies = [ + "bitcoin-private", + "core-rpc-json", + "jsonrpc", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "core-rpc-json" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581898ed9a83f31c64731b1d8ca2dfffcfec14edf1635afacd5234cddbde3a41" +dependencies = [ + "bitcoin", + "bitcoin-private", + "serde", + "serde_json", +] + +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "dart-sys-fork" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "933dafff26172b719bb9695dd3715a1e7792f62dcdc8a5d4c740db7e0fedee8b" +dependencies = [ + "cc", +] + +[[package]] +name = "dashmap" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" +dependencies = [ + "cfg-if", + "num_cpus", +] + +[[package]] +name = "delegate-attr" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51aac4c99b2e6775164b412ea33ae8441b2fde2dbf05a20bc0052a63d08c475b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "electrum-client" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bc133f1c8d829d254f013f946653cbeb2b08674b960146361d1e9b67733ad19" +dependencies = [ + "bitcoin", + "bitcoin-private", + "byteorder", + "libc", + "log", + "rustls 0.21.10", + "serde", + "serde_json", + "webpki", + "webpki-roots 0.22.6", + "winapi", +] + +[[package]] +name = "env_logger" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "esplora-client" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cb1f7f2489cce83bc3bd92784f9ba5271eeb6e729b975895fc541f78cbfcdca" +dependencies = [ + "bitcoin", + "bitcoin-internals", + "log", + "serde", + "ureq", +] + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flutter_rust_bridge" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "033e831e28f1077ceae3490fb6d093dfdefefd09c5c6e8544c6579effe7e814f" +dependencies = [ + "allo-isolate", + "android_logger", + "anyhow", + "build-target", + "bytemuck", + "byteorder", + "console_error_panic_hook", + "dart-sys-fork", + "delegate-attr", + "flutter_rust_bridge_macros", + "futures", + "js-sys", + "lazy_static", + "oslog", + "threadpool", + "tokio", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "flutter_rust_bridge_macros" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0217fc4b7131b52578be60bbe38c76b3edfc2f9fecab46d9f930510f40ef9023" +dependencies = [ + "hex", + "md-5", + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex_lit" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd8d6b3f301ba426b30feca834a2a18d48d5b54e5065496b5c1b05537bee3639" +dependencies = [ + "base64 0.13.1", + "serde", + "serde_json", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libsqlite3-sys" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f835d03d717946d28b1d1ed632eb6f0e24a299388ee623d0c23118d3e8a7fa" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "miniscript" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1eb102b66b2127a872dbcc73095b7b47aeb9d92f7b03c2b2298253ffc82c7594" +dependencies = [ + "bitcoin", + "bitcoin-private", + "serde", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "oslog" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8343ce955f18e7e68c0207dd0ea776ec453035685395ababd2ea651c569728b3" +dependencies = [ + "cc", + "dashmap", + "log", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro2" +version = "1.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56dea16b0a29e94408b9aa5e2940a4eedbd128a1ba20e8f7ae60fd3d465af0e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys", +] + +[[package]] +name = "rusqlite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a" +dependencies = [ + "bitflags", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.7", + "sct", +] + +[[package]] +name = "rustls" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.2", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "secp256k1" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "bitcoin_hashes 0.12.0", + "rand", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[package]] +name = "serde_json" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "sled" +version = "0.34.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" +dependencies = [ + "crc32fast", + "crossbeam-epoch", + "crossbeam-utils", + "fs2", + "fxhash", + "libc", + "log", + "parking_lot", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socks" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b" +dependencies = [ + "byteorder", + "libc", + "winapi", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "num_cpus", + "pin-project-lite", + "tokio-macros", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "2.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35" +dependencies = [ + "base64 0.21.7", + "flate2", + "log", + "once_cell", + "rustls 0.22.3", + "rustls-pki-types", + "rustls-webpki 0.102.2", + "serde", + "serde_json", + "socks", + "url", + "webpki-roots 0.26.1", +] + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.59", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.59", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "webpki-roots" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 00000000..c8372212 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "bdk_flutter" +version = "0.31.3" +edition = "2021" + +[lib] +crate-type = ["staticlib", "cdylib"] +[dev-dependencies] +assert_matches = "1.5" +anyhow = "1.0.68" +[dependencies] +flutter_rust_bridge = "=2.0.0" +rand = "0.8" +bdk = { version = "0.29.0", features = [ + "all-keys", + "use-esplora-ureq", + "sqlite-bundled", + "rpc", +] } +serde = "1.0.89" +serde_json = "1.0.96" +anyhow = "1.0.68" + +[profile.release] +strip = true +opt-level = 3 +lto = true +codegen-units = 1 +panic = "abort" diff --git a/rust/cargokit.yaml b/rust/cargokit.yaml new file mode 100644 index 00000000..4657395e --- /dev/null +++ b/rust/cargokit.yaml @@ -0,0 +1,6 @@ +cargo: + release: + toolchain: stable +precompiled_binaries: + url_prefix: https://github.com/LtbLightning/bdk-flutter/releases/download/precompiled_ + public_key: 0e43d5e8452d00db7f3000c18fb1ba796babfcb5dc6306bb0629eff24f8be85b \ No newline at end of file diff --git a/rust/src/api/blockchain.rs b/rust/src/api/blockchain.rs new file mode 100644 index 00000000..c27bef2f --- /dev/null +++ b/rust/src/api/blockchain.rs @@ -0,0 +1,207 @@ +use crate::api::types::{BdkTransaction, FeeRate, Network}; + +use crate::api::error::BdkError; +use crate::frb_generated::RustOpaque; +use bdk::bitcoin::Transaction; + +use bdk::blockchain::esplora::EsploraBlockchainConfig; + +pub use bdk::blockchain::{ + AnyBlockchainConfig, Blockchain, ConfigurableBlockchain, ElectrumBlockchainConfig, + GetBlockHash, GetHeight, +}; + +use std::path::PathBuf; + +pub struct BdkBlockchain { + pub ptr: RustOpaque, +} + +impl From for BdkBlockchain { + fn from(value: bdk::blockchain::AnyBlockchain) -> Self { + Self { + ptr: RustOpaque::new(value), + } + } +} +impl BdkBlockchain { + pub fn create(blockchain_config: BlockchainConfig) -> Result { + let any_blockchain_config = match blockchain_config { + BlockchainConfig::Electrum { config } => { + AnyBlockchainConfig::Electrum(ElectrumBlockchainConfig { + retry: config.retry, + socks5: config.socks5, + timeout: config.timeout, + url: config.url, + stop_gap: config.stop_gap as usize, + validate_domain: config.validate_domain, + }) + } + BlockchainConfig::Esplora { config } => { + AnyBlockchainConfig::Esplora(EsploraBlockchainConfig { + base_url: config.base_url, + proxy: config.proxy, + concurrency: config.concurrency, + stop_gap: config.stop_gap as usize, + timeout: config.timeout, + }) + } + BlockchainConfig::Rpc { config } => { + AnyBlockchainConfig::Rpc(bdk::blockchain::rpc::RpcConfig { + url: config.url, + auth: config.auth.into(), + network: config.network.into(), + wallet_name: config.wallet_name, + sync_params: config.sync_params.map(|p| p.into()), + }) + } + }; + let blockchain = bdk::blockchain::AnyBlockchain::from_config(&any_blockchain_config)?; + Ok(blockchain.into()) + } + pub(crate) fn get_blockchain(&self) -> RustOpaque { + self.ptr.clone() + } + pub fn broadcast(ptr: BdkBlockchain, transaction: &BdkTransaction) -> Result { + let tx: Transaction = transaction.try_into()?; + ptr.get_blockchain().broadcast(&tx)?; + Ok(tx.txid().to_string()) + } + + pub fn estimate_fee(&self, target: u64) -> Result { + self.get_blockchain() + .estimate_fee(target as usize) + .map_err(|e| e.into()) + .map(|e| e.into()) + } + + pub fn get_height(&self) -> Result { + self.get_blockchain().get_height().map_err(|e| e.into()) + } + + pub fn get_block_hash(&self, height: u32) -> Result { + self.get_blockchain() + .get_block_hash(u64::from(height)) + .map(|hash| hash.to_string()) + .map_err(|e| e.into()) + } +} +/// Configuration for an ElectrumBlockchain +pub struct ElectrumConfig { + /// URL of the Electrum server (such as ElectrumX, Esplora, BWT) may start with ssl:// or tcp:// and include a port + /// e.g. ssl://electrum.blockstream.info:60002 + pub url: String, + /// URL of the socks5 proxy server or a Tor service + pub socks5: Option, + /// Request retry count + pub retry: u8, + /// Request timeout (seconds) + pub timeout: Option, + /// Stop searching addresses for transactions after finding an unused gap of this length + pub stop_gap: u64, + /// Validate the domain when using SSL + pub validate_domain: bool, +} + +/// Configuration for an EsploraBlockchain +pub struct EsploraConfig { + /// Base URL of the esplora service + /// e.g. https://blockstream.info/api/ + pub base_url: String, + /// Optional URL of the proxy to use to make requests to the Esplora server + /// The string should be formatted as: ://:@host:. + /// Note that the format of this value and the supported protocols change slightly between the + /// sync version of esplora (using ureq) and the async version (using reqwest). For more + /// details check with the documentation of the two crates. Both of them are compiled with + /// the socks feature enabled. + /// The proxy is ignored when targeting wasm32. + pub proxy: Option, + /// Number of parallel requests sent to the esplora service (default: 4) + pub concurrency: Option, + /// Stop searching addresses for transactions after finding an unused gap of this length. + pub stop_gap: u64, + /// Socket timeout. + pub timeout: Option, +} + +pub enum Auth { + /// No authentication + None, + /// Authentication with username and password. + UserPass { + /// Username + username: String, + /// Password + password: String, + }, + /// Authentication with a cookie file + Cookie { + /// Cookie file + file: String, + }, +} + +impl From for bdk::blockchain::rpc::Auth { + fn from(auth: Auth) -> Self { + match auth { + Auth::None => bdk::blockchain::rpc::Auth::None, + Auth::UserPass { username, password } => { + bdk::blockchain::rpc::Auth::UserPass { username, password } + } + Auth::Cookie { file } => bdk::blockchain::rpc::Auth::Cookie { + file: PathBuf::from(file), + }, + } + } +} + +/// Sync parameters for Bitcoin Core RPC. +/// +/// In general, BDK tries to sync `scriptPubKey`s cached in `Database` with +/// `scriptPubKey`s imported in the Bitcoin Core Wallet. These parameters are used for determining +/// how the `importdescriptors` RPC calls are to be made. +pub struct RpcSyncParams { + /// The minimum number of scripts to scan for on initial sync. + pub start_script_count: u64, + /// Time in unix seconds in which initial sync will start scanning from (0 to start from genesis). + pub start_time: u64, + /// Forces every sync to use `start_time` as import timestamp. + pub force_start_time: bool, + /// RPC poll rate (in seconds) to get state updates. + pub poll_rate_sec: u64, +} + +impl From for bdk::blockchain::rpc::RpcSyncParams { + fn from(params: RpcSyncParams) -> Self { + bdk::blockchain::rpc::RpcSyncParams { + start_script_count: params.start_script_count as usize, + start_time: params.start_time, + force_start_time: params.force_start_time, + poll_rate_sec: params.poll_rate_sec, + } + } +} + +/// RpcBlockchain configuration options +pub struct RpcConfig { + /// The bitcoin node url + pub url: String, + /// The bitcoin node authentication mechanism + pub auth: Auth, + /// The network we are using (it will be checked the bitcoin node network matches this) + pub network: Network, + /// The wallet name in the bitcoin node. + pub wallet_name: String, + /// Sync parameters + pub sync_params: Option, +} + +/// Type that can contain any of the blockchain configurations defined by the library. +pub enum BlockchainConfig { + /// Electrum client + Electrum { config: ElectrumConfig }, + /// Esplora client + Esplora { config: EsploraConfig }, + /// Bitcoin Core RPC client + Rpc { config: RpcConfig }, +} diff --git a/rust/src/api/descriptor.rs b/rust/src/api/descriptor.rs new file mode 100644 index 00000000..e7f6f0d2 --- /dev/null +++ b/rust/src/api/descriptor.rs @@ -0,0 +1,274 @@ +use crate::api::error::BdkError; +use crate::api::key::{BdkDescriptorPublicKey, BdkDescriptorSecretKey}; +use crate::api::types::{KeychainKind, Network}; +use crate::frb_generated::RustOpaque; +use bdk::bitcoin::bip32::Fingerprint; +use bdk::bitcoin::key::Secp256k1; +pub use bdk::descriptor::IntoWalletDescriptor; +pub use bdk::keys; +use bdk::template::{ + Bip44, Bip44Public, Bip49, Bip49Public, Bip84, Bip84Public, Bip86, Bip86Public, + DescriptorTemplate, +}; +use flutter_rust_bridge::frb; +use std::str::FromStr; + +#[derive(Debug)] +pub struct BdkDescriptor { + pub extended_descriptor: RustOpaque, + pub key_map: RustOpaque, +} + +impl BdkDescriptor { + pub fn new(descriptor: String, network: Network) -> Result { + let secp = Secp256k1::new(); + let (extended_descriptor, key_map) = + descriptor.into_wallet_descriptor(&secp, network.into())?; + Ok(Self { + extended_descriptor: RustOpaque::new(extended_descriptor), + key_map: RustOpaque::new(key_map), + }) + } + + pub fn new_bip44( + secret_key: BdkDescriptorSecretKey, + keychain_kind: KeychainKind, + network: Network, + ) -> Result { + let derivable_key = &*secret_key.ptr; + match derivable_key { + keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { + let derivable_key = descriptor_x_key.xkey; + let (extended_descriptor, key_map, _) = + Bip44(derivable_key, keychain_kind.into()).build(network.into())?; + Ok(Self { + extended_descriptor: RustOpaque::new(extended_descriptor), + key_map: RustOpaque::new(key_map), + }) + } + keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + pub fn new_bip44_public( + public_key: BdkDescriptorPublicKey, + fingerprint: String, + keychain_kind: KeychainKind, + network: Network, + ) -> Result { + let fingerprint = Fingerprint::from_str(fingerprint.as_str()) + .map_err(|e| BdkError::Generic(e.to_string()))?; + let derivable_key = &*public_key.ptr; + match derivable_key { + keys::DescriptorPublicKey::XPub(descriptor_x_key) => { + let derivable_key = descriptor_x_key.xkey; + let (extended_descriptor, key_map, _) = + Bip44Public(derivable_key, fingerprint, keychain_kind.into()) + .build(network.into())?; + + Ok(Self { + extended_descriptor: RustOpaque::new(extended_descriptor), + key_map: RustOpaque::new(key_map), + }) + } + keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + pub fn new_bip49( + secret_key: BdkDescriptorSecretKey, + keychain_kind: KeychainKind, + network: Network, + ) -> Result { + let derivable_key = &*secret_key.ptr; + match derivable_key { + keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { + let derivable_key = descriptor_x_key.xkey; + let (extended_descriptor, key_map, _) = + Bip49(derivable_key, keychain_kind.into()).build(network.into())?; + Ok(Self { + extended_descriptor: RustOpaque::new(extended_descriptor), + key_map: RustOpaque::new(key_map), + }) + } + keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + pub fn new_bip49_public( + public_key: BdkDescriptorPublicKey, + fingerprint: String, + keychain_kind: KeychainKind, + network: Network, + ) -> Result { + let fingerprint = Fingerprint::from_str(fingerprint.as_str()) + .map_err(|e| BdkError::Generic(e.to_string()))?; + let derivable_key = &*public_key.ptr; + + match derivable_key { + keys::DescriptorPublicKey::XPub(descriptor_x_key) => { + let derivable_key = descriptor_x_key.xkey; + let (extended_descriptor, key_map, _) = + Bip49Public(derivable_key, fingerprint, keychain_kind.into()) + .build(network.into())?; + + Ok(Self { + extended_descriptor: RustOpaque::new(extended_descriptor), + key_map: RustOpaque::new(key_map), + }) + } + keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + pub fn new_bip84( + secret_key: BdkDescriptorSecretKey, + keychain_kind: KeychainKind, + network: Network, + ) -> Result { + let derivable_key = &*secret_key.ptr; + match derivable_key { + keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { + let derivable_key = descriptor_x_key.xkey; + let (extended_descriptor, key_map, _) = + Bip84(derivable_key, keychain_kind.into()).build(network.into())?; + Ok(Self { + extended_descriptor: RustOpaque::new(extended_descriptor), + key_map: RustOpaque::new(key_map), + }) + } + keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + pub fn new_bip84_public( + public_key: BdkDescriptorPublicKey, + fingerprint: String, + keychain_kind: KeychainKind, + network: Network, + ) -> Result { + let fingerprint = Fingerprint::from_str(fingerprint.as_str()) + .map_err(|e| BdkError::Generic(e.to_string()))?; + let derivable_key = &*public_key.ptr; + + match derivable_key { + keys::DescriptorPublicKey::XPub(descriptor_x_key) => { + let derivable_key = descriptor_x_key.xkey; + let (extended_descriptor, key_map, _) = + Bip84Public(derivable_key, fingerprint, keychain_kind.into()) + .build(network.into())?; + + Ok(Self { + extended_descriptor: RustOpaque::new(extended_descriptor), + key_map: RustOpaque::new(key_map), + }) + } + keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + pub fn new_bip86( + secret_key: BdkDescriptorSecretKey, + keychain_kind: KeychainKind, + network: Network, + ) -> Result { + let derivable_key = &*secret_key.ptr; + + match derivable_key { + keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { + let derivable_key = descriptor_x_key.xkey; + let (extended_descriptor, key_map, _) = + Bip86(derivable_key, keychain_kind.into()).build(network.into())?; + Ok(Self { + extended_descriptor: RustOpaque::new(extended_descriptor), + key_map: RustOpaque::new(key_map), + }) + } + keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + pub fn new_bip86_public( + public_key: BdkDescriptorPublicKey, + fingerprint: String, + keychain_kind: KeychainKind, + network: Network, + ) -> Result { + let fingerprint = Fingerprint::from_str(fingerprint.as_str()) + .map_err(|e| BdkError::Generic(e.to_string()))?; + let derivable_key = &*public_key.ptr; + + match derivable_key { + keys::DescriptorPublicKey::XPub(descriptor_x_key) => { + let derivable_key = descriptor_x_key.xkey; + let (extended_descriptor, key_map, _) = + Bip86Public(derivable_key, fingerprint, keychain_kind.into()) + .build(network.into())?; + + Ok(Self { + extended_descriptor: RustOpaque::new(extended_descriptor), + key_map: RustOpaque::new(key_map), + }) + } + keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + #[frb(sync)] + pub fn to_string_private(&self) -> String { + let descriptor = &self.extended_descriptor; + let key_map = &*self.key_map; + descriptor.to_string_with_secret(key_map) + } + + #[frb(sync)] + pub fn as_string(&self) -> String { + self.extended_descriptor.to_string() + } + #[frb(sync)] + pub fn max_satisfaction_weight(&self) -> Result { + self.extended_descriptor + .max_weight_to_satisfy() + .map_err(|e| e.into()) + } +} diff --git a/rust/src/api/error.rs b/rust/src/api/error.rs new file mode 100644 index 00000000..9a986ab0 --- /dev/null +++ b/rust/src/api/error.rs @@ -0,0 +1,368 @@ +use crate::api::types::{KeychainKind, Network, OutPoint, Variant}; +use bdk::descriptor::error::Error as BdkDescriptorError; + +#[derive(Debug)] +pub enum BdkError { + /// Hex decoding error + Hex(HexError), + /// Encoding error + Consensus(ConsensusError), + VerifyTransaction(String), + /// Address error. + Address(AddressError), + /// Error related to the parsing and usage of descriptors + Descriptor(DescriptorError), + /// Wrong number of bytes found when trying to convert to u32 + InvalidU32Bytes(Vec), + /// Generic error + Generic(String), + /// This error is thrown when trying to convert Bare and Public key script to address + ScriptDoesntHaveAddressForm, + /// Cannot build a tx without recipients + NoRecipients, + /// `manually_selected_only` option is selected but no utxo has been passed + NoUtxosSelected, + /// Output created is under the dust limit, 546 satoshis + OutputBelowDustLimit(usize), + /// Wallet's UTXO set is not enough to cover recipient's requested plus fee + InsufficientFunds { + /// Sats needed for some transaction + needed: u64, + /// Sats available for spending + available: u64, + }, + /// Branch and bound coin selection possible attempts with sufficiently big UTXO set could grow + /// exponentially, thus a limit is set, and when hit, this error is thrown + BnBTotalTriesExceeded, + /// Branch and bound coin selection tries to avoid needing a change by finding the right inputs for + /// the desired outputs plus fee, if there is not such combination this error is thrown + BnBNoExactMatch, + /// Happens when trying to spend an UTXO that is not in the internal database + UnknownUtxo, + /// Thrown when a tx is not found in the internal database + TransactionNotFound, + /// Happens when trying to bump a transaction that is already confirmed + TransactionConfirmed, + /// Trying to replace a tx that has a sequence >= `0xFFFFFFFE` + IrreplaceableTransaction, + /// When bumping a tx the fee rate requested is lower than required + FeeRateTooLow { + /// Required fee rate (satoshi/vbyte) + needed: f32, + }, + /// When bumping a tx the absolute fee requested is lower than replaced tx absolute fee + FeeTooLow { + /// Required fee absolute value (satoshi) + needed: u64, + }, + /// Node doesn't have data to estimate a fee rate + FeeRateUnavailable, + MissingKeyOrigin(String), + /// Error while working with keys + Key(String), + /// Descriptor checksum mismatch + ChecksumMismatch, + /// Spending policy is not compatible with this [KeychainKind] + SpendingPolicyRequired(KeychainKind), + /// Error while extracting and manipulating policies + InvalidPolicyPathError(String), + /// Signing error + Signer(String), + /// Invalid network + InvalidNetwork { + /// requested network, for example what is given as bdk-cli option + requested: Network, + /// found network, for example the network of the bitcoin node + found: Network, + }, + /// Requested outpoint doesn't exist in the tx (vout greater than available outputs) + InvalidOutpoint(OutPoint), + /// Encoding error + Encode(String), + /// Miniscript error + Miniscript(String), + /// Miniscript PSBT error + MiniscriptPsbt(String), + /// BIP32 error + Bip32(String), + /// BIP39 error + Bip39(String), + /// A secp256k1 error + Secp256k1(String), + /// Error serializing or deserializing JSON data + Json(String), + /// Partially signed bitcoin transaction error + Psbt(String), + /// Partially signed bitcoin transaction parse error + PsbtParse(String), + /// sync attempt failed due to missing scripts in cache which + /// are needed to satisfy `stop_gap`. + MissingCachedScripts(usize, usize), + /// Electrum client error + Electrum(String), + /// Esplora client error + Esplora(String), + /// Sled database error + Sled(String), + /// Rpc client error + Rpc(String), + /// Rusqlite client error + Rusqlite(String), + InvalidInput(String), + InvalidLockTime(String), + InvalidTransaction(String), +} + +impl From for BdkError { + fn from(value: bdk::Error) -> Self { + match value { + bdk::Error::InvalidU32Bytes(e) => BdkError::InvalidU32Bytes(e), + bdk::Error::Generic(e) => BdkError::Generic(e), + bdk::Error::ScriptDoesntHaveAddressForm => BdkError::ScriptDoesntHaveAddressForm, + bdk::Error::NoRecipients => BdkError::NoRecipients, + bdk::Error::NoUtxosSelected => BdkError::NoUtxosSelected, + bdk::Error::OutputBelowDustLimit(e) => BdkError::OutputBelowDustLimit(e), + bdk::Error::InsufficientFunds { needed, available } => { + BdkError::InsufficientFunds { needed, available } + } + bdk::Error::BnBTotalTriesExceeded => BdkError::BnBTotalTriesExceeded, + bdk::Error::BnBNoExactMatch => BdkError::BnBNoExactMatch, + bdk::Error::UnknownUtxo => BdkError::UnknownUtxo, + bdk::Error::TransactionNotFound => BdkError::TransactionNotFound, + bdk::Error::TransactionConfirmed => BdkError::TransactionConfirmed, + bdk::Error::IrreplaceableTransaction => BdkError::IrreplaceableTransaction, + bdk::Error::FeeRateTooLow { required } => BdkError::FeeRateTooLow { + needed: required.as_sat_per_vb(), + }, + bdk::Error::FeeTooLow { required } => BdkError::FeeTooLow { needed: required }, + bdk::Error::FeeRateUnavailable => BdkError::FeeRateUnavailable, + bdk::Error::MissingKeyOrigin(e) => BdkError::MissingKeyOrigin(e), + bdk::Error::Key(e) => BdkError::Key(e.to_string()), + bdk::Error::ChecksumMismatch => BdkError::ChecksumMismatch, + bdk::Error::SpendingPolicyRequired(e) => BdkError::SpendingPolicyRequired(e.into()), + bdk::Error::InvalidPolicyPathError(e) => { + BdkError::InvalidPolicyPathError(e.to_string()) + } + bdk::Error::Signer(e) => BdkError::Signer(e.to_string()), + bdk::Error::InvalidNetwork { requested, found } => BdkError::InvalidNetwork { + requested: requested.into(), + found: found.into(), + }, + bdk::Error::InvalidOutpoint(e) => BdkError::InvalidOutpoint(e.into()), + bdk::Error::Descriptor(e) => BdkError::Descriptor(e.into()), + bdk::Error::Encode(e) => BdkError::Encode(e.to_string()), + bdk::Error::Miniscript(e) => BdkError::Miniscript(e.to_string()), + bdk::Error::MiniscriptPsbt(e) => BdkError::MiniscriptPsbt(e.to_string()), + bdk::Error::Bip32(e) => BdkError::Bip32(e.to_string()), + bdk::Error::Secp256k1(e) => BdkError::Secp256k1(e.to_string()), + bdk::Error::Json(e) => BdkError::Json(e.to_string()), + bdk::Error::Hex(e) => BdkError::Hex(e.into()), + bdk::Error::Psbt(e) => BdkError::Psbt(e.to_string()), + bdk::Error::PsbtParse(e) => BdkError::PsbtParse(e.to_string()), + bdk::Error::MissingCachedScripts(e) => { + BdkError::MissingCachedScripts(e.missing_count, e.last_count) + } + bdk::Error::Electrum(e) => BdkError::Electrum(e.to_string()), + bdk::Error::Esplora(e) => BdkError::Esplora(e.to_string()), + bdk::Error::Sled(e) => BdkError::Sled(e.to_string()), + bdk::Error::Rpc(e) => BdkError::Rpc(e.to_string()), + bdk::Error::Rusqlite(e) => BdkError::Rusqlite(e.to_string()), + _ => BdkError::Generic("".to_string()), + } + } +} +#[derive(Debug)] +pub enum DescriptorError { + InvalidHdKeyPath, + InvalidDescriptorChecksum, + HardenedDerivationXpub, + MultiPath, + Key(String), + Policy(String), + InvalidDescriptorCharacter(u8), + Bip32(String), + Base58(String), + Pk(String), + Miniscript(String), + Hex(String), +} +impl From for BdkError { + fn from(value: BdkDescriptorError) -> Self { + BdkError::Descriptor(value.into()) + } +} +impl From for DescriptorError { + fn from(value: BdkDescriptorError) -> Self { + match value { + BdkDescriptorError::InvalidHdKeyPath => DescriptorError::InvalidHdKeyPath, + BdkDescriptorError::InvalidDescriptorChecksum => { + DescriptorError::InvalidDescriptorChecksum + } + BdkDescriptorError::HardenedDerivationXpub => DescriptorError::HardenedDerivationXpub, + BdkDescriptorError::MultiPath => DescriptorError::MultiPath, + BdkDescriptorError::Key(e) => DescriptorError::Key(e.to_string()), + BdkDescriptorError::Policy(e) => DescriptorError::Policy(e.to_string()), + BdkDescriptorError::InvalidDescriptorCharacter(e) => { + DescriptorError::InvalidDescriptorCharacter(e) + } + BdkDescriptorError::Bip32(e) => DescriptorError::Bip32(e.to_string()), + BdkDescriptorError::Base58(e) => DescriptorError::Base58(e.to_string()), + BdkDescriptorError::Pk(e) => DescriptorError::Pk(e.to_string()), + BdkDescriptorError::Miniscript(e) => DescriptorError::Miniscript(e.to_string()), + BdkDescriptorError::Hex(e) => DescriptorError::Hex(e.to_string()), + } + } +} +#[derive(Debug)] +pub enum HexError { + InvalidChar(u8), + OddLengthString(usize), + InvalidLength(usize, usize), +} + +impl From for HexError { + fn from(value: bdk::bitcoin::hashes::hex::Error) -> Self { + match value { + bdk::bitcoin::hashes::hex::Error::InvalidChar(e) => HexError::InvalidChar(e), + bdk::bitcoin::hashes::hex::Error::OddLengthString(e) => HexError::OddLengthString(e), + bdk::bitcoin::hashes::hex::Error::InvalidLength(e, f) => HexError::InvalidLength(e, f), + } + } +} + +#[derive(Debug)] +pub enum ConsensusError { + Io(String), + OversizedVectorAllocation { requested: usize, max: usize }, + InvalidChecksum { expected: [u8; 4], actual: [u8; 4] }, + NonMinimalVarInt, + ParseFailed(String), + UnsupportedSegwitFlag(u8), +} +impl From for BdkError { + fn from(value: bdk::bitcoin::consensus::encode::Error) -> Self { + BdkError::Consensus(value.into()) + } +} +impl From for ConsensusError { + fn from(value: bdk::bitcoin::consensus::encode::Error) -> Self { + match value { + bdk::bitcoin::consensus::encode::Error::Io(e) => ConsensusError::Io(e.to_string()), + bdk::bitcoin::consensus::encode::Error::OversizedVectorAllocation { + requested, + max, + } => ConsensusError::OversizedVectorAllocation { requested, max }, + bdk::bitcoin::consensus::encode::Error::InvalidChecksum { expected, actual } => { + ConsensusError::InvalidChecksum { expected, actual } + } + bdk::bitcoin::consensus::encode::Error::NonMinimalVarInt => { + ConsensusError::NonMinimalVarInt + } + bdk::bitcoin::consensus::encode::Error::ParseFailed(e) => { + ConsensusError::ParseFailed(e.to_string()) + } + bdk::bitcoin::consensus::encode::Error::UnsupportedSegwitFlag(e) => { + ConsensusError::UnsupportedSegwitFlag(e) + } + _ => unreachable!(), + } + } +} +#[derive(Debug)] +pub enum AddressError { + Base58(String), + Bech32(String), + EmptyBech32Payload, + InvalidBech32Variant { + expected: Variant, + found: Variant, + }, + InvalidWitnessVersion(u8), + UnparsableWitnessVersion(String), + MalformedWitnessVersion, + InvalidWitnessProgramLength(usize), + InvalidSegwitV0ProgramLength(usize), + UncompressedPubkey, + ExcessiveScriptSize, + UnrecognizedScript, + UnknownAddressType(String), + NetworkValidation { + network_required: Network, + network_found: Network, + address: String, + }, +} +impl From for BdkError { + fn from(value: bdk::bitcoin::address::Error) -> Self { + BdkError::Address(value.into()) + } +} + +impl From for AddressError { + fn from(value: bdk::bitcoin::address::Error) -> Self { + match value { + bdk::bitcoin::address::Error::Base58(e) => AddressError::Base58(e.to_string()), + bdk::bitcoin::address::Error::Bech32(e) => AddressError::Bech32(e.to_string()), + bdk::bitcoin::address::Error::EmptyBech32Payload => AddressError::EmptyBech32Payload, + bdk::bitcoin::address::Error::InvalidBech32Variant { expected, found } => { + AddressError::InvalidBech32Variant { + expected: expected.into(), + found: found.into(), + } + } + bdk::bitcoin::address::Error::InvalidWitnessVersion(e) => { + AddressError::InvalidWitnessVersion(e) + } + bdk::bitcoin::address::Error::UnparsableWitnessVersion(e) => { + AddressError::UnparsableWitnessVersion(e.to_string()) + } + bdk::bitcoin::address::Error::MalformedWitnessVersion => { + AddressError::MalformedWitnessVersion + } + bdk::bitcoin::address::Error::InvalidWitnessProgramLength(e) => { + AddressError::InvalidWitnessProgramLength(e) + } + bdk::bitcoin::address::Error::InvalidSegwitV0ProgramLength(e) => { + AddressError::InvalidSegwitV0ProgramLength(e) + } + bdk::bitcoin::address::Error::UncompressedPubkey => AddressError::UncompressedPubkey, + bdk::bitcoin::address::Error::ExcessiveScriptSize => AddressError::ExcessiveScriptSize, + bdk::bitcoin::address::Error::UnrecognizedScript => AddressError::UnrecognizedScript, + bdk::bitcoin::address::Error::UnknownAddressType(e) => { + AddressError::UnknownAddressType(e) + } + bdk::bitcoin::address::Error::NetworkValidation { + required, + found, + address, + } => AddressError::NetworkValidation { + network_required: required.into(), + network_found: found.into(), + address: address.assume_checked().to_string(), + }, + _ => unreachable!(), + } + } +} + +impl From for BdkError { + fn from(value: bdk::miniscript::Error) -> Self { + BdkError::Miniscript(value.to_string()) + } +} + +impl From for BdkError { + fn from(value: bdk::bitcoin::psbt::Error) -> Self { + BdkError::Psbt(value.to_string()) + } +} +impl From for BdkError { + fn from(value: bdk::bitcoin::psbt::PsbtParseError) -> Self { + BdkError::PsbtParse(value.to_string()) + } +} +impl From for BdkError { + fn from(value: bdk::keys::bip39::Error) -> Self { + BdkError::Bip39(value.to_string()) + } +} diff --git a/rust/src/api/key.rs b/rust/src/api/key.rs new file mode 100644 index 00000000..ef55b4c2 --- /dev/null +++ b/rust/src/api/key.rs @@ -0,0 +1,297 @@ +use crate::api::error::BdkError; +use crate::api::types::{Network, WordCount}; +use crate::frb_generated::RustOpaque; +pub use bdk::bitcoin; +use bdk::bitcoin::secp256k1::Secp256k1; +pub use bdk::keys; +use bdk::keys::bip39::Language; +use bdk::keys::{DerivableKey, GeneratableKey}; +use bdk::miniscript::descriptor::{DescriptorXKey, Wildcard}; +use bdk::miniscript::BareCtx; +use flutter_rust_bridge::frb; +use std::str::FromStr; + +pub struct BdkMnemonic { + pub ptr: RustOpaque, +} +impl From for BdkMnemonic { + fn from(value: keys::bip39::Mnemonic) -> Self { + Self { + ptr: RustOpaque::new(value), + } + } +} +impl BdkMnemonic { + /// Generates Mnemonic with a random entropy + pub fn new(word_count: WordCount) -> Result { + let generated_key: keys::GeneratedKey<_, BareCtx> = + (match keys::bip39::Mnemonic::generate((word_count.into(), Language::English)) { + Ok(value) => Ok(value), + Err(Some(err)) => Err(BdkError::Bip39(err.to_string())), + Err(None) => Err(BdkError::Generic("".to_string())), // If + })?; + + keys::bip39::Mnemonic::parse_in(Language::English, generated_key.to_string()) + .map(|e| e.into()) + .map_err(|e| BdkError::Bip39(e.to_string())) + } + + /// Parse a Mnemonic with given string + pub fn from_string(mnemonic: String) -> Result { + keys::bip39::Mnemonic::from_str(&mnemonic) + .map(|m| m.into()) + .map_err(|e| BdkError::Bip39(e.to_string())) + } + + /// Create a new Mnemonic in the specified language from the given entropy. + /// Entropy must be a multiple of 32 bits (4 bytes) and 128-256 bits in length. + pub fn from_entropy(entropy: Vec) -> Result { + keys::bip39::Mnemonic::from_entropy(entropy.as_slice()) + .map(|m| m.into()) + .map_err(|e| BdkError::Bip39(e.to_string())) + } + + #[frb(sync)] + pub fn as_string(&self) -> String { + self.ptr.to_string() + } +} + +pub struct BdkDerivationPath { + pub ptr: RustOpaque, +} +impl From for BdkDerivationPath { + fn from(value: bitcoin::bip32::DerivationPath) -> Self { + BdkDerivationPath { + ptr: RustOpaque::new(value), + } + } +} + +impl BdkDerivationPath { + pub fn from_string(path: String) -> Result { + bitcoin::bip32::DerivationPath::from_str(&path) + .map(|e| e.into()) + .map_err(|e| BdkError::Generic(e.to_string())) + } + #[frb(sync)] + pub fn as_string(&self) -> String { + self.ptr.to_string() + } +} + +#[derive(Debug)] +pub struct BdkDescriptorSecretKey { + pub ptr: RustOpaque, +} +impl From for BdkDescriptorSecretKey { + fn from(value: keys::DescriptorSecretKey) -> Self { + Self { + ptr: RustOpaque::new(value), + } + } +} +impl BdkDescriptorSecretKey { + pub fn create( + network: Network, + mnemonic: BdkMnemonic, + password: Option, + ) -> Result { + let mnemonic = (*mnemonic.ptr).clone(); + let xkey: keys::ExtendedKey = (mnemonic, password) + .into_extended_key() + .map_err(|e| BdkError::Key(e.to_string()))?; + let xpriv = if let Some(e) = xkey.into_xprv(network.into()) { + Ok(e) + } else { + Err(BdkError::Generic( + "private data not found in the key!".to_string(), + )) + }; + let descriptor_secret_key = keys::DescriptorSecretKey::XPrv(DescriptorXKey { + origin: None, + xkey: xpriv?, + derivation_path: bitcoin::bip32::DerivationPath::master(), + wildcard: Wildcard::Unhardened, + }); + Ok(descriptor_secret_key.into()) + } + + pub fn derive(ptr: BdkDescriptorSecretKey, path: BdkDerivationPath) -> Result { + let secp = Secp256k1::new(); + let descriptor_secret_key = (*ptr.ptr).clone(); + match descriptor_secret_key { + keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { + let derived_xprv = descriptor_x_key + .xkey + .derive_priv(&secp, &(*path.ptr).clone()) + .map_err(|e| BdkError::Bip32(e.to_string()))?; + let key_source = match descriptor_x_key.origin.clone() { + Some((fingerprint, origin_path)) => { + (fingerprint, origin_path.extend(&(*path.ptr).clone())) + } + None => ( + descriptor_x_key.xkey.fingerprint(&secp), + (*path.ptr).clone(), + ), + }; + let derived_descriptor_secret_key = + keys::DescriptorSecretKey::XPrv(DescriptorXKey { + origin: Some(key_source), + xkey: derived_xprv, + derivation_path: bitcoin::bip32::DerivationPath::default(), + wildcard: descriptor_x_key.wildcard, + }); + Ok(derived_descriptor_secret_key.into()) + } + keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + pub fn extend(ptr: BdkDescriptorSecretKey, path: BdkDerivationPath) -> Result { + let descriptor_secret_key = (*ptr.ptr).clone(); + match descriptor_secret_key { + keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { + let extended_path = descriptor_x_key.derivation_path.extend((*path.ptr).clone()); + let extended_descriptor_secret_key = + keys::DescriptorSecretKey::XPrv(DescriptorXKey { + origin: descriptor_x_key.origin.clone(), + xkey: descriptor_x_key.xkey, + derivation_path: extended_path, + wildcard: descriptor_x_key.wildcard, + }); + Ok(extended_descriptor_secret_key.into()) + } + keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + #[frb(sync)] + pub fn as_public(ptr: BdkDescriptorSecretKey) -> Result { + let secp = Secp256k1::new(); + let descriptor_public_key = ptr + .ptr + .to_public(&secp) + .map_err(|e| BdkError::Generic(e.to_string()))?; + Ok(descriptor_public_key.into()) + } + #[frb(sync)] + /// Get the private key as bytes. + pub fn secret_bytes(&self) -> Result, BdkError> { + let descriptor_secret_key = &*self.ptr; + match descriptor_secret_key { + keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { + Ok(descriptor_x_key.xkey.private_key.secret_bytes().to_vec()) + } + keys::DescriptorSecretKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + pub fn from_string(secret_key: String) -> Result { + let key = keys::DescriptorSecretKey::from_str(&*secret_key) + .map_err(|e| BdkError::Generic(e.to_string()))?; + Ok(key.into()) + } + #[frb(sync)] + pub fn as_string(&self) -> String { + self.ptr.to_string() + } +} +#[derive(Debug)] +pub struct BdkDescriptorPublicKey { + pub ptr: RustOpaque, +} +impl From for BdkDescriptorPublicKey { + fn from(value: keys::DescriptorPublicKey) -> Self { + Self { + ptr: RustOpaque::new(value), + } + } +} + +impl BdkDescriptorPublicKey { + pub fn from_string(public_key: String) -> Result { + keys::DescriptorPublicKey::from_str(public_key.as_str()) + .map_err(|e| BdkError::Generic(e.to_string())) + .map(|e| e.into()) + } + pub fn derive(ptr: BdkDescriptorPublicKey, path: BdkDerivationPath) -> Result { + let secp = Secp256k1::new(); + let descriptor_public_key = (*ptr.ptr).clone(); + match descriptor_public_key { + keys::DescriptorPublicKey::XPub(descriptor_x_key) => { + let derived_xpub = descriptor_x_key + .xkey + .derive_pub(&secp, &(*path.ptr).clone()) + .map_err(|e| BdkError::Bip32(e.to_string()))?; + let key_source = match descriptor_x_key.origin.clone() { + Some((fingerprint, origin_path)) => { + (fingerprint, origin_path.extend(&(*path.ptr).clone())) + } + None => (descriptor_x_key.xkey.fingerprint(), (*path.ptr).clone()), + }; + let derived_descriptor_public_key = + keys::DescriptorPublicKey::XPub(DescriptorXKey { + origin: Some(key_source), + xkey: derived_xpub, + derivation_path: bitcoin::bip32::DerivationPath::default(), + wildcard: descriptor_x_key.wildcard, + }); + Ok(Self { + ptr: RustOpaque::new(derived_descriptor_public_key), + }) + } + keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( + "Cannot derive from a single key".to_string(), + )), + keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( + "Cannot derive from a multi key".to_string(), + )), + } + } + + pub fn extend(ptr: BdkDescriptorPublicKey, path: BdkDerivationPath) -> Result { + let descriptor_public_key = (*ptr.ptr).clone(); + match descriptor_public_key { + keys::DescriptorPublicKey::XPub(descriptor_x_key) => { + let extended_path = descriptor_x_key + .derivation_path + .extend(&(*path.ptr).clone()); + let extended_descriptor_public_key = + keys::DescriptorPublicKey::XPub(DescriptorXKey { + origin: descriptor_x_key.origin.clone(), + xkey: descriptor_x_key.xkey, + derivation_path: extended_path, + wildcard: descriptor_x_key.wildcard, + }); + Ok(Self { + ptr: RustOpaque::new(extended_descriptor_public_key), + }) + } + keys::DescriptorPublicKey::Single(_) => Err(BdkError::Generic( + "Cannot extend from a single key".to_string(), + )), + keys::DescriptorPublicKey::MultiXPub(_) => Err(BdkError::Generic( + "Cannot extend from a multi key".to_string(), + )), + } + } + + #[frb(sync)] + pub fn as_string(&self) -> String { + self.ptr.to_string() + } +} diff --git a/rust/src/api/mod.rs b/rust/src/api/mod.rs new file mode 100644 index 00000000..acf4d1d3 --- /dev/null +++ b/rust/src/api/mod.rs @@ -0,0 +1,24 @@ +use std::{fmt::Debug, sync::Mutex}; + +use error::BdkError; + +pub mod blockchain; +pub mod descriptor; +pub mod error; +pub mod key; +pub mod psbt; +pub mod types; +pub mod wallet; + +pub(crate) fn execute_with_lock(lock: &Mutex, operation: F) -> Result +where + T: Debug, + F: FnOnce(&mut T) -> R, +{ + lock.lock() + .map_err(|poisoned| { + drop(poisoned.into_inner()); + BdkError::Generic("Poison Error!".to_string()) + }) + .map(|mut guard| operation(&mut *guard)) +} diff --git a/rust/src/api/psbt.rs b/rust/src/api/psbt.rs new file mode 100644 index 00000000..c31e9520 --- /dev/null +++ b/rust/src/api/psbt.rs @@ -0,0 +1,101 @@ +use crate::api::error::BdkError; +use crate::api::types::{BdkTransaction, FeeRate}; +use crate::frb_generated::RustOpaque; + +use bdk::psbt::PsbtUtils; +use std::ops::Deref; +use std::str::FromStr; + +use flutter_rust_bridge::frb; + +use super::execute_with_lock; + +#[derive(Debug)] +pub struct BdkPsbt { + pub ptr: RustOpaque>, +} + +impl From for BdkPsbt { + fn from(value: bdk::bitcoin::psbt::PartiallySignedTransaction) -> Self { + Self { + ptr: RustOpaque::new(std::sync::Mutex::new(value)), + } + } +} +impl BdkPsbt { + pub fn from_str(psbt_base64: String) -> Result { + let psbt: bdk::bitcoin::psbt::PartiallySignedTransaction = + bdk::bitcoin::psbt::PartiallySignedTransaction::from_str(&psbt_base64)?; + Ok(psbt.into()) + } + + #[frb(sync)] + pub fn as_string(&self) -> Result { + execute_with_lock(&self.ptr, |psbt| psbt.to_string()) + } + + ///Computes the `Txid`. + /// Hashes the transaction excluding the segwit data (i. e. the marker, flag bytes, and the witness fields themselves). + /// For non-segwit transactions which do not have any segwit data, this will be equal to transaction.wtxid(). + #[frb(sync)] + pub fn txid(&self) -> Result { + execute_with_lock(&self.ptr, |psbt| { + psbt.to_owned().extract_tx().txid().to_string() + }) + } + + /// Return the transaction. + #[frb(sync)] + pub fn extract_tx(ptr: BdkPsbt) -> Result { + execute_with_lock(&ptr.ptr, |psbt| { + let tx = psbt.to_owned().extract_tx(); + tx.try_into() + })? + } + + /// Combines this PartiallySignedTransaction with other PSBT as described by BIP 174. + /// + /// In accordance with BIP 174 this function is commutative i.e., `A.combine(B) == B.combine(A)` + pub fn combine(ptr: BdkPsbt, other: BdkPsbt) -> Result { + let other_psbt = other + .ptr + .lock() + .map_err(|_| BdkError::Generic("Poison Error!".to_string()))? + .clone(); + let mut original_psbt = ptr + .ptr + .lock() + .map_err(|_| BdkError::Generic("Poison Error!".to_string()))?; + original_psbt.combine(other_psbt)?; + Ok(original_psbt.to_owned().into()) + } + + /// The total transaction fee amount, sum of input amounts minus sum of output amounts, in Sats. + /// If the PSBT is missing a TxOut for an input returns None. + #[frb(sync)] + pub fn fee_amount(&self) -> Result, BdkError> { + execute_with_lock(&self.ptr, |psbt| psbt.fee_amount()) + } + + /// The transaction's fee rate. This value will only be accurate if calculated AFTER the + /// `PartiallySignedTransaction` is finalized and all witness/signature data is added to the + /// transaction. + /// If the PSBT is missing a TxOut for an input returns None. + #[frb(sync)] + pub fn fee_rate(&self) -> Result, BdkError> { + execute_with_lock(&self.ptr, |psbt| psbt.fee_rate().map(|e| e.into())) + } + + ///Serialize as raw binary data + #[frb(sync)] + pub fn serialize(&self) -> Result, BdkError> { + execute_with_lock(&self.ptr, |psbt| psbt.serialize()) + } + /// Serialize the PSBT data structure as a String of JSON. + #[frb(sync)] + pub fn json_serialize(&self) -> Result { + execute_with_lock(&self.ptr, |psbt| { + serde_json::to_string(psbt.deref()).map_err(|e| BdkError::Generic(e.to_string())) + })? + } +} diff --git a/rust/src/api/types.rs b/rust/src/api/types.rs new file mode 100644 index 00000000..a721c5cb --- /dev/null +++ b/rust/src/api/types.rs @@ -0,0 +1,1168 @@ +use crate::api::error::{BdkError, HexError}; +use crate::frb_generated::RustOpaque; +use bdk::bitcoin::consensus::{serialize, Decodable}; +use bdk::bitcoin::hashes::hex::Error; +use bdk::database::AnyDatabaseConfig; +use flutter_rust_bridge::frb; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; +use std::io::Cursor; +use std::str::FromStr; + +/// A reference to a transaction output. +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +pub struct OutPoint { + /// The referenced transaction's txid. + pub(crate) txid: String, + /// The index of the referenced output in its transaction's vout. + pub(crate) vout: u32, +} +impl TryFrom<&OutPoint> for bdk::bitcoin::OutPoint { + type Error = BdkError; + + fn try_from(x: &OutPoint) -> Result { + Ok(bdk::bitcoin::OutPoint { + txid: bdk::bitcoin::Txid::from_str(x.txid.as_str()).map_err(|e| match e { + Error::InvalidChar(e) => BdkError::Hex(HexError::InvalidChar(e)), + Error::OddLengthString(e) => BdkError::Hex(HexError::OddLengthString(e)), + Error::InvalidLength(e, f) => BdkError::Hex(HexError::InvalidLength(e, f)), + })?, + vout: x.clone().vout, + }) + } +} +impl From for OutPoint { + fn from(x: bdk::bitcoin::OutPoint) -> OutPoint { + OutPoint { + txid: x.txid.to_string(), + vout: x.clone().vout, + } + } +} +#[derive(Debug, Clone)] +pub struct TxIn { + pub previous_output: OutPoint, + pub script_sig: BdkScriptBuf, + pub sequence: u32, + pub witness: Vec>, +} +impl TryFrom<&TxIn> for bdk::bitcoin::TxIn { + type Error = BdkError; + + fn try_from(x: &TxIn) -> Result { + Ok(bdk::bitcoin::TxIn { + previous_output: (&x.previous_output).try_into()?, + script_sig: x.clone().script_sig.into(), + sequence: bdk::bitcoin::blockdata::transaction::Sequence::from_consensus( + x.sequence.clone(), + ), + witness: bdk::bitcoin::blockdata::witness::Witness::from_slice( + x.clone().witness.as_slice(), + ), + }) + } +} +impl From<&bdk::bitcoin::TxIn> for TxIn { + fn from(x: &bdk::bitcoin::TxIn) -> Self { + TxIn { + previous_output: x.previous_output.into(), + script_sig: x.clone().script_sig.into(), + sequence: x.clone().sequence.0, + witness: x.witness.to_vec(), + } + } +} +///A transaction output, which defines new coins to be created from old ones. +pub struct TxOut { + /// The value of the output, in satoshis. + pub value: u64, + /// The address of the output. + pub script_pubkey: BdkScriptBuf, +} +impl From for bdk::bitcoin::TxOut { + fn from(value: TxOut) -> Self { + Self { + value: value.value, + script_pubkey: value.script_pubkey.into(), + } + } +} +impl From<&bdk::bitcoin::TxOut> for TxOut { + fn from(x: &bdk::bitcoin::TxOut) -> Self { + TxOut { + value: x.clone().value, + script_pubkey: x.clone().script_pubkey.into(), + } + } +} +impl From<&TxOut> for bdk::bitcoin::TxOut { + fn from(x: &TxOut) -> Self { + Self { + value: x.value, + script_pubkey: x.script_pubkey.clone().into(), + } + } +} +#[derive(Clone, Debug)] +pub struct BdkScriptBuf { + pub bytes: Vec, +} +impl From for BdkScriptBuf { + fn from(value: bdk::bitcoin::ScriptBuf) -> Self { + Self { + bytes: value.as_bytes().to_vec(), + } + } +} +impl From for bdk::bitcoin::ScriptBuf { + fn from(value: BdkScriptBuf) -> Self { + bdk::bitcoin::ScriptBuf::from_bytes(value.bytes) + } +} +impl BdkScriptBuf { + #[frb(sync)] + ///Creates a new empty script. + pub fn empty() -> BdkScriptBuf { + bdk::bitcoin::ScriptBuf::new().into() + } + ///Creates a new empty script with pre-allocated capacity. + pub fn with_capacity(capacity: usize) -> BdkScriptBuf { + bdk::bitcoin::ScriptBuf::with_capacity(capacity).into() + } + + pub fn from_hex(s: String) -> Result { + bdk::bitcoin::ScriptBuf::from_hex(s.as_str()) + .map(|e| e.into()) + .map_err(|e| match e { + Error::InvalidChar(e) => BdkError::Hex(HexError::InvalidChar(e)), + Error::OddLengthString(e) => BdkError::Hex(HexError::OddLengthString(e)), + Error::InvalidLength(e, f) => BdkError::Hex(HexError::InvalidLength(e, f)), + }) + } + #[frb(sync)] + pub fn as_string(&self) -> String { + let script: bdk::bitcoin::ScriptBuf = self.to_owned().into(); + script.to_string() + } +} +pub struct PsbtSigHashType { + pub inner: u32, +} +impl From for bdk::bitcoin::psbt::PsbtSighashType { + fn from(value: PsbtSigHashType) -> Self { + bdk::bitcoin::psbt::PsbtSighashType::from_u32(value.inner) + } +} +/// Local Wallet's Balance +#[derive(Deserialize, Debug)] +pub struct Balance { + // All coinbase outputs not yet matured + pub immature: u64, + /// Unconfirmed UTXOs generated by a wallet tx + pub trusted_pending: u64, + /// Unconfirmed UTXOs received from an external wallet + pub untrusted_pending: u64, + /// Confirmed and immediately spendable balance + pub confirmed: u64, + /// Get sum of trusted_pending and confirmed coins + pub spendable: u64, + /// Get the whole balance visible to the wallet + pub total: u64, +} +impl From for Balance { + fn from(value: bdk::Balance) -> Self { + Balance { + immature: value.immature, + trusted_pending: value.trusted_pending, + untrusted_pending: value.untrusted_pending, + confirmed: value.confirmed, + spendable: value.get_spendable(), + total: value.get_total(), + } + } +} +/// The address index selection strategy to use to derived an address from the wallet's external +/// descriptor. +pub enum AddressIndex { + ///Return a new address after incrementing the current descriptor index. + Increase, + ///Return the address for the current descriptor index if it has not been used in a received transaction. Otherwise return a new address as with AddressIndex.New. + ///Use with caution, if the wallet has not yet detected an address has been used it could return an already used address. This function is primarily meant for situations where the caller is untrusted; for example when deriving donation addresses on-demand for a public web page. + LastUnused, + /// Return the address for a specific descriptor index. Does not change the current descriptor + /// index used by `AddressIndex` and `AddressIndex.LastUsed`. + /// Use with caution, if an index is given that is less than the current descriptor index + /// then the returned address may have already been used. + Peek { index: u32 }, + /// Return the address for a specific descriptor index and reset the current descriptor index + /// used by `AddressIndex` and `AddressIndex.LastUsed` to this value. + /// Use with caution, if an index is given that is less than the current descriptor index + /// then the returned address and subsequent addresses returned by calls to `AddressIndex` + /// and `AddressIndex.LastUsed` may have already been used. Also if the index is reset to a + /// value earlier than the Blockchain stopGap (default is 20) then a + /// larger stopGap should be used to monitor for all possibly used addresses. + Reset { index: u32 }, +} +impl From for bdk::wallet::AddressIndex { + fn from(x: AddressIndex) -> bdk::wallet::AddressIndex { + match x { + AddressIndex::Increase => bdk::wallet::AddressIndex::New, + AddressIndex::LastUnused => bdk::wallet::AddressIndex::LastUnused, + AddressIndex::Peek { index } => bdk::wallet::AddressIndex::Peek(index), + AddressIndex::Reset { index } => bdk::wallet::AddressIndex::Reset(index), + } + } +} +#[derive(Debug, Clone, PartialEq, Eq)] +///A wallet transaction +pub struct TransactionDetails { + pub transaction: Option, + /// Transaction id. + pub txid: String, + /// Received value (sats) + /// Sum of owned outputs of this transaction. + pub received: u64, + /// Sent value (sats) + /// Sum of owned inputs of this transaction. + pub sent: u64, + /// Fee value (sats) if confirmed. + /// The availability of the fee depends on the backend. It's never None with an Electrum + /// Server backend, but it could be None with a Bitcoin RPC node without txindex that receive + /// funds while offline. + pub fee: Option, + /// If the transaction is confirmed, contains height and timestamp of the block containing the + /// transaction, unconfirmed transaction contains `None`. + pub confirmation_time: Option, +} +/// A wallet transaction +impl TryFrom<&bdk::TransactionDetails> for TransactionDetails { + type Error = BdkError; + + fn try_from(x: &bdk::TransactionDetails) -> Result { + let transaction: Option = if let Some(tx) = x.transaction.clone() { + Some(tx.try_into()?) + } else { + None + }; + Ok(TransactionDetails { + transaction, + fee: x.clone().fee, + txid: x.clone().txid.to_string(), + received: x.clone().received, + sent: x.clone().sent, + confirmation_time: x.confirmation_time.clone().map(|e| e.into()), + }) + } +} +impl TryFrom for TransactionDetails { + type Error = BdkError; + + fn try_from(x: bdk::TransactionDetails) -> Result { + let transaction: Option = if let Some(tx) = x.transaction { + Some(tx.try_into()?) + } else { + None + }; + Ok(TransactionDetails { + transaction, + fee: x.fee, + txid: x.txid.to_string(), + received: x.received, + sent: x.sent, + confirmation_time: x.confirmation_time.map(|e| e.into()), + }) + } +} +#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] +///Block height and timestamp of a block +pub struct BlockTime { + ///Confirmation block height + pub height: u32, + ///Confirmation block timestamp + pub timestamp: u64, +} +impl From for BlockTime { + fn from(value: bdk::BlockTime) -> Self { + Self { + height: value.height, + timestamp: value.timestamp, + } + } +} +/// A output script and an amount of satoshis. +pub struct ScriptAmount { + pub script: BdkScriptBuf, + pub amount: u64, +} +#[allow(dead_code)] +#[derive(Clone, Debug)] +pub enum RbfValue { + RbfDefault, + Value(u32), +} +#[derive(Debug, Clone)] +///The cryptocurrency to act on +pub enum Network { + ///Bitcoin’s testnet + Testnet, + ///Bitcoin’s regtest + Regtest, + ///Classic Bitcoin + Bitcoin, + ///Bitcoin’s signet + Signet, +} +impl Default for Network { + fn default() -> Self { + Network::Testnet + } +} +impl From for bdk::bitcoin::Network { + fn from(network: Network) -> Self { + match network { + Network::Signet => bdk::bitcoin::Network::Signet, + Network::Testnet => bdk::bitcoin::Network::Testnet, + Network::Regtest => bdk::bitcoin::Network::Regtest, + Network::Bitcoin => bdk::bitcoin::Network::Bitcoin, + } + } +} +impl From for Network { + fn from(network: bdk::bitcoin::Network) -> Self { + match network { + bdk::bitcoin::Network::Signet => Network::Signet, + bdk::bitcoin::Network::Testnet => Network::Testnet, + bdk::bitcoin::Network::Regtest => Network::Regtest, + bdk::bitcoin::Network::Bitcoin => Network::Bitcoin, + _ => unreachable!(), + } + } +} +///Type describing entropy length (aka word count) in the mnemonic +pub enum WordCount { + ///12 words mnemonic (128 bits entropy) + Words12, + ///18 words mnemonic (192 bits entropy) + Words18, + ///24 words mnemonic (256 bits entropy) + Words24, +} +impl From for bdk::keys::bip39::WordCount { + fn from(word_count: WordCount) -> Self { + match word_count { + WordCount::Words12 => bdk::keys::bip39::WordCount::Words12, + WordCount::Words18 => bdk::keys::bip39::WordCount::Words18, + WordCount::Words24 => bdk::keys::bip39::WordCount::Words24, + } + } +} +/// The method used to produce an address. +#[derive(Debug)] +pub enum Payload { + /// P2PKH address. + PubkeyHash { pubkey_hash: String }, + /// P2SH address. + ScriptHash { script_hash: String }, + /// Segwit address. + WitnessProgram { + /// The witness program version. + version: WitnessVersion, + /// The witness program. + program: Vec, + }, +} +#[derive(Debug, Clone)] +pub enum WitnessVersion { + /// Initial version of witness program. Used for P2WPKH and P2WPK outputs + V0 = 0, + /// Version of witness program used for Taproot P2TR outputs. + V1 = 1, + /// Future (unsupported) version of witness program. + V2 = 2, + /// Future (unsupported) version of witness program. + V3 = 3, + /// Future (unsupported) version of witness program. + V4 = 4, + /// Future (unsupported) version of witness program. + V5 = 5, + /// Future (unsupported) version of witness program. + V6 = 6, + /// Future (unsupported) version of witness program. + V7 = 7, + /// Future (unsupported) version of witness program. + V8 = 8, + /// Future (unsupported) version of witness program. + V9 = 9, + /// Future (unsupported) version of witness program. + V10 = 10, + /// Future (unsupported) version of witness program. + V11 = 11, + /// Future (unsupported) version of witness program. + V12 = 12, + /// Future (unsupported) version of witness program. + V13 = 13, + /// Future (unsupported) version of witness program. + V14 = 14, + /// Future (unsupported) version of witness program. + V15 = 15, + /// Future (unsupported) version of witness program. + V16 = 16, +} +impl From for WitnessVersion { + fn from(value: bdk::bitcoin::address::WitnessVersion) -> Self { + match value { + bdk::bitcoin::address::WitnessVersion::V0 => WitnessVersion::V0, + bdk::bitcoin::address::WitnessVersion::V1 => WitnessVersion::V1, + bdk::bitcoin::address::WitnessVersion::V2 => WitnessVersion::V2, + bdk::bitcoin::address::WitnessVersion::V3 => WitnessVersion::V3, + bdk::bitcoin::address::WitnessVersion::V4 => WitnessVersion::V4, + bdk::bitcoin::address::WitnessVersion::V5 => WitnessVersion::V5, + bdk::bitcoin::address::WitnessVersion::V6 => WitnessVersion::V6, + bdk::bitcoin::address::WitnessVersion::V7 => WitnessVersion::V7, + bdk::bitcoin::address::WitnessVersion::V8 => WitnessVersion::V8, + bdk::bitcoin::address::WitnessVersion::V9 => WitnessVersion::V9, + bdk::bitcoin::address::WitnessVersion::V10 => WitnessVersion::V10, + bdk::bitcoin::address::WitnessVersion::V11 => WitnessVersion::V11, + bdk::bitcoin::address::WitnessVersion::V12 => WitnessVersion::V12, + bdk::bitcoin::address::WitnessVersion::V13 => WitnessVersion::V13, + bdk::bitcoin::address::WitnessVersion::V14 => WitnessVersion::V14, + bdk::bitcoin::address::WitnessVersion::V15 => WitnessVersion::V15, + bdk::bitcoin::address::WitnessVersion::V16 => WitnessVersion::V16, + } + } +} +pub enum ChangeSpendPolicy { + ChangeAllowed, + OnlyChange, + ChangeForbidden, +} +impl From for bdk::wallet::tx_builder::ChangeSpendPolicy { + fn from(value: ChangeSpendPolicy) -> Self { + match value { + ChangeSpendPolicy::ChangeAllowed => { + bdk::wallet::tx_builder::ChangeSpendPolicy::ChangeAllowed + } + ChangeSpendPolicy::OnlyChange => bdk::wallet::tx_builder::ChangeSpendPolicy::OnlyChange, + ChangeSpendPolicy::ChangeForbidden => { + bdk::wallet::tx_builder::ChangeSpendPolicy::ChangeForbidden + } + } + } +} +pub struct BdkAddress { + pub ptr: RustOpaque, +} +impl From for BdkAddress { + fn from(value: bdk::bitcoin::Address) -> Self { + Self { + ptr: RustOpaque::new(value), + } + } +} +impl From<&BdkAddress> for bdk::bitcoin::Address { + fn from(value: &BdkAddress) -> Self { + (*value.ptr).clone() + } +} +impl BdkAddress { + pub fn from_string(address: String, network: Network) -> Result { + match bdk::bitcoin::Address::from_str(address.as_str()) { + Ok(e) => match e.require_network(network.into()) { + Ok(e) => Ok(e.into()), + Err(e) => Err(e.into()), + }, + Err(e) => Err(e.into()), + } + } + + pub fn from_script(script: BdkScriptBuf, network: Network) -> Result { + bdk::bitcoin::Address::from_script( + >::into(script).as_script(), + network.into(), + ) + .map(|a| a.into()) + .map_err(|e| e.into()) + } + #[frb(sync)] + pub fn payload(&self) -> Payload { + match <&BdkAddress as Into>::into(self).payload { + bdk::bitcoin::address::Payload::PubkeyHash(pubkey_hash) => Payload::PubkeyHash { + pubkey_hash: pubkey_hash.to_string(), + }, + bdk::bitcoin::address::Payload::ScriptHash(script_hash) => Payload::ScriptHash { + script_hash: script_hash.to_string(), + }, + bdk::bitcoin::address::Payload::WitnessProgram(e) => Payload::WitnessProgram { + version: e.version().into(), + program: e.program().as_bytes().to_vec(), + }, + _ => unreachable!(), + } + } + + #[frb(sync)] + pub fn to_qr_uri(&self) -> String { + self.ptr.to_qr_uri() + } + + #[frb(sync)] + pub fn network(&self) -> Network { + self.ptr.network.into() + } + #[frb(sync)] + pub fn script(ptr: BdkAddress) -> BdkScriptBuf { + ptr.ptr.script_pubkey().into() + } + + #[frb(sync)] + pub fn is_valid_for_network(&self, network: Network) -> bool { + if let Ok(unchecked_address) = self + .ptr + .to_string() + .parse::>() + { + unchecked_address.is_valid_for_network(network.into()) + } else { + false + } + } + #[frb(sync)] + pub fn as_string(&self) -> String { + self.ptr.to_string() + } +} +#[derive(Debug)] +pub enum Variant { + Bech32, + Bech32m, +} +impl From for Variant { + fn from(value: bdk::bitcoin::bech32::Variant) -> Self { + match value { + bdk::bitcoin::bech32::Variant::Bech32 => Variant::Bech32, + bdk::bitcoin::bech32::Variant::Bech32m => Variant::Bech32m, + } + } +} +#[derive(Debug, Clone)] +pub enum LockTime { + Blocks(u32), + Seconds(u32), +} + +impl TryFrom for bdk::bitcoin::blockdata::locktime::absolute::LockTime { + type Error = BdkError; + + fn try_from(value: LockTime) -> Result { + match value { + LockTime::Blocks(e) => Ok( + bdk::bitcoin::blockdata::locktime::absolute::LockTime::Blocks( + bdk::bitcoin::blockdata::locktime::absolute::Height::from_consensus(e) + .map_err(|e| BdkError::InvalidLockTime(e.to_string()))?, + ), + ), + LockTime::Seconds(e) => Ok( + bdk::bitcoin::blockdata::locktime::absolute::LockTime::Seconds( + bdk::bitcoin::blockdata::locktime::absolute::Time::from_consensus(e) + .map_err(|e| BdkError::InvalidLockTime(e.to_string()))?, + ), + ), + } + } +} + +impl From for LockTime { + fn from(value: bdk::bitcoin::blockdata::locktime::absolute::LockTime) -> Self { + match value { + bdk::bitcoin::blockdata::locktime::absolute::LockTime::Blocks(e) => { + LockTime::Blocks(e.to_consensus_u32()) + } + bdk::bitcoin::blockdata::locktime::absolute::LockTime::Seconds(e) => { + LockTime::Seconds(e.to_consensus_u32()) + } + } + } +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct BdkTransaction { + pub s: String, +} +impl BdkTransaction { + pub fn new( + version: i32, + lock_time: LockTime, + input: Vec, + output: Vec, + ) -> Result { + let mut inputs: Vec = vec![]; + for e in input.iter() { + inputs.push(e.try_into()?); + } + let output = output + .into_iter() + .map(|e| <&TxOut as Into>::into(&e)) + .collect(); + + (bdk::bitcoin::Transaction { + version, + lock_time: lock_time.try_into()?, + input: inputs, + output, + }) + .try_into() + } + pub fn from_bytes(transaction_bytes: Vec) -> Result { + let mut decoder = Cursor::new(transaction_bytes); + let tx: bdk::bitcoin::transaction::Transaction = + bdk::bitcoin::transaction::Transaction::consensus_decode(&mut decoder)?; + tx.try_into() + } + ///Computes the txid. For non-segwit transactions this will be identical to the output of wtxid(), + /// but for segwit transactions, this will give the correct txid (not including witnesses) while wtxid will also hash witnesses. + pub fn txid(&self) -> Result { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.txid().to_string()) + } + ///Returns the regular byte-wise consensus-serialized size of this transaction. + pub fn weight(&self) -> Result { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.weight().to_wu()) + } + ///Returns the regular byte-wise consensus-serialized size of this transaction. + pub fn size(&self) -> Result { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.size() as u64) + } + ///Returns the “virtual size†(vsize) of this transaction. + /// + // Will be ceil(weight / 4.0). Note this implements the virtual size as per BIP141, which is different to what is implemented in Bitcoin Core. + // The computation should be the same for any remotely sane transaction, and a standardness-rule-correct version is available in the policy module. + pub fn vsize(&self) -> Result { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.vsize() as u64) + } + ///Encodes an object into a vector. + pub fn serialize(&self) -> Result, BdkError> { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| serialize(&e)) + } + ///Is this a coin base transaction? + pub fn is_coin_base(&self) -> Result { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.is_coin_base()) + } + ///Returns true if the transaction itself opted in to be BIP-125-replaceable (RBF). + /// This does not cover the case where a transaction becomes replaceable due to ancestors being RBF. + pub fn is_explicitly_rbf(&self) -> Result { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.is_explicitly_rbf()) + } + ///Returns true if this transactions nLockTime is enabled (BIP-65 ). + pub fn is_lock_time_enabled(&self) -> Result { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.is_lock_time_enabled()) + } + ///The protocol version, is currently expected to be 1 or 2 (BIP 68). + pub fn version(&self) -> Result { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.version) + } + ///Block height or timestamp. Transaction cannot be included in a block until this height/time. + pub fn lock_time(&self) -> Result { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.lock_time.into()) + } + ///List of transaction inputs. + pub fn input(&self) -> Result, BdkError> { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.input.iter().map(|x| x.into()).collect()) + } + ///List of transaction outputs. + pub fn output(&self) -> Result, BdkError> { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.output.iter().map(|x| x.into()).collect()) + } +} +impl TryFrom for BdkTransaction { + type Error = BdkError; + fn try_from(tx: bdk::bitcoin::Transaction) -> Result { + Ok(BdkTransaction { + s: serde_json::to_string(&tx) + .map_err(|e| BdkError::InvalidTransaction(e.to_string()))?, + }) + } +} +impl TryFrom<&BdkTransaction> for bdk::bitcoin::Transaction { + type Error = BdkError; + fn try_from(tx: &BdkTransaction) -> Result { + serde_json::from_str(&tx.s).map_err(|e| BdkError::InvalidTransaction(e.to_string())) + } +} +///Configuration type for a SqliteDatabase database +pub struct SqliteDbConfiguration { + ///Main directory of the db + pub path: String, +} +///Configuration type for a sled Tree database +pub struct SledDbConfiguration { + ///Main directory of the db + pub path: String, + ///Name of the database tree, a separated namespace for the data + pub tree_name: String, +} +/// Type that can contain any of the database configurations defined by the library +/// This allows storing a single configuration that can be loaded into an DatabaseConfig +/// instance. Wallets that plan to offer users the ability to switch blockchain backend at runtime +/// will find this particularly useful. +pub enum DatabaseConfig { + Memory, + ///Simple key-value embedded database based on sled + Sqlite { + config: SqliteDbConfiguration, + }, + ///Sqlite embedded database using rusqlite + Sled { + config: SledDbConfiguration, + }, +} +impl From for AnyDatabaseConfig { + fn from(config: DatabaseConfig) -> Self { + match config { + DatabaseConfig::Memory => AnyDatabaseConfig::Memory(()), + DatabaseConfig::Sqlite { config } => { + AnyDatabaseConfig::Sqlite(bdk::database::any::SqliteDbConfiguration { + path: config.path, + }) + } + DatabaseConfig::Sled { config } => { + AnyDatabaseConfig::Sled(bdk::database::any::SledDbConfiguration { + path: config.path, + tree_name: config.tree_name, + }) + } + } + } +} + +#[derive(Debug, Clone)] +///Types of keychains +pub enum KeychainKind { + ExternalChain, + ///Internal, usually used for change outputs + InternalChain, +} +impl From for KeychainKind { + fn from(e: bdk::KeychainKind) -> Self { + match e { + bdk::KeychainKind::External => KeychainKind::ExternalChain, + bdk::KeychainKind::Internal => KeychainKind::InternalChain, + } + } +} +impl From for bdk::KeychainKind { + fn from(kind: KeychainKind) -> Self { + match kind { + KeychainKind::ExternalChain => bdk::KeychainKind::External, + KeychainKind::InternalChain => bdk::KeychainKind::Internal, + } + } +} +///Unspent outputs of this wallet +pub struct LocalUtxo { + pub outpoint: OutPoint, + pub txout: TxOut, + pub keychain: KeychainKind, + pub is_spent: bool, +} +impl From for LocalUtxo { + fn from(local_utxo: bdk::LocalUtxo) -> Self { + LocalUtxo { + outpoint: OutPoint { + txid: local_utxo.outpoint.txid.to_string(), + vout: local_utxo.outpoint.vout, + }, + txout: TxOut { + value: local_utxo.txout.value, + script_pubkey: BdkScriptBuf { + bytes: local_utxo.txout.script_pubkey.into_bytes(), + }, + }, + keychain: local_utxo.keychain.into(), + is_spent: local_utxo.is_spent, + } + } +} +impl TryFrom for bdk::LocalUtxo { + type Error = BdkError; + + fn try_from(value: LocalUtxo) -> Result { + Ok(Self { + outpoint: (&value.outpoint).try_into()?, + txout: value.txout.into(), + keychain: value.keychain.into(), + is_spent: value.is_spent, + }) + } +} +/// Options for a software signer +/// +/// Adjust the behavior of our software signers and the way a transaction is finalized +#[derive(Debug, Clone, Default)] +pub struct SignOptions { + /// Whether the signer should trust the `witness_utxo`, if the `non_witness_utxo` hasn't been + /// provided + /// + /// Defaults to `false` to mitigate the "SegWit bug" which should trick the wallet into + /// paying a fee larger than expected. + /// + /// Some wallets, especially if relatively old, might not provide the `non_witness_utxo` for + /// SegWit transactions in the PSBT they generate: in those cases setting this to `true` + /// should correctly produce a signature, at the expense of an increased trust in the creator + /// of the PSBT. + /// + /// For more details see: + pub trust_witness_utxo: bool, + + /// Whether the wallet should assume a specific height has been reached when trying to finalize + /// a transaction + /// + /// The wallet will only "use" a timelock to satisfy the spending policy of an input if the + /// timelock height has already been reached. This option allows overriding the "current height" to let the + /// wallet use timelocks in the future to spend a coin. + pub assume_height: Option, + + /// Whether the signer should use the `sighash_type` set in the PSBT when signing, no matter + /// what its value is + /// + /// Defaults to `false` which will only allow signing using `SIGHASH_ALL`. + pub allow_all_sighashes: bool, + + /// Whether to remove partial signatures from the PSBT inputs while finalizing PSBT. + /// + /// Defaults to `true` which will remove partial signatures during finalization. + pub remove_partial_sigs: bool, + + /// Whether to try finalizing the PSBT after the inputs are signed. + /// + /// Defaults to `true` which will try finalizing PSBT after inputs are signed. + pub try_finalize: bool, + + // Specifies which Taproot script-spend leaves we should sign for. This option is + // ignored if we're signing a non-taproot PSBT. + // + // Defaults to All, i.e., the wallet will sign all the leaves it has a key for. + // TODO pub tap_leaves_options: TapLeavesOptions, + /// Whether we should try to sign a taproot transaction with the taproot internal key + /// or not. This option is ignored if we're signing a non-taproot PSBT. + /// + /// Defaults to `true`, i.e., we always try to sign with the taproot internal key. + pub sign_with_tap_internal_key: bool, + + /// Whether we should grind ECDSA signature to ensure signing with low r + /// or not. + /// Defaults to `true`, i.e., we always grind ECDSA signature to sign with low r. + pub allow_grinding: bool, +} +impl From for bdk::SignOptions { + fn from(sign_options: SignOptions) -> Self { + bdk::SignOptions { + trust_witness_utxo: sign_options.trust_witness_utxo, + assume_height: sign_options.assume_height, + allow_all_sighashes: sign_options.allow_all_sighashes, + remove_partial_sigs: sign_options.remove_partial_sigs, + try_finalize: sign_options.try_finalize, + tap_leaves_options: Default::default(), + sign_with_tap_internal_key: sign_options.sign_with_tap_internal_key, + allow_grinding: sign_options.allow_grinding, + } + } +} +#[derive(Copy, Clone)] +pub struct FeeRate { + pub sat_per_vb: f32, +} +impl From for bdk::FeeRate { + fn from(value: FeeRate) -> Self { + bdk::FeeRate::from_sat_per_vb(value.sat_per_vb) + } +} +impl From for FeeRate { + fn from(value: bdk::FeeRate) -> Self { + Self { + sat_per_vb: value.as_sat_per_vb(), + } + } +} + +/// A key-value map for an input of the corresponding index in the unsigned +pub struct Input { + pub s: String, +} +impl TryFrom for bdk::bitcoin::psbt::Input { + type Error = BdkError; + fn try_from(value: Input) -> Result { + serde_json::from_str(value.s.as_str()).map_err(|e| BdkError::InvalidInput(e.to_string())) + } +} +impl TryFrom for Input { + type Error = BdkError; + + fn try_from(value: bdk::bitcoin::psbt::Input) -> Result { + Ok(Input { + s: serde_json::to_string(&value).map_err(|e| BdkError::InvalidInput(e.to_string()))?, + }) + } +} +#[derive(Debug, Clone)] +pub struct BdkPolicy { + pub ptr: RustOpaque, +} +impl BdkPolicy { + #[frb(sync)] + pub fn id(&self) -> String { + self.ptr.id.clone() + } + #[frb(sync)] + pub fn as_string(&self) -> Result { + serde_json::to_string(&*self.ptr).map_err(|e| BdkError::Generic(e.to_string())) + } + #[frb(sync)] + pub fn requires_path(&self) -> bool { + self.ptr.requires_path() + } + #[frb(sync)] + pub fn item(&self) -> SatisfiableItem { + self.ptr.item.clone().into() + } + #[frb(sync)] + pub fn satisfaction(&self) -> Satisfaction { + self.ptr.satisfaction.clone().into() + } + #[frb(sync)] + pub fn contribution(&self) -> Satisfaction { + self.ptr.contribution.clone().into() + } +} +impl From for BdkPolicy { + fn from(value: bdk::descriptor::Policy) -> Self { + BdkPolicy { + ptr: RustOpaque::new(value), + } + } +} + +#[derive(Debug, Clone)] +pub enum SatisfiableItem { + EcdsaSignature { + key: PkOrF, + }, + SchnorrSignature { + key: PkOrF, + }, + Sha256Preimage { + hash: String, + }, + Hash256Preimage { + hash: String, + }, + Ripemd160Preimage { + hash: String, + }, + Hash160Preimage { + hash: String, + }, + AbsoluteTimelock { + value: LockTime, + }, + RelativeTimelock { + value: u32, + }, + + Multisig { + keys: Vec, + + threshold: u64, + }, + + Thresh { + items: Vec, + + threshold: u64, + }, +} +impl From for SatisfiableItem { + fn from(value: bdk::descriptor::policy::SatisfiableItem) -> Self { + match value { + bdk::descriptor::policy::SatisfiableItem::EcdsaSignature(pk_or_f) => { + SatisfiableItem::EcdsaSignature { + key: pk_or_f.into(), + } + } + bdk::descriptor::policy::SatisfiableItem::SchnorrSignature(pk_or_f) => { + SatisfiableItem::SchnorrSignature { + key: pk_or_f.into(), + } + } + bdk::descriptor::policy::SatisfiableItem::Sha256Preimage { hash } => { + SatisfiableItem::Sha256Preimage { + hash: hash.to_string(), + } + } + bdk::descriptor::policy::SatisfiableItem::Hash256Preimage { hash } => { + SatisfiableItem::Hash256Preimage { + hash: hash.to_string(), + } + } + bdk::descriptor::policy::SatisfiableItem::Ripemd160Preimage { hash } => { + SatisfiableItem::Ripemd160Preimage { + hash: hash.to_string(), + } + } + bdk::descriptor::policy::SatisfiableItem::Hash160Preimage { hash } => { + SatisfiableItem::Hash160Preimage { + hash: hash.to_string(), + } + } + bdk::descriptor::policy::SatisfiableItem::AbsoluteTimelock { value } => { + SatisfiableItem::AbsoluteTimelock { + value: value.into(), + } + } + bdk::descriptor::policy::SatisfiableItem::RelativeTimelock { value } => { + SatisfiableItem::RelativeTimelock { + value: value.to_consensus_u32(), + } + } + bdk::descriptor::policy::SatisfiableItem::Multisig { keys, threshold } => { + SatisfiableItem::Multisig { + keys: keys.iter().map(|e| e.to_owned().into()).collect(), + threshold: threshold as u64, + } + } + bdk::descriptor::policy::SatisfiableItem::Thresh { items, threshold } => { + SatisfiableItem::Thresh { + items: items.iter().map(|e| e.to_owned().into()).collect(), + threshold: threshold as u64, + } + } + } + } +} + +#[derive(Debug, Clone)] +pub enum PkOrF { + Pubkey { value: String }, + XOnlyPubkey { value: String }, + Fingerprint { value: String }, +} +impl From for PkOrF { + fn from(value: bdk::descriptor::policy::PkOrF) -> Self { + match value { + bdk::descriptor::policy::PkOrF::Pubkey(public_key) => PkOrF::Pubkey { + value: public_key.to_string(), + }, + bdk::descriptor::policy::PkOrF::XOnlyPubkey(xonly_public_key) => PkOrF::XOnlyPubkey { + value: xonly_public_key.to_string(), + }, + bdk::descriptor::policy::PkOrF::Fingerprint(fingerprint) => PkOrF::Fingerprint { + value: fingerprint.to_string(), + }, + } + } +} + +#[derive(Debug, Clone)] +pub enum Satisfaction { + Partial { + n: u64, + m: u64, + items: Vec, + sorted: Option, + conditions: HashMap>, + }, + PartialComplete { + n: u64, + m: u64, + items: Vec, + sorted: Option, + conditions: HashMap, Vec>, + }, + Complete { + condition: Condition, + }, + + None { + msg: String, + }, +} +impl From for Satisfaction { + fn from(value: bdk::descriptor::policy::Satisfaction) -> Self { + match value { + bdk::descriptor::policy::Satisfaction::Partial { + n, + m, + items, + sorted, + conditions, + } => Satisfaction::Partial { + n: n as u64, + m: m as u64, + items: items.iter().map(|e| e.to_owned() as u64).collect(), + sorted, + conditions: conditions + .into_iter() + .map(|(index, conditions)| { + ( + index as u32, + conditions.into_iter().map(|e| e.into()).collect(), + ) + }) + .collect(), + }, + bdk::descriptor::policy::Satisfaction::PartialComplete { + n, + m, + items, + sorted, + conditions, + } => Satisfaction::PartialComplete { + n: n as u64, + m: m as u64, + items: items.iter().map(|e| e.to_owned() as u64).collect(), + sorted, + conditions: conditions + .into_iter() + .map(|(index, conditions)| { + ( + index.iter().map(|e| e.to_owned() as u32).collect(), + conditions.into_iter().map(|e| e.into()).collect(), // Convert each `Condition` to `YourType` + ) + }) + .collect(), + }, + bdk::descriptor::policy::Satisfaction::Complete { condition } => { + Satisfaction::Complete { + condition: condition.into(), + } + } + bdk::descriptor::policy::Satisfaction::None => Satisfaction::None { + msg: "Cannot satisfy or contribute to the policy item".to_string(), + }, + } + } +} + +#[derive(Debug, Clone)] +pub struct Condition { + pub csv: Option, + pub timelock: Option, +} +impl From for Condition { + fn from(value: bdk::descriptor::policy::Condition) -> Self { + Condition { + csv: value.csv.map(|e| e.to_consensus_u32()), + timelock: value.timelock.map(|e| e.into()), + } + } +} diff --git a/rust/src/api/wallet.rs b/rust/src/api/wallet.rs new file mode 100644 index 00000000..dcbcf2c5 --- /dev/null +++ b/rust/src/api/wallet.rs @@ -0,0 +1,329 @@ +use crate::api::descriptor::BdkDescriptor; +use crate::api::types::{ + AddressIndex, Balance, BdkAddress, BdkScriptBuf, ChangeSpendPolicy, DatabaseConfig, Input, + KeychainKind, LocalUtxo, Network, OutPoint, PsbtSigHashType, RbfValue, ScriptAmount, + SignOptions, TransactionDetails, +}; +use std::collections::{BTreeMap, HashMap}; +use std::ops::Deref; +use std::str::FromStr; + +use crate::api::blockchain::BdkBlockchain; +use crate::api::error::BdkError; +use crate::api::psbt::BdkPsbt; +use crate::frb_generated::RustOpaque; +use bdk::bitcoin::script::PushBytesBuf; +use bdk::bitcoin::{Sequence, Txid}; +pub use bdk::blockchain::GetTx; + +use bdk::database::ConfigurableDatabase; +use flutter_rust_bridge::frb; + +use super::execute_with_lock; +use super::types::BdkPolicy; + +#[derive(Debug)] +pub struct BdkWallet { + pub ptr: RustOpaque>>, +} +impl BdkWallet { + pub fn new( + descriptor: BdkDescriptor, + change_descriptor: Option, + network: Network, + database_config: DatabaseConfig, + ) -> Result { + let database = bdk::database::AnyDatabase::from_config(&database_config.into())?; + let descriptor: String = descriptor.to_string_private(); + let change_descriptor: Option = change_descriptor.map(|d| d.to_string_private()); + + let wallet = bdk::Wallet::new( + &descriptor, + change_descriptor.as_ref(), + network.into(), + database, + )?; + Ok(BdkWallet { + ptr: RustOpaque::new(std::sync::Mutex::new(wallet)), + }) + } + + /// Get the Bitcoin network the wallet is using. + #[frb(sync)] + pub fn network(&self) -> Result { + execute_with_lock(&self.ptr, |w| w.network().into()) + } + #[frb(sync)] + pub fn is_mine(ptr: BdkWallet, script: BdkScriptBuf) -> Result { + execute_with_lock(&ptr.ptr, |w| { + w.is_mine(>::into(script).as_script()) + .map_err(|e| e.into()) + })? + } + /// Return a derived address using the external descriptor, see AddressIndex for available address index selection + /// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) + /// then the same address will always be returned for any AddressIndex. + #[frb(sync)] + pub fn get_address( + ptr: BdkWallet, + address_index: AddressIndex, + ) -> Result<(BdkAddress, u32), BdkError> { + execute_with_lock(&ptr.ptr, |w| { + w.get_address(address_index.into()) + .map(|e| (e.address.into(), e.index)) + .map_err(|e| e.into()) + })? + } + + /// Return a derived address using the internal (change) descriptor. + /// + /// If the wallet doesn't have an internal descriptor it will use the external descriptor. + /// + /// see [AddressIndex] for available address index selection strategies. If none of the keys + /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always + /// be returned for any [AddressIndex]. + #[frb(sync)] + pub fn get_internal_address( + ptr: BdkWallet, + address_index: AddressIndex, + ) -> Result<(BdkAddress, u32), BdkError> { + execute_with_lock(&ptr.ptr, |w| { + w.get_internal_address(address_index.into()) + .map(|e| (e.address.into(), e.index)) + .map_err(|e| e.into()) + })? + } + + /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates + /// on the internal database, which first needs to be Wallet.sync manually. + #[frb(sync)] + pub fn get_balance(&self) -> Result { + execute_with_lock(&self.ptr, |w| { + w.get_balance().map(|b| b.into()).map_err(|e| e.into()) + })? + } + /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. + #[frb(sync)] + pub fn list_transactions( + &self, + include_raw: bool, + ) -> Result, BdkError> { + execute_with_lock(&self.ptr, |wallet| { + let mut transaction_details = vec![]; + + // List transactions and convert them using try_into + for e in wallet.list_transactions(include_raw)?.into_iter() { + transaction_details.push(e.try_into()?); + } + + Ok(transaction_details) + })? + } + + /// Return the list of unspent outputs of this wallet. Note that this method only operates on the internal database, + /// which first needs to be Wallet.sync manually. + #[frb(sync)] + pub fn list_unspent(&self) -> Result, BdkError> { + execute_with_lock(&self.ptr, |w| { + let unspent: Vec = w.list_unspent()?; + Ok(unspent.into_iter().map(LocalUtxo::from).collect()) + })? + } + + /// Sign a transaction with all the wallet's signers. This function returns an encapsulated bool that + /// has the value true if the PSBT was finalized, or false otherwise. + /// + /// The [SignOptions] can be used to tweak the behavior of the software signers, and the way + /// the transaction is finalized at the end. Note that it can't be guaranteed that *every* + /// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined + /// in this library will. + pub fn sign( + ptr: BdkWallet, + psbt: BdkPsbt, + sign_options: Option, + ) -> Result { + let mut psbt = psbt + .ptr + .lock() + .map_err(|_| BdkError::Generic("Poison Error!".to_string()))?; + execute_with_lock(&ptr.ptr, |w| { + w.sign( + &mut psbt, + sign_options.map(SignOptions::into).unwrap_or_default(), + ) + .map_err(|e| e.into()) + })? + } + /// Sync the internal database with the blockchain. + pub fn sync(ptr: BdkWallet, blockchain: &BdkBlockchain) -> Result<(), BdkError> { + execute_with_lock(&ptr.ptr, |w| { + w.sync(blockchain.ptr.deref(), bdk::SyncOptions::default()) + .map_err(|e| e.into()) + })? + } + + ///get the corresponding PSBT Input for a LocalUtxo + pub fn get_psbt_input( + &self, + utxo: LocalUtxo, + only_witness_utxo: bool, + sighash_type: Option, + ) -> anyhow::Result { + execute_with_lock(&self.ptr, |w| { + let input = w.get_psbt_input( + utxo.try_into()?, + sighash_type.map(|e| e.into()), + only_witness_utxo, + )?; + input.try_into() + })? + } + ///Returns the descriptor used to create addresses for a particular keychain. + #[frb(sync)] + pub fn get_descriptor_for_keychain( + ptr: BdkWallet, + keychain: KeychainKind, + ) -> anyhow::Result { + execute_with_lock(&ptr.ptr, |w| { + let extended_descriptor = w.get_descriptor_for_keychain(keychain.into()); + BdkDescriptor::new(extended_descriptor.to_string(), w.network().into()) + })? + } + #[frb(sync)] + pub fn policies(ptr: BdkWallet, keychain: KeychainKind) -> Result, BdkError> { + execute_with_lock(&ptr.ptr, |w| { + w.policies(keychain.into()) + .map_err(|e| e.into()) + .map(|e| e.map(|f| f.into())) + })? + } +} + +pub fn finish_bump_fee_tx_builder( + txid: String, + fee_rate: f32, + allow_shrinking: Option, + wallet: BdkWallet, + enable_rbf: bool, + n_sequence: Option, +) -> anyhow::Result<(BdkPsbt, TransactionDetails), BdkError> { + let txid = Txid::from_str(txid.as_str()).map_err(|e| BdkError::PsbtParse(e.to_string()))?; + execute_with_lock(&wallet.ptr, |w| { + let mut tx_builder = w.build_fee_bump(txid)?; + tx_builder.fee_rate(bdk::FeeRate::from_sat_per_vb(fee_rate)); + if let Some(allow_shrinking) = &allow_shrinking { + let address = allow_shrinking.ptr.clone(); + let script = address.script_pubkey(); + tx_builder.allow_shrinking(script)?; + } + if let Some(n_sequence) = n_sequence { + tx_builder.enable_rbf_with_sequence(Sequence(n_sequence)); + } + if enable_rbf { + tx_builder.enable_rbf(); + } + return match tx_builder.finish() { + Ok(e) => Ok((e.0.into(), TransactionDetails::try_from(e.1)?)), + Err(e) => Err(e.into()), + }; + })? +} + +pub fn tx_builder_finish( + wallet: BdkWallet, + recipients: Vec, + utxos: Vec, + foreign_utxo: Option<(OutPoint, Input, usize)>, + un_spendable: Vec, + change_policy: ChangeSpendPolicy, + manually_selected_only: bool, + fee_rate: Option, + fee_absolute: Option, + drain_wallet: bool, + drain_to: Option, + rbf: Option, + internal_policy_path: Option>>, + external_policy_path: Option>>, + data: Vec, +) -> anyhow::Result<(BdkPsbt, TransactionDetails), BdkError> { + execute_with_lock(&wallet.ptr, |w| { + let mut tx_builder = w.build_tx(); + if let Some(path) = internal_policy_path { + tx_builder.policy_path( + path.into_iter() + .map(|(key, value)| (key, value.into_iter().map(|x| x as usize).collect())) + .collect::>>(), + bdk::KeychainKind::Internal, + ); + } + if let Some(path) = external_policy_path { + tx_builder.policy_path( + path.into_iter() + .map(|(key, value)| (key, value.into_iter().map(|x| x as usize).collect())) + .collect::>>(), + bdk::KeychainKind::External, + ); + } + for e in recipients { + tx_builder.add_recipient(e.script.into(), e.amount); + } + tx_builder.change_policy(change_policy.into()); + + if !utxos.is_empty() { + let bdk_utxos = utxos + .iter() + .map(|e| bdk::bitcoin::OutPoint::try_from(e)) + .collect::, BdkError>>()?; + tx_builder + .add_utxos(bdk_utxos.as_slice()) + .map_err(|e| >::into(e))?; + } + if !un_spendable.is_empty() { + let bdk_unspendable = un_spendable + .iter() + .map(|e| bdk::bitcoin::OutPoint::try_from(e)) + .collect::, BdkError>>()?; + tx_builder.unspendable(bdk_unspendable); + } + if manually_selected_only { + tx_builder.manually_selected_only(); + } + if let Some(sat_per_vb) = fee_rate { + tx_builder.fee_rate(bdk::FeeRate::from_sat_per_vb(sat_per_vb)); + } + if let Some(fee_amount) = fee_absolute { + tx_builder.fee_absolute(fee_amount); + } + if drain_wallet { + tx_builder.drain_wallet(); + } + if let Some(script_) = drain_to { + tx_builder.drain_to(script_.into()); + } + if let Some(utxo) = foreign_utxo { + let foreign_utxo: bdk::bitcoin::psbt::Input = utxo.1.try_into()?; + tx_builder.add_foreign_utxo((&utxo.0).try_into()?, foreign_utxo, utxo.2)?; + } + if let Some(rbf) = &rbf { + match rbf { + RbfValue::RbfDefault => { + tx_builder.enable_rbf(); + } + RbfValue::Value(nsequence) => { + tx_builder.enable_rbf_with_sequence(Sequence(nsequence.to_owned())); + } + } + } + if !data.is_empty() { + let push_bytes = PushBytesBuf::try_from(data.clone()).map_err(|_| { + BdkError::Generic("Failed to convert data to PushBytes".to_string()) + })?; + tx_builder.add_data(&push_bytes); + } + + return match tx_builder.finish() { + Ok(e) => Ok((e.0.into(), TransactionDetails::try_from(&e.1)?)), + Err(e) => Err(e.into()), + }; + })? +} diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs new file mode 100644 index 00000000..e823f8d2 --- /dev/null +++ b/rust/src/frb_generated.io.rs @@ -0,0 +1,4856 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// Section: imports + +use super::*; +use crate::*; +use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; +use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; +use flutter_rust_bridge::{Handler, IntoIntoDart}; + +// Section: boilerplate + +flutter_rust_bridge::frb_generated_boilerplate_io!(); + +// Section: dart2rust + +impl CstDecode>> + for *mut wire_cst_list_record_string_list_prim_u_32_strict +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> std::collections::HashMap> { + let vec: Vec<(String, Vec)> = self.cst_decode(); + vec.into_iter().collect() + } +} +impl CstDecode, Vec>> + for *mut wire_cst_list_record_list_prim_u_32_strict_list_condition +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> std::collections::HashMap, Vec> { + let vec: Vec<(Vec, Vec)> = self.cst_decode(); + vec.into_iter().collect() + } +} +impl CstDecode>> + for *mut wire_cst_list_record_u_32_list_condition +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> std::collections::HashMap> { + let vec: Vec<(u32, Vec)> = self.cst_decode(); + vec.into_iter().collect() + } +} +impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode>>> for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom>> { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode>> + for usize +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom> { + unsafe { decode_rust_opaque_nom(self as _) } + } +} +impl CstDecode for *mut wire_cst_list_prim_u_8_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> String { + let vec: Vec = self.cst_decode(); + String::from_utf8(vec).unwrap() + } +} +impl CstDecode for wire_cst_address_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::AddressError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Base58 }; + crate::api::error::AddressError::Base58(ans.field0.cst_decode()) + } + 1 => { + let ans = unsafe { self.kind.Bech32 }; + crate::api::error::AddressError::Bech32(ans.field0.cst_decode()) + } + 2 => crate::api::error::AddressError::EmptyBech32Payload, + 3 => { + let ans = unsafe { self.kind.InvalidBech32Variant }; + crate::api::error::AddressError::InvalidBech32Variant { + expected: ans.expected.cst_decode(), + found: ans.found.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.InvalidWitnessVersion }; + crate::api::error::AddressError::InvalidWitnessVersion(ans.field0.cst_decode()) + } + 5 => { + let ans = unsafe { self.kind.UnparsableWitnessVersion }; + crate::api::error::AddressError::UnparsableWitnessVersion(ans.field0.cst_decode()) + } + 6 => crate::api::error::AddressError::MalformedWitnessVersion, + 7 => { + let ans = unsafe { self.kind.InvalidWitnessProgramLength }; + crate::api::error::AddressError::InvalidWitnessProgramLength( + ans.field0.cst_decode(), + ) + } + 8 => { + let ans = unsafe { self.kind.InvalidSegwitV0ProgramLength }; + crate::api::error::AddressError::InvalidSegwitV0ProgramLength( + ans.field0.cst_decode(), + ) + } + 9 => crate::api::error::AddressError::UncompressedPubkey, + 10 => crate::api::error::AddressError::ExcessiveScriptSize, + 11 => crate::api::error::AddressError::UnrecognizedScript, + 12 => { + let ans = unsafe { self.kind.UnknownAddressType }; + crate::api::error::AddressError::UnknownAddressType(ans.field0.cst_decode()) + } + 13 => { + let ans = unsafe { self.kind.NetworkValidation }; + crate::api::error::AddressError::NetworkValidation { + network_required: ans.network_required.cst_decode(), + network_found: ans.network_found.cst_decode(), + address: ans.address.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_address_index { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::AddressIndex { + match self.tag { + 0 => crate::api::types::AddressIndex::Increase, + 1 => crate::api::types::AddressIndex::LastUnused, + 2 => { + let ans = unsafe { self.kind.Peek }; + crate::api::types::AddressIndex::Peek { + index: ans.index.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.Reset }; + crate::api::types::AddressIndex::Reset { + index: ans.index.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_auth { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::Auth { + match self.tag { + 0 => crate::api::blockchain::Auth::None, + 1 => { + let ans = unsafe { self.kind.UserPass }; + crate::api::blockchain::Auth::UserPass { + username: ans.username.cst_decode(), + password: ans.password.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Cookie }; + crate::api::blockchain::Auth::Cookie { + file: ans.file.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_balance { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Balance { + crate::api::types::Balance { + immature: self.immature.cst_decode(), + trusted_pending: self.trusted_pending.cst_decode(), + untrusted_pending: self.untrusted_pending.cst_decode(), + confirmed: self.confirmed.cst_decode(), + spendable: self.spendable.cst_decode(), + total: self.total.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_address { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkAddress { + crate::api::types::BdkAddress { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_blockchain { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::BdkBlockchain { + crate::api::blockchain::BdkBlockchain { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_derivation_path { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDerivationPath { + crate::api::key::BdkDerivationPath { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_descriptor { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::descriptor::BdkDescriptor { + crate::api::descriptor::BdkDescriptor { + extended_descriptor: self.extended_descriptor.cst_decode(), + key_map: self.key_map.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_descriptor_public_key { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDescriptorPublicKey { + crate::api::key::BdkDescriptorPublicKey { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_descriptor_secret_key { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDescriptorSecretKey { + crate::api::key::BdkDescriptorSecretKey { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::BdkError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Hex }; + crate::api::error::BdkError::Hex(ans.field0.cst_decode()) + } + 1 => { + let ans = unsafe { self.kind.Consensus }; + crate::api::error::BdkError::Consensus(ans.field0.cst_decode()) + } + 2 => { + let ans = unsafe { self.kind.VerifyTransaction }; + crate::api::error::BdkError::VerifyTransaction(ans.field0.cst_decode()) + } + 3 => { + let ans = unsafe { self.kind.Address }; + crate::api::error::BdkError::Address(ans.field0.cst_decode()) + } + 4 => { + let ans = unsafe { self.kind.Descriptor }; + crate::api::error::BdkError::Descriptor(ans.field0.cst_decode()) + } + 5 => { + let ans = unsafe { self.kind.InvalidU32Bytes }; + crate::api::error::BdkError::InvalidU32Bytes(ans.field0.cst_decode()) + } + 6 => { + let ans = unsafe { self.kind.Generic }; + crate::api::error::BdkError::Generic(ans.field0.cst_decode()) + } + 7 => crate::api::error::BdkError::ScriptDoesntHaveAddressForm, + 8 => crate::api::error::BdkError::NoRecipients, + 9 => crate::api::error::BdkError::NoUtxosSelected, + 10 => { + let ans = unsafe { self.kind.OutputBelowDustLimit }; + crate::api::error::BdkError::OutputBelowDustLimit(ans.field0.cst_decode()) + } + 11 => { + let ans = unsafe { self.kind.InsufficientFunds }; + crate::api::error::BdkError::InsufficientFunds { + needed: ans.needed.cst_decode(), + available: ans.available.cst_decode(), + } + } + 12 => crate::api::error::BdkError::BnBTotalTriesExceeded, + 13 => crate::api::error::BdkError::BnBNoExactMatch, + 14 => crate::api::error::BdkError::UnknownUtxo, + 15 => crate::api::error::BdkError::TransactionNotFound, + 16 => crate::api::error::BdkError::TransactionConfirmed, + 17 => crate::api::error::BdkError::IrreplaceableTransaction, + 18 => { + let ans = unsafe { self.kind.FeeRateTooLow }; + crate::api::error::BdkError::FeeRateTooLow { + needed: ans.needed.cst_decode(), + } + } + 19 => { + let ans = unsafe { self.kind.FeeTooLow }; + crate::api::error::BdkError::FeeTooLow { + needed: ans.needed.cst_decode(), + } + } + 20 => crate::api::error::BdkError::FeeRateUnavailable, + 21 => { + let ans = unsafe { self.kind.MissingKeyOrigin }; + crate::api::error::BdkError::MissingKeyOrigin(ans.field0.cst_decode()) + } + 22 => { + let ans = unsafe { self.kind.Key }; + crate::api::error::BdkError::Key(ans.field0.cst_decode()) + } + 23 => crate::api::error::BdkError::ChecksumMismatch, + 24 => { + let ans = unsafe { self.kind.SpendingPolicyRequired }; + crate::api::error::BdkError::SpendingPolicyRequired(ans.field0.cst_decode()) + } + 25 => { + let ans = unsafe { self.kind.InvalidPolicyPathError }; + crate::api::error::BdkError::InvalidPolicyPathError(ans.field0.cst_decode()) + } + 26 => { + let ans = unsafe { self.kind.Signer }; + crate::api::error::BdkError::Signer(ans.field0.cst_decode()) + } + 27 => { + let ans = unsafe { self.kind.InvalidNetwork }; + crate::api::error::BdkError::InvalidNetwork { + requested: ans.requested.cst_decode(), + found: ans.found.cst_decode(), + } + } + 28 => { + let ans = unsafe { self.kind.InvalidOutpoint }; + crate::api::error::BdkError::InvalidOutpoint(ans.field0.cst_decode()) + } + 29 => { + let ans = unsafe { self.kind.Encode }; + crate::api::error::BdkError::Encode(ans.field0.cst_decode()) + } + 30 => { + let ans = unsafe { self.kind.Miniscript }; + crate::api::error::BdkError::Miniscript(ans.field0.cst_decode()) + } + 31 => { + let ans = unsafe { self.kind.MiniscriptPsbt }; + crate::api::error::BdkError::MiniscriptPsbt(ans.field0.cst_decode()) + } + 32 => { + let ans = unsafe { self.kind.Bip32 }; + crate::api::error::BdkError::Bip32(ans.field0.cst_decode()) + } + 33 => { + let ans = unsafe { self.kind.Bip39 }; + crate::api::error::BdkError::Bip39(ans.field0.cst_decode()) + } + 34 => { + let ans = unsafe { self.kind.Secp256k1 }; + crate::api::error::BdkError::Secp256k1(ans.field0.cst_decode()) + } + 35 => { + let ans = unsafe { self.kind.Json }; + crate::api::error::BdkError::Json(ans.field0.cst_decode()) + } + 36 => { + let ans = unsafe { self.kind.Psbt }; + crate::api::error::BdkError::Psbt(ans.field0.cst_decode()) + } + 37 => { + let ans = unsafe { self.kind.PsbtParse }; + crate::api::error::BdkError::PsbtParse(ans.field0.cst_decode()) + } + 38 => { + let ans = unsafe { self.kind.MissingCachedScripts }; + crate::api::error::BdkError::MissingCachedScripts( + ans.field0.cst_decode(), + ans.field1.cst_decode(), + ) + } + 39 => { + let ans = unsafe { self.kind.Electrum }; + crate::api::error::BdkError::Electrum(ans.field0.cst_decode()) + } + 40 => { + let ans = unsafe { self.kind.Esplora }; + crate::api::error::BdkError::Esplora(ans.field0.cst_decode()) + } + 41 => { + let ans = unsafe { self.kind.Sled }; + crate::api::error::BdkError::Sled(ans.field0.cst_decode()) + } + 42 => { + let ans = unsafe { self.kind.Rpc }; + crate::api::error::BdkError::Rpc(ans.field0.cst_decode()) + } + 43 => { + let ans = unsafe { self.kind.Rusqlite }; + crate::api::error::BdkError::Rusqlite(ans.field0.cst_decode()) + } + 44 => { + let ans = unsafe { self.kind.InvalidInput }; + crate::api::error::BdkError::InvalidInput(ans.field0.cst_decode()) + } + 45 => { + let ans = unsafe { self.kind.InvalidLockTime }; + crate::api::error::BdkError::InvalidLockTime(ans.field0.cst_decode()) + } + 46 => { + let ans = unsafe { self.kind.InvalidTransaction }; + crate::api::error::BdkError::InvalidTransaction(ans.field0.cst_decode()) + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_bdk_mnemonic { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkMnemonic { + crate::api::key::BdkMnemonic { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_policy { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkPolicy { + crate::api::types::BdkPolicy { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_psbt { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::psbt::BdkPsbt { + crate::api::psbt::BdkPsbt { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_script_buf { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkScriptBuf { + crate::api::types::BdkScriptBuf { + bytes: self.bytes.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_transaction { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkTransaction { + crate::api::types::BdkTransaction { + s: self.s.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bdk_wallet { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::wallet::BdkWallet { + crate::api::wallet::BdkWallet { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_block_time { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BlockTime { + crate::api::types::BlockTime { + height: self.height.cst_decode(), + timestamp: self.timestamp.cst_decode(), + } + } +} +impl CstDecode for wire_cst_blockchain_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::BlockchainConfig { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Electrum }; + crate::api::blockchain::BlockchainConfig::Electrum { + config: ans.config.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Esplora }; + crate::api::blockchain::BlockchainConfig::Esplora { + config: ans.config.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Rpc }; + crate::api::blockchain::BlockchainConfig::Rpc { + config: ans.config.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for *mut wire_cst_address_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::AddressError { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_address_index { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::AddressIndex { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_address { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkAddress { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_blockchain { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::BdkBlockchain { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_derivation_path { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDerivationPath { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_descriptor { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::descriptor::BdkDescriptor { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_bdk_descriptor_public_key +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDescriptorPublicKey { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_bdk_descriptor_secret_key +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDescriptorSecretKey { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_mnemonic { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkMnemonic { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_policy { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkPolicy { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_psbt { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::psbt::BdkPsbt { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_script_buf { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkScriptBuf { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_transaction { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkTransaction { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bdk_wallet { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::wallet::BdkWallet { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_block_time { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BlockTime { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_blockchain_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::BlockchainConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut bool { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> bool { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } +} +impl CstDecode for *mut wire_cst_condition { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Condition { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_consensus_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::ConsensusError { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_database_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::DatabaseConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_descriptor_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::DescriptorError { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_electrum_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::ElectrumConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_esplora_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::EsploraConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut f32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> f32 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } +} +impl CstDecode for *mut wire_cst_fee_rate { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FeeRate { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_hex_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::HexError { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_local_utxo { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::LocalUtxo { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_lock_time { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::LockTime { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_out_point { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::OutPoint { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_pk_or_f { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::PkOrF { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_psbt_sig_hash_type { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::PsbtSigHashType { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_rbf_value { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::RbfValue { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode<(crate::api::types::OutPoint, crate::api::types::Input, usize)> + for *mut wire_cst_record_out_point_input_usize +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> (crate::api::types::OutPoint, crate::api::types::Input, usize) { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::<(crate::api::types::OutPoint, crate::api::types::Input, usize)>::cst_decode( + *wrap, + ) + .into() + } +} +impl CstDecode for *mut wire_cst_rpc_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::RpcConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_rpc_sync_params { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::RpcSyncParams { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_sign_options { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SignOptions { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_sled_db_configuration { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SledDbConfiguration { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_sqlite_db_configuration { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SqliteDbConfiguration { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut u32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u32 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } +} +impl CstDecode for *mut u64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u64 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } +} +impl CstDecode for *mut u8 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u8 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } +} +impl CstDecode for wire_cst_condition { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Condition { + crate::api::types::Condition { + csv: self.csv.cst_decode(), + timelock: self.timelock.cst_decode(), + } + } +} +impl CstDecode for wire_cst_consensus_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::ConsensusError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Io }; + crate::api::error::ConsensusError::Io(ans.field0.cst_decode()) + } + 1 => { + let ans = unsafe { self.kind.OversizedVectorAllocation }; + crate::api::error::ConsensusError::OversizedVectorAllocation { + requested: ans.requested.cst_decode(), + max: ans.max.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.InvalidChecksum }; + crate::api::error::ConsensusError::InvalidChecksum { + expected: ans.expected.cst_decode(), + actual: ans.actual.cst_decode(), + } + } + 3 => crate::api::error::ConsensusError::NonMinimalVarInt, + 4 => { + let ans = unsafe { self.kind.ParseFailed }; + crate::api::error::ConsensusError::ParseFailed(ans.field0.cst_decode()) + } + 5 => { + let ans = unsafe { self.kind.UnsupportedSegwitFlag }; + crate::api::error::ConsensusError::UnsupportedSegwitFlag(ans.field0.cst_decode()) + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_database_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::DatabaseConfig { + match self.tag { + 0 => crate::api::types::DatabaseConfig::Memory, + 1 => { + let ans = unsafe { self.kind.Sqlite }; + crate::api::types::DatabaseConfig::Sqlite { + config: ans.config.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Sled }; + crate::api::types::DatabaseConfig::Sled { + config: ans.config.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_descriptor_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::DescriptorError { + match self.tag { + 0 => crate::api::error::DescriptorError::InvalidHdKeyPath, + 1 => crate::api::error::DescriptorError::InvalidDescriptorChecksum, + 2 => crate::api::error::DescriptorError::HardenedDerivationXpub, + 3 => crate::api::error::DescriptorError::MultiPath, + 4 => { + let ans = unsafe { self.kind.Key }; + crate::api::error::DescriptorError::Key(ans.field0.cst_decode()) + } + 5 => { + let ans = unsafe { self.kind.Policy }; + crate::api::error::DescriptorError::Policy(ans.field0.cst_decode()) + } + 6 => { + let ans = unsafe { self.kind.InvalidDescriptorCharacter }; + crate::api::error::DescriptorError::InvalidDescriptorCharacter( + ans.field0.cst_decode(), + ) + } + 7 => { + let ans = unsafe { self.kind.Bip32 }; + crate::api::error::DescriptorError::Bip32(ans.field0.cst_decode()) + } + 8 => { + let ans = unsafe { self.kind.Base58 }; + crate::api::error::DescriptorError::Base58(ans.field0.cst_decode()) + } + 9 => { + let ans = unsafe { self.kind.Pk }; + crate::api::error::DescriptorError::Pk(ans.field0.cst_decode()) + } + 10 => { + let ans = unsafe { self.kind.Miniscript }; + crate::api::error::DescriptorError::Miniscript(ans.field0.cst_decode()) + } + 11 => { + let ans = unsafe { self.kind.Hex }; + crate::api::error::DescriptorError::Hex(ans.field0.cst_decode()) + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_electrum_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::ElectrumConfig { + crate::api::blockchain::ElectrumConfig { + url: self.url.cst_decode(), + socks5: self.socks5.cst_decode(), + retry: self.retry.cst_decode(), + timeout: self.timeout.cst_decode(), + stop_gap: self.stop_gap.cst_decode(), + validate_domain: self.validate_domain.cst_decode(), + } + } +} +impl CstDecode for wire_cst_esplora_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::EsploraConfig { + crate::api::blockchain::EsploraConfig { + base_url: self.base_url.cst_decode(), + proxy: self.proxy.cst_decode(), + concurrency: self.concurrency.cst_decode(), + stop_gap: self.stop_gap.cst_decode(), + timeout: self.timeout.cst_decode(), + } + } +} +impl CstDecode for wire_cst_fee_rate { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FeeRate { + crate::api::types::FeeRate { + sat_per_vb: self.sat_per_vb.cst_decode(), + } + } +} +impl CstDecode for wire_cst_hex_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::HexError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.InvalidChar }; + crate::api::error::HexError::InvalidChar(ans.field0.cst_decode()) + } + 1 => { + let ans = unsafe { self.kind.OddLengthString }; + crate::api::error::HexError::OddLengthString(ans.field0.cst_decode()) + } + 2 => { + let ans = unsafe { self.kind.InvalidLength }; + crate::api::error::HexError::InvalidLength( + ans.field0.cst_decode(), + ans.field1.cst_decode(), + ) + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_input { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Input { + crate::api::types::Input { + s: self.s.cst_decode(), + } + } +} +impl CstDecode> for *mut wire_cst_list_bdk_policy { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode> for *mut wire_cst_list_condition { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode>> for *mut wire_cst_list_list_prim_u_8_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec> { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode> for *mut wire_cst_list_local_utxo { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode> for *mut wire_cst_list_out_point { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode> for *mut wire_cst_list_pk_or_f { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode> for *mut wire_cst_list_prim_u_32_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + } + } +} +impl CstDecode> for *mut wire_cst_list_prim_u_64_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + } + } +} +impl CstDecode> for *mut wire_cst_list_prim_u_8_loose { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + } + } +} +impl CstDecode> for *mut wire_cst_list_prim_u_8_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + } + } +} +impl CstDecode, Vec)>> + for *mut wire_cst_list_record_list_prim_u_32_strict_list_condition +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec<(Vec, Vec)> { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode)>> for *mut wire_cst_list_record_string_list_prim_u_32_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec<(String, Vec)> { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode)>> + for *mut wire_cst_list_record_u_32_list_condition +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec<(u32, Vec)> { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode> for *mut wire_cst_list_script_amount { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode> + for *mut wire_cst_list_transaction_details +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode> for *mut wire_cst_list_tx_in { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode> for *mut wire_cst_list_tx_out { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } +} +impl CstDecode for wire_cst_local_utxo { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::LocalUtxo { + crate::api::types::LocalUtxo { + outpoint: self.outpoint.cst_decode(), + txout: self.txout.cst_decode(), + keychain: self.keychain.cst_decode(), + is_spent: self.is_spent.cst_decode(), + } + } +} +impl CstDecode for wire_cst_lock_time { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::LockTime { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Blocks }; + crate::api::types::LockTime::Blocks(ans.field0.cst_decode()) + } + 1 => { + let ans = unsafe { self.kind.Seconds }; + crate::api::types::LockTime::Seconds(ans.field0.cst_decode()) + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_out_point { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::OutPoint { + crate::api::types::OutPoint { + txid: self.txid.cst_decode(), + vout: self.vout.cst_decode(), + } + } +} +impl CstDecode for wire_cst_payload { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Payload { + match self.tag { + 0 => { + let ans = unsafe { self.kind.PubkeyHash }; + crate::api::types::Payload::PubkeyHash { + pubkey_hash: ans.pubkey_hash.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.ScriptHash }; + crate::api::types::Payload::ScriptHash { + script_hash: ans.script_hash.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.WitnessProgram }; + crate::api::types::Payload::WitnessProgram { + version: ans.version.cst_decode(), + program: ans.program.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_pk_or_f { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::PkOrF { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Pubkey }; + crate::api::types::PkOrF::Pubkey { + value: ans.value.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.XOnlyPubkey }; + crate::api::types::PkOrF::XOnlyPubkey { + value: ans.value.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Fingerprint }; + crate::api::types::PkOrF::Fingerprint { + value: ans.value.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_psbt_sig_hash_type { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::PsbtSigHashType { + crate::api::types::PsbtSigHashType { + inner: self.inner.cst_decode(), + } + } +} +impl CstDecode for wire_cst_rbf_value { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::RbfValue { + match self.tag { + 0 => crate::api::types::RbfValue::RbfDefault, + 1 => { + let ans = unsafe { self.kind.Value }; + crate::api::types::RbfValue::Value(ans.field0.cst_decode()) + } + _ => unreachable!(), + } + } +} +impl CstDecode<(crate::api::types::BdkAddress, u32)> for wire_cst_record_bdk_address_u_32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> (crate::api::types::BdkAddress, u32) { + (self.field0.cst_decode(), self.field1.cst_decode()) + } +} +impl + CstDecode<( + crate::api::psbt::BdkPsbt, + crate::api::types::TransactionDetails, + )> for wire_cst_record_bdk_psbt_transaction_details +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> ( + crate::api::psbt::BdkPsbt, + crate::api::types::TransactionDetails, + ) { + (self.field0.cst_decode(), self.field1.cst_decode()) + } +} +impl CstDecode<(Vec, Vec)> + for wire_cst_record_list_prim_u_32_strict_list_condition +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> (Vec, Vec) { + (self.field0.cst_decode(), self.field1.cst_decode()) + } +} +impl CstDecode<(crate::api::types::OutPoint, crate::api::types::Input, usize)> + for wire_cst_record_out_point_input_usize +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> (crate::api::types::OutPoint, crate::api::types::Input, usize) { + ( + self.field0.cst_decode(), + self.field1.cst_decode(), + self.field2.cst_decode(), + ) + } +} +impl CstDecode<(String, Vec)> for wire_cst_record_string_list_prim_u_32_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> (String, Vec) { + (self.field0.cst_decode(), self.field1.cst_decode()) + } +} +impl CstDecode<(u32, Vec)> for wire_cst_record_u_32_list_condition { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> (u32, Vec) { + (self.field0.cst_decode(), self.field1.cst_decode()) + } +} +impl CstDecode for wire_cst_rpc_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::RpcConfig { + crate::api::blockchain::RpcConfig { + url: self.url.cst_decode(), + auth: self.auth.cst_decode(), + network: self.network.cst_decode(), + wallet_name: self.wallet_name.cst_decode(), + sync_params: self.sync_params.cst_decode(), + } + } +} +impl CstDecode for wire_cst_rpc_sync_params { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::RpcSyncParams { + crate::api::blockchain::RpcSyncParams { + start_script_count: self.start_script_count.cst_decode(), + start_time: self.start_time.cst_decode(), + force_start_time: self.force_start_time.cst_decode(), + poll_rate_sec: self.poll_rate_sec.cst_decode(), + } + } +} +impl CstDecode for wire_cst_satisfaction { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Satisfaction { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Partial }; + crate::api::types::Satisfaction::Partial { + n: ans.n.cst_decode(), + m: ans.m.cst_decode(), + items: ans.items.cst_decode(), + sorted: ans.sorted.cst_decode(), + conditions: ans.conditions.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.PartialComplete }; + crate::api::types::Satisfaction::PartialComplete { + n: ans.n.cst_decode(), + m: ans.m.cst_decode(), + items: ans.items.cst_decode(), + sorted: ans.sorted.cst_decode(), + conditions: ans.conditions.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Complete }; + crate::api::types::Satisfaction::Complete { + condition: ans.condition.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.None }; + crate::api::types::Satisfaction::None { + msg: ans.msg.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_satisfiable_item { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SatisfiableItem { + match self.tag { + 0 => { + let ans = unsafe { self.kind.EcdsaSignature }; + crate::api::types::SatisfiableItem::EcdsaSignature { + key: ans.key.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.SchnorrSignature }; + crate::api::types::SatisfiableItem::SchnorrSignature { + key: ans.key.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Sha256Preimage }; + crate::api::types::SatisfiableItem::Sha256Preimage { + hash: ans.hash.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.Hash256Preimage }; + crate::api::types::SatisfiableItem::Hash256Preimage { + hash: ans.hash.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.Ripemd160Preimage }; + crate::api::types::SatisfiableItem::Ripemd160Preimage { + hash: ans.hash.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.Hash160Preimage }; + crate::api::types::SatisfiableItem::Hash160Preimage { + hash: ans.hash.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.AbsoluteTimelock }; + crate::api::types::SatisfiableItem::AbsoluteTimelock { + value: ans.value.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.RelativeTimelock }; + crate::api::types::SatisfiableItem::RelativeTimelock { + value: ans.value.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.Multisig }; + crate::api::types::SatisfiableItem::Multisig { + keys: ans.keys.cst_decode(), + threshold: ans.threshold.cst_decode(), + } + } + 9 => { + let ans = unsafe { self.kind.Thresh }; + crate::api::types::SatisfiableItem::Thresh { + items: ans.items.cst_decode(), + threshold: ans.threshold.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_script_amount { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::ScriptAmount { + crate::api::types::ScriptAmount { + script: self.script.cst_decode(), + amount: self.amount.cst_decode(), + } + } +} +impl CstDecode for wire_cst_sign_options { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SignOptions { + crate::api::types::SignOptions { + trust_witness_utxo: self.trust_witness_utxo.cst_decode(), + assume_height: self.assume_height.cst_decode(), + allow_all_sighashes: self.allow_all_sighashes.cst_decode(), + remove_partial_sigs: self.remove_partial_sigs.cst_decode(), + try_finalize: self.try_finalize.cst_decode(), + sign_with_tap_internal_key: self.sign_with_tap_internal_key.cst_decode(), + allow_grinding: self.allow_grinding.cst_decode(), + } + } +} +impl CstDecode for wire_cst_sled_db_configuration { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SledDbConfiguration { + crate::api::types::SledDbConfiguration { + path: self.path.cst_decode(), + tree_name: self.tree_name.cst_decode(), + } + } +} +impl CstDecode for wire_cst_sqlite_db_configuration { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SqliteDbConfiguration { + crate::api::types::SqliteDbConfiguration { + path: self.path.cst_decode(), + } + } +} +impl CstDecode for wire_cst_transaction_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::TransactionDetails { + crate::api::types::TransactionDetails { + transaction: self.transaction.cst_decode(), + txid: self.txid.cst_decode(), + received: self.received.cst_decode(), + sent: self.sent.cst_decode(), + fee: self.fee.cst_decode(), + confirmation_time: self.confirmation_time.cst_decode(), + } + } +} +impl CstDecode for wire_cst_tx_in { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::TxIn { + crate::api::types::TxIn { + previous_output: self.previous_output.cst_decode(), + script_sig: self.script_sig.cst_decode(), + sequence: self.sequence.cst_decode(), + witness: self.witness.cst_decode(), + } + } +} +impl CstDecode for wire_cst_tx_out { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::TxOut { + crate::api::types::TxOut { + value: self.value.cst_decode(), + script_pubkey: self.script_pubkey.cst_decode(), + } + } +} +impl CstDecode<[u8; 4]> for *mut wire_cst_list_prim_u_8_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> [u8; 4] { + let vec: Vec = self.cst_decode(); + flutter_rust_bridge::for_generated::from_vec_to_array(vec) + } +} +impl NewWithNullPtr for wire_cst_address_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: AddressErrorKind { nil__: () }, + } + } +} +impl Default for wire_cst_address_error { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_address_index { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: AddressIndexKind { nil__: () }, + } + } +} +impl Default for wire_cst_address_index { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_auth { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: AuthKind { nil__: () }, + } + } +} +impl Default for wire_cst_auth { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_balance { + fn new_with_null_ptr() -> Self { + Self { + immature: Default::default(), + trusted_pending: Default::default(), + untrusted_pending: Default::default(), + confirmed: Default::default(), + spendable: Default::default(), + total: Default::default(), + } + } +} +impl Default for wire_cst_balance { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_address { + fn new_with_null_ptr() -> Self { + Self { + ptr: Default::default(), + } + } +} +impl Default for wire_cst_bdk_address { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_blockchain { + fn new_with_null_ptr() -> Self { + Self { + ptr: Default::default(), + } + } +} +impl Default for wire_cst_bdk_blockchain { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_derivation_path { + fn new_with_null_ptr() -> Self { + Self { + ptr: Default::default(), + } + } +} +impl Default for wire_cst_bdk_derivation_path { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_descriptor { + fn new_with_null_ptr() -> Self { + Self { + extended_descriptor: Default::default(), + key_map: Default::default(), + } + } +} +impl Default for wire_cst_bdk_descriptor { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_descriptor_public_key { + fn new_with_null_ptr() -> Self { + Self { + ptr: Default::default(), + } + } +} +impl Default for wire_cst_bdk_descriptor_public_key { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_descriptor_secret_key { + fn new_with_null_ptr() -> Self { + Self { + ptr: Default::default(), + } + } +} +impl Default for wire_cst_bdk_descriptor_secret_key { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: BdkErrorKind { nil__: () }, + } + } +} +impl Default for wire_cst_bdk_error { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_mnemonic { + fn new_with_null_ptr() -> Self { + Self { + ptr: Default::default(), + } + } +} +impl Default for wire_cst_bdk_mnemonic { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_policy { + fn new_with_null_ptr() -> Self { + Self { + ptr: Default::default(), + } + } +} +impl Default for wire_cst_bdk_policy { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_psbt { + fn new_with_null_ptr() -> Self { + Self { + ptr: Default::default(), + } + } +} +impl Default for wire_cst_bdk_psbt { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_script_buf { + fn new_with_null_ptr() -> Self { + Self { + bytes: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_bdk_script_buf { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_transaction { + fn new_with_null_ptr() -> Self { + Self { + s: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_bdk_transaction { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bdk_wallet { + fn new_with_null_ptr() -> Self { + Self { + ptr: Default::default(), + } + } +} +impl Default for wire_cst_bdk_wallet { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_block_time { + fn new_with_null_ptr() -> Self { + Self { + height: Default::default(), + timestamp: Default::default(), + } + } +} +impl Default for wire_cst_block_time { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_blockchain_config { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: BlockchainConfigKind { nil__: () }, + } + } +} +impl Default for wire_cst_blockchain_config { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_condition { + fn new_with_null_ptr() -> Self { + Self { + csv: core::ptr::null_mut(), + timelock: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_condition { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_consensus_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: ConsensusErrorKind { nil__: () }, + } + } +} +impl Default for wire_cst_consensus_error { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_database_config { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: DatabaseConfigKind { nil__: () }, + } + } +} +impl Default for wire_cst_database_config { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_descriptor_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: DescriptorErrorKind { nil__: () }, + } + } +} +impl Default for wire_cst_descriptor_error { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_electrum_config { + fn new_with_null_ptr() -> Self { + Self { + url: core::ptr::null_mut(), + socks5: core::ptr::null_mut(), + retry: Default::default(), + timeout: core::ptr::null_mut(), + stop_gap: Default::default(), + validate_domain: Default::default(), + } + } +} +impl Default for wire_cst_electrum_config { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_esplora_config { + fn new_with_null_ptr() -> Self { + Self { + base_url: core::ptr::null_mut(), + proxy: core::ptr::null_mut(), + concurrency: core::ptr::null_mut(), + stop_gap: Default::default(), + timeout: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_esplora_config { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_fee_rate { + fn new_with_null_ptr() -> Self { + Self { + sat_per_vb: Default::default(), + } + } +} +impl Default for wire_cst_fee_rate { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_hex_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: HexErrorKind { nil__: () }, + } + } +} +impl Default for wire_cst_hex_error { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_input { + fn new_with_null_ptr() -> Self { + Self { + s: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_input { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_local_utxo { + fn new_with_null_ptr() -> Self { + Self { + outpoint: Default::default(), + txout: Default::default(), + keychain: Default::default(), + is_spent: Default::default(), + } + } +} +impl Default for wire_cst_local_utxo { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_lock_time { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LockTimeKind { nil__: () }, + } + } +} +impl Default for wire_cst_lock_time { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_out_point { + fn new_with_null_ptr() -> Self { + Self { + txid: core::ptr::null_mut(), + vout: Default::default(), + } + } +} +impl Default for wire_cst_out_point { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_payload { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: PayloadKind { nil__: () }, + } + } +} +impl Default for wire_cst_payload { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_pk_or_f { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: PkOrFKind { nil__: () }, + } + } +} +impl Default for wire_cst_pk_or_f { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_psbt_sig_hash_type { + fn new_with_null_ptr() -> Self { + Self { + inner: Default::default(), + } + } +} +impl Default for wire_cst_psbt_sig_hash_type { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_rbf_value { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: RbfValueKind { nil__: () }, + } + } +} +impl Default for wire_cst_rbf_value { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_record_bdk_address_u_32 { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), + field1: Default::default(), + } + } +} +impl Default for wire_cst_record_bdk_address_u_32 { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_record_bdk_psbt_transaction_details { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), + field1: Default::default(), + } + } +} +impl Default for wire_cst_record_bdk_psbt_transaction_details { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_record_list_prim_u_32_strict_list_condition { + fn new_with_null_ptr() -> Self { + Self { + field0: core::ptr::null_mut(), + field1: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_record_list_prim_u_32_strict_list_condition { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_record_out_point_input_usize { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), + field1: Default::default(), + field2: Default::default(), + } + } +} +impl Default for wire_cst_record_out_point_input_usize { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_record_string_list_prim_u_32_strict { + fn new_with_null_ptr() -> Self { + Self { + field0: core::ptr::null_mut(), + field1: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_record_string_list_prim_u_32_strict { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_record_u_32_list_condition { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), + field1: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_record_u_32_list_condition { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_rpc_config { + fn new_with_null_ptr() -> Self { + Self { + url: core::ptr::null_mut(), + auth: Default::default(), + network: Default::default(), + wallet_name: core::ptr::null_mut(), + sync_params: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_rpc_config { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_rpc_sync_params { + fn new_with_null_ptr() -> Self { + Self { + start_script_count: Default::default(), + start_time: Default::default(), + force_start_time: Default::default(), + poll_rate_sec: Default::default(), + } + } +} +impl Default for wire_cst_rpc_sync_params { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_satisfaction { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: SatisfactionKind { nil__: () }, + } + } +} +impl Default for wire_cst_satisfaction { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_satisfiable_item { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: SatisfiableItemKind { nil__: () }, + } + } +} +impl Default for wire_cst_satisfiable_item { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_script_amount { + fn new_with_null_ptr() -> Self { + Self { + script: Default::default(), + amount: Default::default(), + } + } +} +impl Default for wire_cst_script_amount { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_sign_options { + fn new_with_null_ptr() -> Self { + Self { + trust_witness_utxo: Default::default(), + assume_height: core::ptr::null_mut(), + allow_all_sighashes: Default::default(), + remove_partial_sigs: Default::default(), + try_finalize: Default::default(), + sign_with_tap_internal_key: Default::default(), + allow_grinding: Default::default(), + } + } +} +impl Default for wire_cst_sign_options { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_sled_db_configuration { + fn new_with_null_ptr() -> Self { + Self { + path: core::ptr::null_mut(), + tree_name: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_sled_db_configuration { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_sqlite_db_configuration { + fn new_with_null_ptr() -> Self { + Self { + path: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_sqlite_db_configuration { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_transaction_details { + fn new_with_null_ptr() -> Self { + Self { + transaction: core::ptr::null_mut(), + txid: core::ptr::null_mut(), + received: Default::default(), + sent: Default::default(), + fee: core::ptr::null_mut(), + confirmation_time: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_transaction_details { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_tx_in { + fn new_with_null_ptr() -> Self { + Self { + previous_output: Default::default(), + script_sig: Default::default(), + sequence: Default::default(), + witness: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_tx_in { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_tx_out { + fn new_with_null_ptr() -> Self { + Self { + value: Default::default(), + script_pubkey: Default::default(), + } + } +} +impl Default for wire_cst_tx_out { + fn default() -> Self { + Self::new_with_null_ptr() + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast( + port_: i64, + ptr: *mut wire_cst_bdk_blockchain, + transaction: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__blockchain__bdk_blockchain_broadcast_impl(port_, ptr, transaction) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create( + port_: i64, + blockchain_config: *mut wire_cst_blockchain_config, +) { + wire__crate__api__blockchain__bdk_blockchain_create_impl(port_, blockchain_config) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee( + port_: i64, + that: *mut wire_cst_bdk_blockchain, + target: u64, +) { + wire__crate__api__blockchain__bdk_blockchain_estimate_fee_impl(port_, that, target) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash( + port_: i64, + that: *mut wire_cst_bdk_blockchain, + height: u32, +) { + wire__crate__api__blockchain__bdk_blockchain_get_block_hash_impl(port_, that, height) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height( + port_: i64, + that: *mut wire_cst_bdk_blockchain, +) { + wire__crate__api__blockchain__bdk_blockchain_get_height_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string( + that: *mut wire_cst_bdk_descriptor, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__descriptor__bdk_descriptor_as_string_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( + that: *mut wire_cst_bdk_descriptor, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new( + port_: i64, + descriptor: *mut wire_cst_list_prim_u_8_strict, + network: i32, +) { + wire__crate__api__descriptor__bdk_descriptor_new_impl(port_, descriptor, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44( + port_: i64, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__bdk_descriptor_new_bip44_impl( + port_, + secret_key, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( + port_: i64, + public_key: *mut wire_cst_bdk_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__bdk_descriptor_new_bip44_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49( + port_: i64, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__bdk_descriptor_new_bip49_impl( + port_, + secret_key, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( + port_: i64, + public_key: *mut wire_cst_bdk_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__bdk_descriptor_new_bip49_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84( + port_: i64, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__bdk_descriptor_new_bip84_impl( + port_, + secret_key, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( + port_: i64, + public_key: *mut wire_cst_bdk_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__bdk_descriptor_new_bip84_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86( + port_: i64, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__bdk_descriptor_new_bip86_impl( + port_, + secret_key, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( + port_: i64, + public_key: *mut wire_cst_bdk_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__bdk_descriptor_new_bip86_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private( + that: *mut wire_cst_bdk_descriptor, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__descriptor__bdk_descriptor_to_string_private_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string( + that: *mut wire_cst_bdk_derivation_path, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__bdk_derivation_path_as_string_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string( + port_: i64, + path: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__key__bdk_derivation_path_from_string_impl(port_, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string( + that: *mut wire_cst_bdk_descriptor_public_key, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__bdk_descriptor_public_key_as_string_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive( + port_: i64, + ptr: *mut wire_cst_bdk_descriptor_public_key, + path: *mut wire_cst_bdk_derivation_path, +) { + wire__crate__api__key__bdk_descriptor_public_key_derive_impl(port_, ptr, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend( + port_: i64, + ptr: *mut wire_cst_bdk_descriptor_public_key, + path: *mut wire_cst_bdk_derivation_path, +) { + wire__crate__api__key__bdk_descriptor_public_key_extend_impl(port_, ptr, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string( + port_: i64, + public_key: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__key__bdk_descriptor_public_key_from_string_impl(port_, public_key) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public( + ptr: *mut wire_cst_bdk_descriptor_secret_key, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__bdk_descriptor_secret_key_as_public_impl(ptr) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string( + that: *mut wire_cst_bdk_descriptor_secret_key, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__bdk_descriptor_secret_key_as_string_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create( + port_: i64, + network: i32, + mnemonic: *mut wire_cst_bdk_mnemonic, + password: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__key__bdk_descriptor_secret_key_create_impl(port_, network, mnemonic, password) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive( + port_: i64, + ptr: *mut wire_cst_bdk_descriptor_secret_key, + path: *mut wire_cst_bdk_derivation_path, +) { + wire__crate__api__key__bdk_descriptor_secret_key_derive_impl(port_, ptr, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend( + port_: i64, + ptr: *mut wire_cst_bdk_descriptor_secret_key, + path: *mut wire_cst_bdk_derivation_path, +) { + wire__crate__api__key__bdk_descriptor_secret_key_extend_impl(port_, ptr, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string( + port_: i64, + secret_key: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__key__bdk_descriptor_secret_key_from_string_impl(port_, secret_key) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( + that: *mut wire_cst_bdk_descriptor_secret_key, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string( + that: *mut wire_cst_bdk_mnemonic, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__bdk_mnemonic_as_string_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy( + port_: i64, + entropy: *mut wire_cst_list_prim_u_8_loose, +) { + wire__crate__api__key__bdk_mnemonic_from_entropy_impl(port_, entropy) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string( + port_: i64, + mnemonic: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__key__bdk_mnemonic_from_string_impl(port_, mnemonic) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new( + port_: i64, + word_count: i32, +) { + wire__crate__api__key__bdk_mnemonic_new_impl(port_, word_count) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string( + that: *mut wire_cst_bdk_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__psbt__bdk_psbt_as_string_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine( + port_: i64, + ptr: *mut wire_cst_bdk_psbt, + other: *mut wire_cst_bdk_psbt, +) { + wire__crate__api__psbt__bdk_psbt_combine_impl(port_, ptr, other) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx( + ptr: *mut wire_cst_bdk_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__psbt__bdk_psbt_extract_tx_impl(ptr) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount( + that: *mut wire_cst_bdk_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__psbt__bdk_psbt_fee_amount_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate( + that: *mut wire_cst_bdk_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__psbt__bdk_psbt_fee_rate_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str( + port_: i64, + psbt_base64: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__psbt__bdk_psbt_from_str_impl(port_, psbt_base64) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize( + that: *mut wire_cst_bdk_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__psbt__bdk_psbt_json_serialize_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize( + that: *mut wire_cst_bdk_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__psbt__bdk_psbt_serialize_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid( + that: *mut wire_cst_bdk_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__psbt__bdk_psbt_txid_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string( + that: *mut wire_cst_bdk_address, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_address_as_string_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script( + port_: i64, + script: *mut wire_cst_bdk_script_buf, + network: i32, +) { + wire__crate__api__types__bdk_address_from_script_impl(port_, script, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string( + port_: i64, + address: *mut wire_cst_list_prim_u_8_strict, + network: i32, +) { + wire__crate__api__types__bdk_address_from_string_impl(port_, address, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network( + that: *mut wire_cst_bdk_address, + network: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_address_is_valid_for_network_impl(that, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network( + that: *mut wire_cst_bdk_address, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_address_network_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload( + that: *mut wire_cst_bdk_address, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_address_payload_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script( + ptr: *mut wire_cst_bdk_address, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_address_script_impl(ptr) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri( + that: *mut wire_cst_bdk_address, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_address_to_qr_uri_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_as_string( + that: *mut wire_cst_bdk_policy, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_policy_as_string_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_contribution( + that: *mut wire_cst_bdk_policy, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_policy_contribution_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_id( + that: *mut wire_cst_bdk_policy, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_policy_id_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_item( + that: *mut wire_cst_bdk_policy, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_policy_item_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_requires_path( + that: *mut wire_cst_bdk_policy, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_policy_requires_path_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_policy_satisfaction( + that: *mut wire_cst_bdk_policy, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_policy_satisfaction_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string( + that: *mut wire_cst_bdk_script_buf, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_script_buf_as_string_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty( +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__bdk_script_buf_empty_impl() +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__types__bdk_script_buf_from_hex_impl(port_, s) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity( + port_: i64, + capacity: usize, +) { + wire__crate__api__types__bdk_script_buf_with_capacity_impl(port_, capacity) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes( + port_: i64, + transaction_bytes: *mut wire_cst_list_prim_u_8_loose, +) { + wire__crate__api__types__bdk_transaction_from_bytes_impl(port_, transaction_bytes) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_input_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_is_coin_base_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_is_explicitly_rbf_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_is_lock_time_enabled_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_lock_time_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new( + port_: i64, + version: i32, + lock_time: *mut wire_cst_lock_time, + input: *mut wire_cst_list_tx_in, + output: *mut wire_cst_list_tx_out, +) { + wire__crate__api__types__bdk_transaction_new_impl(port_, version, lock_time, input, output) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_output_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_serialize_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_size_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_txid_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_version_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_vsize_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire__crate__api__types__bdk_transaction_weight_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address( + ptr: *mut wire_cst_bdk_wallet, + address_index: *mut wire_cst_address_index, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__bdk_wallet_get_address_impl(ptr, address_index) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance( + that: *mut wire_cst_bdk_wallet, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__bdk_wallet_get_balance_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( + ptr: *mut wire_cst_bdk_wallet, + keychain: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain_impl(ptr, keychain) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address( + ptr: *mut wire_cst_bdk_wallet, + address_index: *mut wire_cst_address_index, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__bdk_wallet_get_internal_address_impl(ptr, address_index) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input( + port_: i64, + that: *mut wire_cst_bdk_wallet, + utxo: *mut wire_cst_local_utxo, + only_witness_utxo: bool, + sighash_type: *mut wire_cst_psbt_sig_hash_type, +) { + wire__crate__api__wallet__bdk_wallet_get_psbt_input_impl( + port_, + that, + utxo, + only_witness_utxo, + sighash_type, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine( + ptr: *mut wire_cst_bdk_wallet, + script: *mut wire_cst_bdk_script_buf, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__bdk_wallet_is_mine_impl(ptr, script) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions( + that: *mut wire_cst_bdk_wallet, + include_raw: bool, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__bdk_wallet_list_transactions_impl(that, include_raw) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent( + that: *mut wire_cst_bdk_wallet, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__bdk_wallet_list_unspent_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network( + that: *mut wire_cst_bdk_wallet, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__bdk_wallet_network_impl(that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new( + port_: i64, + descriptor: *mut wire_cst_bdk_descriptor, + change_descriptor: *mut wire_cst_bdk_descriptor, + network: i32, + database_config: *mut wire_cst_database_config, +) { + wire__crate__api__wallet__bdk_wallet_new_impl( + port_, + descriptor, + change_descriptor, + network, + database_config, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies( + ptr: *mut wire_cst_bdk_wallet, + keychain: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__bdk_wallet_policies_impl(ptr, keychain) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign( + port_: i64, + ptr: *mut wire_cst_bdk_wallet, + psbt: *mut wire_cst_bdk_psbt, + sign_options: *mut wire_cst_sign_options, +) { + wire__crate__api__wallet__bdk_wallet_sign_impl(port_, ptr, psbt, sign_options) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync( + port_: i64, + ptr: *mut wire_cst_bdk_wallet, + blockchain: *mut wire_cst_bdk_blockchain, +) { + wire__crate__api__wallet__bdk_wallet_sync_impl(port_, ptr, blockchain) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder( + port_: i64, + txid: *mut wire_cst_list_prim_u_8_strict, + fee_rate: f32, + allow_shrinking: *mut wire_cst_bdk_address, + wallet: *mut wire_cst_bdk_wallet, + enable_rbf: bool, + n_sequence: *mut u32, +) { + wire__crate__api__wallet__finish_bump_fee_tx_builder_impl( + port_, + txid, + fee_rate, + allow_shrinking, + wallet, + enable_rbf, + n_sequence, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish( + port_: i64, + wallet: *mut wire_cst_bdk_wallet, + recipients: *mut wire_cst_list_script_amount, + utxos: *mut wire_cst_list_out_point, + foreign_utxo: *mut wire_cst_record_out_point_input_usize, + un_spendable: *mut wire_cst_list_out_point, + change_policy: i32, + manually_selected_only: bool, + fee_rate: *mut f32, + fee_absolute: *mut u64, + drain_wallet: bool, + drain_to: *mut wire_cst_bdk_script_buf, + rbf: *mut wire_cst_rbf_value, + internal_policy_path: *mut wire_cst_list_record_string_list_prim_u_32_strict, + external_policy_path: *mut wire_cst_list_record_string_list_prim_u_32_strict, + data: *mut wire_cst_list_prim_u_8_loose, +) { + wire__crate__api__wallet__tx_builder_finish_impl( + port_, + wallet, + recipients, + utxos, + foreign_utxo, + un_spendable, + change_policy, + manually_selected_only, + fee_rate, + fee_absolute, + drain_wallet, + drain_to, + rbf, + internal_policy_path, + external_policy_path, + data, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorPolicy( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorPolicy( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>>::increment_strong_count( + ptr as _, + ); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>>::decrement_strong_count( + ptr as _, + ); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_address_error( +) -> *mut wire_cst_address_error { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_address_error::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_address_index( +) -> *mut wire_cst_address_index { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_address_index::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address() -> *mut wire_cst_bdk_address +{ + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_address::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain( +) -> *mut wire_cst_bdk_blockchain { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bdk_blockchain::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path( +) -> *mut wire_cst_bdk_derivation_path { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bdk_derivation_path::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor( +) -> *mut wire_cst_bdk_descriptor { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bdk_descriptor::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key( +) -> *mut wire_cst_bdk_descriptor_public_key { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bdk_descriptor_public_key::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key( +) -> *mut wire_cst_bdk_descriptor_secret_key { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bdk_descriptor_secret_key::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic() -> *mut wire_cst_bdk_mnemonic +{ + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_mnemonic::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_policy() -> *mut wire_cst_bdk_policy { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_policy::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt() -> *mut wire_cst_bdk_psbt { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_psbt::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf( +) -> *mut wire_cst_bdk_script_buf { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bdk_script_buf::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction( +) -> *mut wire_cst_bdk_transaction { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bdk_transaction::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet() -> *mut wire_cst_bdk_wallet { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_wallet::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_block_time() -> *mut wire_cst_block_time { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_block_time::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config( +) -> *mut wire_cst_blockchain_config { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_blockchain_config::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_bool(value: bool) -> *mut bool { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_condition() -> *mut wire_cst_condition { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_condition::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error( +) -> *mut wire_cst_consensus_error { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_consensus_error::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_database_config( +) -> *mut wire_cst_database_config { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_database_config::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error( +) -> *mut wire_cst_descriptor_error { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_descriptor_error::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config( +) -> *mut wire_cst_electrum_config { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_electrum_config::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config( +) -> *mut wire_cst_esplora_config { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_esplora_config::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_f_32(value: f32) -> *mut f32 { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate() -> *mut wire_cst_fee_rate { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_fee_rate::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_hex_error() -> *mut wire_cst_hex_error { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_hex_error::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo() -> *mut wire_cst_local_utxo { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_local_utxo::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_lock_time() -> *mut wire_cst_lock_time { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_lock_time::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_out_point() -> *mut wire_cst_out_point { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_out_point::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_pk_or_f() -> *mut wire_cst_pk_or_f { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_pk_or_f::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_psbt_sig_hash_type( +) -> *mut wire_cst_psbt_sig_hash_type { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_psbt_sig_hash_type::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_rbf_value() -> *mut wire_cst_rbf_value { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_rbf_value::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_record_out_point_input_usize( +) -> *mut wire_cst_record_out_point_input_usize { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_record_out_point_input_usize::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config() -> *mut wire_cst_rpc_config { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_rpc_config::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params( +) -> *mut wire_cst_rpc_sync_params { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_rpc_sync_params::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_sign_options() -> *mut wire_cst_sign_options +{ + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_sign_options::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_sled_db_configuration( +) -> *mut wire_cst_sled_db_configuration { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_sled_db_configuration::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration( +) -> *mut wire_cst_sqlite_db_configuration { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_sqlite_db_configuration::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_u_32(value: u32) -> *mut u32 { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_u_64(value: u64) -> *mut u64 { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_u_8(value: u8) -> *mut u8 { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_bdk_policy( + len: i32, +) -> *mut wire_cst_list_bdk_policy { + let wrap = wire_cst_list_bdk_policy { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_condition( + len: i32, +) -> *mut wire_cst_list_condition { + let wrap = wire_cst_list_condition { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict( + len: i32, +) -> *mut wire_cst_list_list_prim_u_8_strict { + let wrap = wire_cst_list_list_prim_u_8_strict { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + <*mut wire_cst_list_prim_u_8_strict>::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_local_utxo( + len: i32, +) -> *mut wire_cst_list_local_utxo { + let wrap = wire_cst_list_local_utxo { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_out_point( + len: i32, +) -> *mut wire_cst_list_out_point { + let wrap = wire_cst_list_out_point { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_pk_or_f(len: i32) -> *mut wire_cst_list_pk_or_f { + let wrap = wire_cst_list_pk_or_f { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_prim_u_32_strict( + len: i32, +) -> *mut wire_cst_list_prim_u_32_strict { + let ans = wire_cst_list_prim_u_32_strict { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_prim_u_64_strict( + len: i32, +) -> *mut wire_cst_list_prim_u_64_strict { + let ans = wire_cst_list_prim_u_64_strict { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_prim_u_8_loose( + len: i32, +) -> *mut wire_cst_list_prim_u_8_loose { + let ans = wire_cst_list_prim_u_8_loose { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_prim_u_8_strict( + len: i32, +) -> *mut wire_cst_list_prim_u_8_strict { + let ans = wire_cst_list_prim_u_8_strict { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition( + len: i32, +) -> *mut wire_cst_list_record_list_prim_u_32_strict_list_condition { + let wrap = wire_cst_list_record_list_prim_u_32_strict_list_condition { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict( + len: i32, +) -> *mut wire_cst_list_record_string_list_prim_u_32_strict { + let wrap = wire_cst_list_record_string_list_prim_u_32_strict { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition( + len: i32, +) -> *mut wire_cst_list_record_u_32_list_condition { + let wrap = wire_cst_list_record_u_32_list_condition { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_script_amount( + len: i32, +) -> *mut wire_cst_list_script_amount { + let wrap = wire_cst_list_script_amount { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_transaction_details( + len: i32, +) -> *mut wire_cst_list_transaction_details { + let wrap = wire_cst_list_transaction_details { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_tx_in(len: i32) -> *mut wire_cst_list_tx_in { + let wrap = wire_cst_list_tx_in { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_list_tx_out(len: i32) -> *mut wire_cst_list_tx_out { + let wrap = wire_cst_list_tx_out { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_address_error { + tag: i32, + kind: AddressErrorKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union AddressErrorKind { + Base58: wire_cst_AddressError_Base58, + Bech32: wire_cst_AddressError_Bech32, + InvalidBech32Variant: wire_cst_AddressError_InvalidBech32Variant, + InvalidWitnessVersion: wire_cst_AddressError_InvalidWitnessVersion, + UnparsableWitnessVersion: wire_cst_AddressError_UnparsableWitnessVersion, + InvalidWitnessProgramLength: wire_cst_AddressError_InvalidWitnessProgramLength, + InvalidSegwitV0ProgramLength: wire_cst_AddressError_InvalidSegwitV0ProgramLength, + UnknownAddressType: wire_cst_AddressError_UnknownAddressType, + NetworkValidation: wire_cst_AddressError_NetworkValidation, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressError_Base58 { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressError_Bech32 { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressError_InvalidBech32Variant { + expected: i32, + found: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressError_InvalidWitnessVersion { + field0: u8, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressError_UnparsableWitnessVersion { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressError_InvalidWitnessProgramLength { + field0: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressError_InvalidSegwitV0ProgramLength { + field0: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressError_UnknownAddressType { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressError_NetworkValidation { + network_required: i32, + network_found: i32, + address: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_address_index { + tag: i32, + kind: AddressIndexKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union AddressIndexKind { + Peek: wire_cst_AddressIndex_Peek, + Reset: wire_cst_AddressIndex_Reset, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressIndex_Peek { + index: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AddressIndex_Reset { + index: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_auth { + tag: i32, + kind: AuthKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union AuthKind { + UserPass: wire_cst_Auth_UserPass, + Cookie: wire_cst_Auth_Cookie, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_Auth_UserPass { + username: *mut wire_cst_list_prim_u_8_strict, + password: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_Auth_Cookie { + file: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_balance { + immature: u64, + trusted_pending: u64, + untrusted_pending: u64, + confirmed: u64, + spendable: u64, + total: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_address { + ptr: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_blockchain { + ptr: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_derivation_path { + ptr: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_descriptor { + extended_descriptor: usize, + key_map: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_descriptor_public_key { + ptr: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_descriptor_secret_key { + ptr: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_error { + tag: i32, + kind: BdkErrorKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union BdkErrorKind { + Hex: wire_cst_BdkError_Hex, + Consensus: wire_cst_BdkError_Consensus, + VerifyTransaction: wire_cst_BdkError_VerifyTransaction, + Address: wire_cst_BdkError_Address, + Descriptor: wire_cst_BdkError_Descriptor, + InvalidU32Bytes: wire_cst_BdkError_InvalidU32Bytes, + Generic: wire_cst_BdkError_Generic, + OutputBelowDustLimit: wire_cst_BdkError_OutputBelowDustLimit, + InsufficientFunds: wire_cst_BdkError_InsufficientFunds, + FeeRateTooLow: wire_cst_BdkError_FeeRateTooLow, + FeeTooLow: wire_cst_BdkError_FeeTooLow, + MissingKeyOrigin: wire_cst_BdkError_MissingKeyOrigin, + Key: wire_cst_BdkError_Key, + SpendingPolicyRequired: wire_cst_BdkError_SpendingPolicyRequired, + InvalidPolicyPathError: wire_cst_BdkError_InvalidPolicyPathError, + Signer: wire_cst_BdkError_Signer, + InvalidNetwork: wire_cst_BdkError_InvalidNetwork, + InvalidOutpoint: wire_cst_BdkError_InvalidOutpoint, + Encode: wire_cst_BdkError_Encode, + Miniscript: wire_cst_BdkError_Miniscript, + MiniscriptPsbt: wire_cst_BdkError_MiniscriptPsbt, + Bip32: wire_cst_BdkError_Bip32, + Bip39: wire_cst_BdkError_Bip39, + Secp256k1: wire_cst_BdkError_Secp256k1, + Json: wire_cst_BdkError_Json, + Psbt: wire_cst_BdkError_Psbt, + PsbtParse: wire_cst_BdkError_PsbtParse, + MissingCachedScripts: wire_cst_BdkError_MissingCachedScripts, + Electrum: wire_cst_BdkError_Electrum, + Esplora: wire_cst_BdkError_Esplora, + Sled: wire_cst_BdkError_Sled, + Rpc: wire_cst_BdkError_Rpc, + Rusqlite: wire_cst_BdkError_Rusqlite, + InvalidInput: wire_cst_BdkError_InvalidInput, + InvalidLockTime: wire_cst_BdkError_InvalidLockTime, + InvalidTransaction: wire_cst_BdkError_InvalidTransaction, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Hex { + field0: *mut wire_cst_hex_error, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Consensus { + field0: *mut wire_cst_consensus_error, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_VerifyTransaction { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Address { + field0: *mut wire_cst_address_error, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Descriptor { + field0: *mut wire_cst_descriptor_error, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_InvalidU32Bytes { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Generic { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_OutputBelowDustLimit { + field0: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_InsufficientFunds { + needed: u64, + available: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_FeeRateTooLow { + needed: f32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_FeeTooLow { + needed: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_MissingKeyOrigin { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Key { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_SpendingPolicyRequired { + field0: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_InvalidPolicyPathError { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Signer { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_InvalidNetwork { + requested: i32, + found: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_InvalidOutpoint { + field0: *mut wire_cst_out_point, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Encode { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Miniscript { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_MiniscriptPsbt { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Bip32 { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Bip39 { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Secp256k1 { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Json { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Psbt { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_PsbtParse { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_MissingCachedScripts { + field0: usize, + field1: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Electrum { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Esplora { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Sled { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Rpc { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_Rusqlite { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_InvalidInput { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_InvalidLockTime { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BdkError_InvalidTransaction { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_mnemonic { + ptr: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_policy { + ptr: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_psbt { + ptr: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_script_buf { + bytes: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_transaction { + s: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bdk_wallet { + ptr: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_block_time { + height: u32, + timestamp: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_blockchain_config { + tag: i32, + kind: BlockchainConfigKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union BlockchainConfigKind { + Electrum: wire_cst_BlockchainConfig_Electrum, + Esplora: wire_cst_BlockchainConfig_Esplora, + Rpc: wire_cst_BlockchainConfig_Rpc, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BlockchainConfig_Electrum { + config: *mut wire_cst_electrum_config, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BlockchainConfig_Esplora { + config: *mut wire_cst_esplora_config, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BlockchainConfig_Rpc { + config: *mut wire_cst_rpc_config, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_condition { + csv: *mut u32, + timelock: *mut wire_cst_lock_time, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_consensus_error { + tag: i32, + kind: ConsensusErrorKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union ConsensusErrorKind { + Io: wire_cst_ConsensusError_Io, + OversizedVectorAllocation: wire_cst_ConsensusError_OversizedVectorAllocation, + InvalidChecksum: wire_cst_ConsensusError_InvalidChecksum, + ParseFailed: wire_cst_ConsensusError_ParseFailed, + UnsupportedSegwitFlag: wire_cst_ConsensusError_UnsupportedSegwitFlag, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConsensusError_Io { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConsensusError_OversizedVectorAllocation { + requested: usize, + max: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConsensusError_InvalidChecksum { + expected: *mut wire_cst_list_prim_u_8_strict, + actual: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConsensusError_ParseFailed { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConsensusError_UnsupportedSegwitFlag { + field0: u8, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_database_config { + tag: i32, + kind: DatabaseConfigKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union DatabaseConfigKind { + Sqlite: wire_cst_DatabaseConfig_Sqlite, + Sled: wire_cst_DatabaseConfig_Sled, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DatabaseConfig_Sqlite { + config: *mut wire_cst_sqlite_db_configuration, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DatabaseConfig_Sled { + config: *mut wire_cst_sled_db_configuration, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_descriptor_error { + tag: i32, + kind: DescriptorErrorKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union DescriptorErrorKind { + Key: wire_cst_DescriptorError_Key, + Policy: wire_cst_DescriptorError_Policy, + InvalidDescriptorCharacter: wire_cst_DescriptorError_InvalidDescriptorCharacter, + Bip32: wire_cst_DescriptorError_Bip32, + Base58: wire_cst_DescriptorError_Base58, + Pk: wire_cst_DescriptorError_Pk, + Miniscript: wire_cst_DescriptorError_Miniscript, + Hex: wire_cst_DescriptorError_Hex, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DescriptorError_Key { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DescriptorError_Policy { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DescriptorError_InvalidDescriptorCharacter { + field0: u8, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DescriptorError_Bip32 { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DescriptorError_Base58 { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DescriptorError_Pk { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DescriptorError_Miniscript { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_DescriptorError_Hex { + field0: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_electrum_config { + url: *mut wire_cst_list_prim_u_8_strict, + socks5: *mut wire_cst_list_prim_u_8_strict, + retry: u8, + timeout: *mut u8, + stop_gap: u64, + validate_domain: bool, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_esplora_config { + base_url: *mut wire_cst_list_prim_u_8_strict, + proxy: *mut wire_cst_list_prim_u_8_strict, + concurrency: *mut u8, + stop_gap: u64, + timeout: *mut u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_fee_rate { + sat_per_vb: f32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_hex_error { + tag: i32, + kind: HexErrorKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union HexErrorKind { + InvalidChar: wire_cst_HexError_InvalidChar, + OddLengthString: wire_cst_HexError_OddLengthString, + InvalidLength: wire_cst_HexError_InvalidLength, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_HexError_InvalidChar { + field0: u8, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_HexError_OddLengthString { + field0: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_HexError_InvalidLength { + field0: usize, + field1: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_input { + s: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_bdk_policy { + ptr: *mut wire_cst_bdk_policy, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_condition { + ptr: *mut wire_cst_condition, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_list_prim_u_8_strict { + ptr: *mut *mut wire_cst_list_prim_u_8_strict, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_local_utxo { + ptr: *mut wire_cst_local_utxo, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_out_point { + ptr: *mut wire_cst_out_point, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_pk_or_f { + ptr: *mut wire_cst_pk_or_f, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_prim_u_32_strict { + ptr: *mut u32, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_prim_u_64_strict { + ptr: *mut u64, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_prim_u_8_loose { + ptr: *mut u8, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_prim_u_8_strict { + ptr: *mut u8, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_record_list_prim_u_32_strict_list_condition { + ptr: *mut wire_cst_record_list_prim_u_32_strict_list_condition, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_record_string_list_prim_u_32_strict { + ptr: *mut wire_cst_record_string_list_prim_u_32_strict, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_record_u_32_list_condition { + ptr: *mut wire_cst_record_u_32_list_condition, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_script_amount { + ptr: *mut wire_cst_script_amount, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_transaction_details { + ptr: *mut wire_cst_transaction_details, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_tx_in { + ptr: *mut wire_cst_tx_in, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_tx_out { + ptr: *mut wire_cst_tx_out, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_local_utxo { + outpoint: wire_cst_out_point, + txout: wire_cst_tx_out, + keychain: i32, + is_spent: bool, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_lock_time { + tag: i32, + kind: LockTimeKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union LockTimeKind { + Blocks: wire_cst_LockTime_Blocks, + Seconds: wire_cst_LockTime_Seconds, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LockTime_Blocks { + field0: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LockTime_Seconds { + field0: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_out_point { + txid: *mut wire_cst_list_prim_u_8_strict, + vout: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_payload { + tag: i32, + kind: PayloadKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union PayloadKind { + PubkeyHash: wire_cst_Payload_PubkeyHash, + ScriptHash: wire_cst_Payload_ScriptHash, + WitnessProgram: wire_cst_Payload_WitnessProgram, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_Payload_PubkeyHash { + pubkey_hash: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_Payload_ScriptHash { + script_hash: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_Payload_WitnessProgram { + version: i32, + program: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_pk_or_f { + tag: i32, + kind: PkOrFKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union PkOrFKind { + Pubkey: wire_cst_PkOrF_Pubkey, + XOnlyPubkey: wire_cst_PkOrF_XOnlyPubkey, + Fingerprint: wire_cst_PkOrF_Fingerprint, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_PkOrF_Pubkey { + value: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_PkOrF_XOnlyPubkey { + value: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_PkOrF_Fingerprint { + value: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_psbt_sig_hash_type { + inner: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_rbf_value { + tag: i32, + kind: RbfValueKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union RbfValueKind { + Value: wire_cst_RbfValue_Value, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_RbfValue_Value { + field0: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_record_bdk_address_u_32 { + field0: wire_cst_bdk_address, + field1: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_record_bdk_psbt_transaction_details { + field0: wire_cst_bdk_psbt, + field1: wire_cst_transaction_details, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_record_list_prim_u_32_strict_list_condition { + field0: *mut wire_cst_list_prim_u_32_strict, + field1: *mut wire_cst_list_condition, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_record_out_point_input_usize { + field0: wire_cst_out_point, + field1: wire_cst_input, + field2: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_record_string_list_prim_u_32_strict { + field0: *mut wire_cst_list_prim_u_8_strict, + field1: *mut wire_cst_list_prim_u_32_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_record_u_32_list_condition { + field0: u32, + field1: *mut wire_cst_list_condition, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_rpc_config { + url: *mut wire_cst_list_prim_u_8_strict, + auth: wire_cst_auth, + network: i32, + wallet_name: *mut wire_cst_list_prim_u_8_strict, + sync_params: *mut wire_cst_rpc_sync_params, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_rpc_sync_params { + start_script_count: u64, + start_time: u64, + force_start_time: bool, + poll_rate_sec: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_satisfaction { + tag: i32, + kind: SatisfactionKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union SatisfactionKind { + Partial: wire_cst_Satisfaction_Partial, + PartialComplete: wire_cst_Satisfaction_PartialComplete, + Complete: wire_cst_Satisfaction_Complete, + None: wire_cst_Satisfaction_None, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_Satisfaction_Partial { + n: u64, + m: u64, + items: *mut wire_cst_list_prim_u_64_strict, + sorted: *mut bool, + conditions: *mut wire_cst_list_record_u_32_list_condition, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_Satisfaction_PartialComplete { + n: u64, + m: u64, + items: *mut wire_cst_list_prim_u_64_strict, + sorted: *mut bool, + conditions: *mut wire_cst_list_record_list_prim_u_32_strict_list_condition, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_Satisfaction_Complete { + condition: *mut wire_cst_condition, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_Satisfaction_None { + msg: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_satisfiable_item { + tag: i32, + kind: SatisfiableItemKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union SatisfiableItemKind { + EcdsaSignature: wire_cst_SatisfiableItem_EcdsaSignature, + SchnorrSignature: wire_cst_SatisfiableItem_SchnorrSignature, + Sha256Preimage: wire_cst_SatisfiableItem_Sha256Preimage, + Hash256Preimage: wire_cst_SatisfiableItem_Hash256Preimage, + Ripemd160Preimage: wire_cst_SatisfiableItem_Ripemd160Preimage, + Hash160Preimage: wire_cst_SatisfiableItem_Hash160Preimage, + AbsoluteTimelock: wire_cst_SatisfiableItem_AbsoluteTimelock, + RelativeTimelock: wire_cst_SatisfiableItem_RelativeTimelock, + Multisig: wire_cst_SatisfiableItem_Multisig, + Thresh: wire_cst_SatisfiableItem_Thresh, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_EcdsaSignature { + key: *mut wire_cst_pk_or_f, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_SchnorrSignature { + key: *mut wire_cst_pk_or_f, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_Sha256Preimage { + hash: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_Hash256Preimage { + hash: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_Ripemd160Preimage { + hash: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_Hash160Preimage { + hash: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_AbsoluteTimelock { + value: *mut wire_cst_lock_time, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_RelativeTimelock { + value: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_Multisig { + keys: *mut wire_cst_list_pk_or_f, + threshold: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SatisfiableItem_Thresh { + items: *mut wire_cst_list_bdk_policy, + threshold: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_script_amount { + script: wire_cst_bdk_script_buf, + amount: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_sign_options { + trust_witness_utxo: bool, + assume_height: *mut u32, + allow_all_sighashes: bool, + remove_partial_sigs: bool, + try_finalize: bool, + sign_with_tap_internal_key: bool, + allow_grinding: bool, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_sled_db_configuration { + path: *mut wire_cst_list_prim_u_8_strict, + tree_name: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_sqlite_db_configuration { + path: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_transaction_details { + transaction: *mut wire_cst_bdk_transaction, + txid: *mut wire_cst_list_prim_u_8_strict, + received: u64, + sent: u64, + fee: *mut u64, + confirmation_time: *mut wire_cst_block_time, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_tx_in { + previous_output: wire_cst_out_point, + script_sig: wire_cst_bdk_script_buf, + sequence: u32, + witness: *mut wire_cst_list_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_tx_out { + value: u64, + script_pubkey: wire_cst_bdk_script_buf, +} diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs new file mode 100644 index 00000000..cfe6c5e3 --- /dev/null +++ b/rust/src/frb_generated.rs @@ -0,0 +1,7124 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +#![allow( + non_camel_case_types, + unused, + non_snake_case, + clippy::needless_return, + clippy::redundant_closure_call, + clippy::redundant_closure, + clippy::useless_conversion, + clippy::unit_arg, + clippy::unused_unit, + clippy::double_parens, + clippy::let_and_return, + clippy::too_many_arguments, + clippy::match_single_binding, + clippy::clone_on_copy, + clippy::let_unit_value, + clippy::deref_addrof, + clippy::explicit_auto_deref, + clippy::borrow_deref_ref, + clippy::needless_borrow +)] + +// Section: imports + +use crate::*; +use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; +use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; +use flutter_rust_bridge::{Handler, IntoIntoDart}; + +// Section: boilerplate + +flutter_rust_bridge::frb_generated_boilerplate!( + default_stream_sink_codec = DcoCodec, + default_rust_opaque = RustOpaqueNom, + default_rust_auto_opaque = RustAutoOpaqueNom, +); +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -321771070; + +// Section: executor + +flutter_rust_bridge::frb_generated_default_handler!(); + +// Section: wire_funcs + +fn wire__crate__api__blockchain__bdk_blockchain_broadcast_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + transaction: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_blockchain_broadcast", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_transaction = transaction.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::blockchain::BdkBlockchain::broadcast( + api_ptr, + &api_transaction, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__blockchain__bdk_blockchain_create_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + blockchain_config: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_blockchain_create", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_blockchain_config = blockchain_config.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::blockchain::BdkBlockchain::create(api_blockchain_config)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__blockchain__bdk_blockchain_estimate_fee_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + target: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_blockchain_estimate_fee", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + let api_target = target.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::blockchain::BdkBlockchain::estimate_fee(&api_that, api_target)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__blockchain__bdk_blockchain_get_block_hash_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + height: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_blockchain_get_block_hash", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + let api_height = height.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::blockchain::BdkBlockchain::get_block_hash( + &api_that, api_height, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__blockchain__bdk_blockchain_get_height_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_blockchain_get_height", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::blockchain::BdkBlockchain::get_height(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::descriptor::BdkDescriptor::as_string(&api_that), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_max_satisfaction_weight", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::descriptor::BdkDescriptor::max_satisfaction_weight(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_new_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + descriptor: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_new", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_descriptor = descriptor.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::descriptor::BdkDescriptor::new(api_descriptor, api_network)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_new_bip44_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: impl CstDecode, + keychain_kind: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_new_bip44", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_secret_key = secret_key.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::descriptor::BdkDescriptor::new_bip44( + api_secret_key, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_new_bip44_public_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: impl CstDecode, + fingerprint: impl CstDecode, + keychain_kind: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_new_bip44_public", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_public_key = public_key.cst_decode(); + let api_fingerprint = fingerprint.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::descriptor::BdkDescriptor::new_bip44_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_new_bip49_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: impl CstDecode, + keychain_kind: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_new_bip49", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_secret_key = secret_key.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::descriptor::BdkDescriptor::new_bip49( + api_secret_key, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_new_bip49_public_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: impl CstDecode, + fingerprint: impl CstDecode, + keychain_kind: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_new_bip49_public", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_public_key = public_key.cst_decode(); + let api_fingerprint = fingerprint.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::descriptor::BdkDescriptor::new_bip49_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_new_bip84_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: impl CstDecode, + keychain_kind: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_new_bip84", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_secret_key = secret_key.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::descriptor::BdkDescriptor::new_bip84( + api_secret_key, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_new_bip84_public_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: impl CstDecode, + fingerprint: impl CstDecode, + keychain_kind: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_new_bip84_public", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_public_key = public_key.cst_decode(); + let api_fingerprint = fingerprint.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::descriptor::BdkDescriptor::new_bip84_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_new_bip86_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: impl CstDecode, + keychain_kind: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_new_bip86", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_secret_key = secret_key.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::descriptor::BdkDescriptor::new_bip86( + api_secret_key, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_new_bip86_public_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: impl CstDecode, + fingerprint: impl CstDecode, + keychain_kind: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_new_bip86_public", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_public_key = public_key.cst_decode(); + let api_fingerprint = fingerprint.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::descriptor::BdkDescriptor::new_bip86_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__descriptor__bdk_descriptor_to_string_private_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_to_string_private", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::descriptor::BdkDescriptor::to_string_private(&api_that), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__bdk_derivation_path_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_derivation_path_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::key::BdkDerivationPath::as_string(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__bdk_derivation_path_from_string_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + path: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_derivation_path_from_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_path = path.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::key::BdkDerivationPath::from_string(api_path)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_public_key_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_public_key_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::key::BdkDescriptorPublicKey::as_string(&api_that), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_public_key_derive_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + path: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_public_key_derive", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_path = path.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::key::BdkDescriptorPublicKey::derive(api_ptr, api_path)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_public_key_extend_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + path: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_public_key_extend", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_path = path.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::key::BdkDescriptorPublicKey::extend(api_ptr, api_path)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_public_key_from_string_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_public_key_from_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_public_key = public_key.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::key::BdkDescriptorPublicKey::from_string(api_public_key)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_secret_key_as_public_impl( + ptr: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_secret_key_as_public", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_ptr = ptr.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::key::BdkDescriptorSecretKey::as_public(api_ptr)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_secret_key_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_secret_key_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::key::BdkDescriptorSecretKey::as_string(&api_that), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_secret_key_create_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + network: impl CstDecode, + mnemonic: impl CstDecode, + password: impl CstDecode>, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_secret_key_create", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_network = network.cst_decode(); + let api_mnemonic = mnemonic.cst_decode(); + let api_password = password.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::key::BdkDescriptorSecretKey::create( + api_network, + api_mnemonic, + api_password, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_secret_key_derive_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + path: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_secret_key_derive", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_path = path.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::key::BdkDescriptorSecretKey::derive(api_ptr, api_path)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_secret_key_extend_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + path: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_secret_key_extend", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_path = path.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::key::BdkDescriptorSecretKey::extend(api_ptr, api_path)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_secret_key_from_string_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_secret_key_from_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_secret_key = secret_key.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::key::BdkDescriptorSecretKey::from_string(api_secret_key)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_secret_key_secret_bytes", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::key::BdkDescriptorSecretKey::secret_bytes(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__bdk_mnemonic_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_mnemonic_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::key::BdkMnemonic::as_string(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__bdk_mnemonic_from_entropy_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + entropy: impl CstDecode>, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_mnemonic_from_entropy", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_entropy = entropy.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::key::BdkMnemonic::from_entropy(api_entropy)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_mnemonic_from_string_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + mnemonic: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_mnemonic_from_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_mnemonic = mnemonic.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::key::BdkMnemonic::from_string(api_mnemonic)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__key__bdk_mnemonic_new_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + word_count: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_mnemonic_new", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_word_count = word_count.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::key::BdkMnemonic::new(api_word_count)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__psbt__bdk_psbt_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::psbt::BdkPsbt::as_string(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__psbt__bdk_psbt_combine_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + other: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_combine", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_other = other.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::psbt::BdkPsbt::combine(api_ptr, api_other)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__psbt__bdk_psbt_extract_tx_impl( + ptr: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_extract_tx", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_ptr = ptr.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::psbt::BdkPsbt::extract_tx(api_ptr)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__psbt__bdk_psbt_fee_amount_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_fee_amount", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::psbt::BdkPsbt::fee_amount(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__psbt__bdk_psbt_fee_rate_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_fee_rate", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::psbt::BdkPsbt::fee_rate(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__psbt__bdk_psbt_from_str_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + psbt_base64: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_from_str", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_psbt_base64 = psbt_base64.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::psbt::BdkPsbt::from_str(api_psbt_base64)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__psbt__bdk_psbt_json_serialize_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_json_serialize", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::psbt::BdkPsbt::json_serialize(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__psbt__bdk_psbt_serialize_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_serialize", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::psbt::BdkPsbt::serialize(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__psbt__bdk_psbt_txid_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_txid", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::psbt::BdkPsbt::txid(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_address_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::BdkAddress::as_string(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_address_from_script_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + script: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_from_script", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_script = script.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::types::BdkAddress::from_script(api_script, api_network)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_address_from_string_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + address: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_from_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_address = address.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::types::BdkAddress::from_string(api_address, api_network)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_address_is_valid_for_network_impl( + that: impl CstDecode, + network: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_is_valid_for_network", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + let api_network = network.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::types::BdkAddress::is_valid_for_network(&api_that, api_network), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_address_network_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_network", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::BdkAddress::network(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_address_payload_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_payload", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::BdkAddress::payload(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_address_script_impl( + ptr: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_script", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_ptr = ptr.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::BdkAddress::script(api_ptr))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_address_to_qr_uri_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_to_qr_uri", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::BdkAddress::to_qr_uri(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_policy_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_policy_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkPolicy::as_string(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_policy_contribution_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_policy_contribution", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::BdkPolicy::contribution(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_policy_id_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_policy_id", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::api::types::BdkPolicy::id(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_policy_item_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_policy_item", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::api::types::BdkPolicy::item(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_policy_requires_path_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_policy_requires_path", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::BdkPolicy::requires_path(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_policy_satisfaction_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_policy_satisfaction", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::BdkPolicy::satisfaction(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_script_buf_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_script_buf_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::as_string(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_script_buf_empty_impl( +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_script_buf_empty", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::empty())?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__types__bdk_script_buf_from_hex_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + s: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_script_buf_from_hex", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_s = s.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkScriptBuf::from_hex(api_s)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_script_buf_with_capacity_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + capacity: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_script_buf_with_capacity", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_capacity = capacity.cst_decode(); + move |context| { + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::types::BdkScriptBuf::with_capacity(api_capacity), + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_from_bytes_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + transaction_bytes: impl CstDecode>, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_from_bytes", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_transaction_bytes = transaction_bytes.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::types::BdkTransaction::from_bytes(api_transaction_bytes)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_input_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_input", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::input(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_is_coin_base_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_is_coin_base", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::is_coin_base(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_is_explicitly_rbf_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_is_explicitly_rbf", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::types::BdkTransaction::is_explicitly_rbf(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_is_lock_time_enabled_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_is_lock_time_enabled", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::types::BdkTransaction::is_lock_time_enabled(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_lock_time_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_lock_time", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::lock_time(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_new_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + version: impl CstDecode, + lock_time: impl CstDecode, + input: impl CstDecode>, + output: impl CstDecode>, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_new", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_version = version.cst_decode(); + let api_lock_time = lock_time.cst_decode(); + let api_input = input.cst_decode(); + let api_output = output.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::new( + api_version, + api_lock_time, + api_input, + api_output, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_output_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_output", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::output(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_serialize_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_serialize", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::serialize(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_size_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_size", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::size(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_txid_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_txid", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::txid(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_version_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_version", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::version(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_vsize_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_vsize", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::vsize(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__types__bdk_transaction_weight_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_transaction_weight", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::types::BdkTransaction::weight(&api_that)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_get_address_impl( + ptr: impl CstDecode, + address_index: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_get_address", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_address_index = address_index.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::wallet::BdkWallet::get_address(api_ptr, api_address_index)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_get_balance_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_get_balance", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::get_balance(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain_impl( + ptr: impl CstDecode, + keychain: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_get_descriptor_for_keychain", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_keychain = keychain.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::get_descriptor_for_keychain( + api_ptr, + api_keychain, + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_get_internal_address_impl( + ptr: impl CstDecode, + address_index: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_get_internal_address", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_address_index = address_index.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::get_internal_address( + api_ptr, + api_address_index, + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_get_psbt_input_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + utxo: impl CstDecode, + only_witness_utxo: impl CstDecode, + sighash_type: impl CstDecode>, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_get_psbt_input", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + let api_utxo = utxo.cst_decode(); + let api_only_witness_utxo = only_witness_utxo.cst_decode(); + let api_sighash_type = sighash_type.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::get_psbt_input( + &api_that, + api_utxo, + api_only_witness_utxo, + api_sighash_type, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_is_mine_impl( + ptr: impl CstDecode, + script: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_is_mine", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_script = script.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::is_mine(api_ptr, api_script)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_list_transactions_impl( + that: impl CstDecode, + include_raw: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_list_transactions", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + let api_include_raw = include_raw.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::wallet::BdkWallet::list_transactions(&api_that, api_include_raw)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_list_unspent_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_list_unspent", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::list_unspent(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_network_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_network", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::network(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_new_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + descriptor: impl CstDecode, + change_descriptor: impl CstDecode>, + network: impl CstDecode, + database_config: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_new", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_descriptor = descriptor.cst_decode(); + let api_change_descriptor = change_descriptor.cst_decode(); + let api_network = network.cst_decode(); + let api_database_config = database_config.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::new( + api_descriptor, + api_change_descriptor, + api_network, + api_database_config, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_policies_impl( + ptr: impl CstDecode, + keychain: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_policies", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_keychain = keychain.cst_decode(); + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::policies(api_ptr, api_keychain)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_sign_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + psbt: impl CstDecode, + sign_options: impl CstDecode>, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_sign", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_psbt = psbt.cst_decode(); + let api_sign_options = sign_options.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = + crate::api::wallet::BdkWallet::sign(api_ptr, api_psbt, api_sign_options)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__wallet__bdk_wallet_sync_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + blockchain: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_sync", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_blockchain = blockchain.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::BdkWallet::sync(api_ptr, &api_blockchain)?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__wallet__finish_bump_fee_tx_builder_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + txid: impl CstDecode, + fee_rate: impl CstDecode, + allow_shrinking: impl CstDecode>, + wallet: impl CstDecode, + enable_rbf: impl CstDecode, + n_sequence: impl CstDecode>, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "finish_bump_fee_tx_builder", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_txid = txid.cst_decode(); + let api_fee_rate = fee_rate.cst_decode(); + let api_allow_shrinking = allow_shrinking.cst_decode(); + let api_wallet = wallet.cst_decode(); + let api_enable_rbf = enable_rbf.cst_decode(); + let api_n_sequence = n_sequence.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::finish_bump_fee_tx_builder( + api_txid, + api_fee_rate, + api_allow_shrinking, + api_wallet, + api_enable_rbf, + api_n_sequence, + )?; + Ok(output_ok) + })()) + } + }, + ) +} +fn wire__crate__api__wallet__tx_builder_finish_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + wallet: impl CstDecode, + recipients: impl CstDecode>, + utxos: impl CstDecode>, + foreign_utxo: impl CstDecode>, + un_spendable: impl CstDecode>, + change_policy: impl CstDecode, + manually_selected_only: impl CstDecode, + fee_rate: impl CstDecode>, + fee_absolute: impl CstDecode>, + drain_wallet: impl CstDecode, + drain_to: impl CstDecode>, + rbf: impl CstDecode>, + internal_policy_path: impl CstDecode>>>, + external_policy_path: impl CstDecode>>>, + data: impl CstDecode>, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "tx_builder_finish", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_wallet = wallet.cst_decode(); + let api_recipients = recipients.cst_decode(); + let api_utxos = utxos.cst_decode(); + let api_foreign_utxo = foreign_utxo.cst_decode(); + let api_un_spendable = un_spendable.cst_decode(); + let api_change_policy = change_policy.cst_decode(); + let api_manually_selected_only = manually_selected_only.cst_decode(); + let api_fee_rate = fee_rate.cst_decode(); + let api_fee_absolute = fee_absolute.cst_decode(); + let api_drain_wallet = drain_wallet.cst_decode(); + let api_drain_to = drain_to.cst_decode(); + let api_rbf = rbf.cst_decode(); + let api_internal_policy_path = internal_policy_path.cst_decode(); + let api_external_policy_path = external_policy_path.cst_decode(); + let api_data = data.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + let output_ok = crate::api::wallet::tx_builder_finish( + api_wallet, + api_recipients, + api_utxos, + api_foreign_utxo, + api_un_spendable, + api_change_policy, + api_manually_selected_only, + api_fee_rate, + api_fee_absolute, + api_drain_wallet, + api_drain_to, + api_rbf, + api_internal_policy_path, + api_external_policy_path, + api_data, + )?; + Ok(output_ok) + })()) + } + }, + ) +} + +// Section: dart2rust + +impl CstDecode for bool { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> bool { + self + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::ChangeSpendPolicy { + match self { + 0 => crate::api::types::ChangeSpendPolicy::ChangeAllowed, + 1 => crate::api::types::ChangeSpendPolicy::OnlyChange, + 2 => crate::api::types::ChangeSpendPolicy::ChangeForbidden, + _ => unreachable!("Invalid variant for ChangeSpendPolicy: {}", self), + } + } +} +impl CstDecode for f32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> f32 { + self + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i32 { + self + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::KeychainKind { + match self { + 0 => crate::api::types::KeychainKind::ExternalChain, + 1 => crate::api::types::KeychainKind::InternalChain, + _ => unreachable!("Invalid variant for KeychainKind: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Network { + match self { + 0 => crate::api::types::Network::Testnet, + 1 => crate::api::types::Network::Regtest, + 2 => crate::api::types::Network::Bitcoin, + 3 => crate::api::types::Network::Signet, + _ => unreachable!("Invalid variant for Network: {}", self), + } + } +} +impl CstDecode for u32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u32 { + self + } +} +impl CstDecode for u64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u64 { + self + } +} +impl CstDecode for u8 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u8 { + self + } +} +impl CstDecode for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> usize { + self + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Variant { + match self { + 0 => crate::api::types::Variant::Bech32, + 1 => crate::api::types::Variant::Bech32m, + _ => unreachable!("Invalid variant for Variant: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::WitnessVersion { + match self { + 0 => crate::api::types::WitnessVersion::V0, + 1 => crate::api::types::WitnessVersion::V1, + 2 => crate::api::types::WitnessVersion::V2, + 3 => crate::api::types::WitnessVersion::V3, + 4 => crate::api::types::WitnessVersion::V4, + 5 => crate::api::types::WitnessVersion::V5, + 6 => crate::api::types::WitnessVersion::V6, + 7 => crate::api::types::WitnessVersion::V7, + 8 => crate::api::types::WitnessVersion::V8, + 9 => crate::api::types::WitnessVersion::V9, + 10 => crate::api::types::WitnessVersion::V10, + 11 => crate::api::types::WitnessVersion::V11, + 12 => crate::api::types::WitnessVersion::V12, + 13 => crate::api::types::WitnessVersion::V13, + 14 => crate::api::types::WitnessVersion::V14, + 15 => crate::api::types::WitnessVersion::V15, + 16 => crate::api::types::WitnessVersion::V16, + _ => unreachable!("Invalid variant for WitnessVersion: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::WordCount { + match self { + 0 => crate::api::types::WordCount::Words12, + 1 => crate::api::types::WordCount::Words18, + 2 => crate::api::types::WordCount::Words24, + _ => unreachable!("Invalid variant for WordCount: {}", self), + } + } +} +impl SseDecode for std::collections::HashMap> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = )>>::sse_decode(deserializer); + return inner.into_iter().collect(); + } +} + +impl SseDecode for std::collections::HashMap, Vec> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = + , Vec)>>::sse_decode(deserializer); + return inner.into_iter().collect(); + } +} + +impl SseDecode for std::collections::HashMap> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = )>>::sse_decode(deserializer); + return inner.into_iter().collect(); + } +} + +impl SseDecode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom>> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for RustOpaqueNom> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + +impl SseDecode for String { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = >::sse_decode(deserializer); + return String::from_utf8(inner).unwrap(); + } +} + +impl SseDecode for crate::api::error::AddressError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::AddressError::Base58(var_field0); + } + 1 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::AddressError::Bech32(var_field0); + } + 2 => { + return crate::api::error::AddressError::EmptyBech32Payload; + } + 3 => { + let mut var_expected = ::sse_decode(deserializer); + let mut var_found = ::sse_decode(deserializer); + return crate::api::error::AddressError::InvalidBech32Variant { + expected: var_expected, + found: var_found, + }; + } + 4 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::AddressError::InvalidWitnessVersion(var_field0); + } + 5 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::AddressError::UnparsableWitnessVersion(var_field0); + } + 6 => { + return crate::api::error::AddressError::MalformedWitnessVersion; + } + 7 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::AddressError::InvalidWitnessProgramLength(var_field0); + } + 8 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::AddressError::InvalidSegwitV0ProgramLength(var_field0); + } + 9 => { + return crate::api::error::AddressError::UncompressedPubkey; + } + 10 => { + return crate::api::error::AddressError::ExcessiveScriptSize; + } + 11 => { + return crate::api::error::AddressError::UnrecognizedScript; + } + 12 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::AddressError::UnknownAddressType(var_field0); + } + 13 => { + let mut var_networkRequired = + ::sse_decode(deserializer); + let mut var_networkFound = ::sse_decode(deserializer); + let mut var_address = ::sse_decode(deserializer); + return crate::api::error::AddressError::NetworkValidation { + network_required: var_networkRequired, + network_found: var_networkFound, + address: var_address, + }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::types::AddressIndex { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + return crate::api::types::AddressIndex::Increase; + } + 1 => { + return crate::api::types::AddressIndex::LastUnused; + } + 2 => { + let mut var_index = ::sse_decode(deserializer); + return crate::api::types::AddressIndex::Peek { index: var_index }; + } + 3 => { + let mut var_index = ::sse_decode(deserializer); + return crate::api::types::AddressIndex::Reset { index: var_index }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::blockchain::Auth { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + return crate::api::blockchain::Auth::None; + } + 1 => { + let mut var_username = ::sse_decode(deserializer); + let mut var_password = ::sse_decode(deserializer); + return crate::api::blockchain::Auth::UserPass { + username: var_username, + password: var_password, + }; + } + 2 => { + let mut var_file = ::sse_decode(deserializer); + return crate::api::blockchain::Auth::Cookie { file: var_file }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::types::Balance { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_immature = ::sse_decode(deserializer); + let mut var_trustedPending = ::sse_decode(deserializer); + let mut var_untrustedPending = ::sse_decode(deserializer); + let mut var_confirmed = ::sse_decode(deserializer); + let mut var_spendable = ::sse_decode(deserializer); + let mut var_total = ::sse_decode(deserializer); + return crate::api::types::Balance { + immature: var_immature, + trusted_pending: var_trustedPending, + untrusted_pending: var_untrustedPending, + confirmed: var_confirmed, + spendable: var_spendable, + total: var_total, + }; + } +} + +impl SseDecode for crate::api::types::BdkAddress { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_ptr = >::sse_decode(deserializer); + return crate::api::types::BdkAddress { ptr: var_ptr }; + } +} + +impl SseDecode for crate::api::blockchain::BdkBlockchain { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_ptr = >::sse_decode(deserializer); + return crate::api::blockchain::BdkBlockchain { ptr: var_ptr }; + } +} + +impl SseDecode for crate::api::key::BdkDerivationPath { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_ptr = + >::sse_decode(deserializer); + return crate::api::key::BdkDerivationPath { ptr: var_ptr }; + } +} + +impl SseDecode for crate::api::descriptor::BdkDescriptor { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_extendedDescriptor = + >::sse_decode(deserializer); + let mut var_keyMap = >::sse_decode(deserializer); + return crate::api::descriptor::BdkDescriptor { + extended_descriptor: var_extendedDescriptor, + key_map: var_keyMap, + }; + } +} + +impl SseDecode for crate::api::key::BdkDescriptorPublicKey { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_ptr = >::sse_decode(deserializer); + return crate::api::key::BdkDescriptorPublicKey { ptr: var_ptr }; + } +} + +impl SseDecode for crate::api::key::BdkDescriptorSecretKey { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_ptr = >::sse_decode(deserializer); + return crate::api::key::BdkDescriptorSecretKey { ptr: var_ptr }; + } +} + +impl SseDecode for crate::api::error::BdkError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Hex(var_field0); + } + 1 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Consensus(var_field0); + } + 2 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::VerifyTransaction(var_field0); + } + 3 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Address(var_field0); + } + 4 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Descriptor(var_field0); + } + 5 => { + let mut var_field0 = >::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidU32Bytes(var_field0); + } + 6 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Generic(var_field0); + } + 7 => { + return crate::api::error::BdkError::ScriptDoesntHaveAddressForm; + } + 8 => { + return crate::api::error::BdkError::NoRecipients; + } + 9 => { + return crate::api::error::BdkError::NoUtxosSelected; + } + 10 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::OutputBelowDustLimit(var_field0); + } + 11 => { + let mut var_needed = ::sse_decode(deserializer); + let mut var_available = ::sse_decode(deserializer); + return crate::api::error::BdkError::InsufficientFunds { + needed: var_needed, + available: var_available, + }; + } + 12 => { + return crate::api::error::BdkError::BnBTotalTriesExceeded; + } + 13 => { + return crate::api::error::BdkError::BnBNoExactMatch; + } + 14 => { + return crate::api::error::BdkError::UnknownUtxo; + } + 15 => { + return crate::api::error::BdkError::TransactionNotFound; + } + 16 => { + return crate::api::error::BdkError::TransactionConfirmed; + } + 17 => { + return crate::api::error::BdkError::IrreplaceableTransaction; + } + 18 => { + let mut var_needed = ::sse_decode(deserializer); + return crate::api::error::BdkError::FeeRateTooLow { needed: var_needed }; + } + 19 => { + let mut var_needed = ::sse_decode(deserializer); + return crate::api::error::BdkError::FeeTooLow { needed: var_needed }; + } + 20 => { + return crate::api::error::BdkError::FeeRateUnavailable; + } + 21 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::MissingKeyOrigin(var_field0); + } + 22 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Key(var_field0); + } + 23 => { + return crate::api::error::BdkError::ChecksumMismatch; + } + 24 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::SpendingPolicyRequired(var_field0); + } + 25 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidPolicyPathError(var_field0); + } + 26 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Signer(var_field0); + } + 27 => { + let mut var_requested = ::sse_decode(deserializer); + let mut var_found = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidNetwork { + requested: var_requested, + found: var_found, + }; + } + 28 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidOutpoint(var_field0); + } + 29 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Encode(var_field0); + } + 30 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Miniscript(var_field0); + } + 31 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::MiniscriptPsbt(var_field0); + } + 32 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Bip32(var_field0); + } + 33 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Bip39(var_field0); + } + 34 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Secp256k1(var_field0); + } + 35 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Json(var_field0); + } + 36 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Psbt(var_field0); + } + 37 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::PsbtParse(var_field0); + } + 38 => { + let mut var_field0 = ::sse_decode(deserializer); + let mut var_field1 = ::sse_decode(deserializer); + return crate::api::error::BdkError::MissingCachedScripts(var_field0, var_field1); + } + 39 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Electrum(var_field0); + } + 40 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Esplora(var_field0); + } + 41 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Sled(var_field0); + } + 42 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Rpc(var_field0); + } + 43 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Rusqlite(var_field0); + } + 44 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidInput(var_field0); + } + 45 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidLockTime(var_field0); + } + 46 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidTransaction(var_field0); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::key::BdkMnemonic { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_ptr = >::sse_decode(deserializer); + return crate::api::key::BdkMnemonic { ptr: var_ptr }; + } +} + +impl SseDecode for crate::api::types::BdkPolicy { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_ptr = >::sse_decode(deserializer); + return crate::api::types::BdkPolicy { ptr: var_ptr }; + } +} + +impl SseDecode for crate::api::psbt::BdkPsbt { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_ptr = , + >>::sse_decode(deserializer); + return crate::api::psbt::BdkPsbt { ptr: var_ptr }; + } +} + +impl SseDecode for crate::api::types::BdkScriptBuf { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_bytes = >::sse_decode(deserializer); + return crate::api::types::BdkScriptBuf { bytes: var_bytes }; + } +} + +impl SseDecode for crate::api::types::BdkTransaction { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_s = ::sse_decode(deserializer); + return crate::api::types::BdkTransaction { s: var_s }; + } +} + +impl SseDecode for crate::api::wallet::BdkWallet { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_ptr = + >>>::sse_decode( + deserializer, + ); + return crate::api::wallet::BdkWallet { ptr: var_ptr }; + } +} + +impl SseDecode for crate::api::types::BlockTime { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_height = ::sse_decode(deserializer); + let mut var_timestamp = ::sse_decode(deserializer); + return crate::api::types::BlockTime { + height: var_height, + timestamp: var_timestamp, + }; + } +} + +impl SseDecode for crate::api::blockchain::BlockchainConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_config = + ::sse_decode(deserializer); + return crate::api::blockchain::BlockchainConfig::Electrum { config: var_config }; + } + 1 => { + let mut var_config = + ::sse_decode(deserializer); + return crate::api::blockchain::BlockchainConfig::Esplora { config: var_config }; + } + 2 => { + let mut var_config = ::sse_decode(deserializer); + return crate::api::blockchain::BlockchainConfig::Rpc { config: var_config }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for bool { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_u8().unwrap() != 0 + } +} + +impl SseDecode for crate::api::types::ChangeSpendPolicy { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return match inner { + 0 => crate::api::types::ChangeSpendPolicy::ChangeAllowed, + 1 => crate::api::types::ChangeSpendPolicy::OnlyChange, + 2 => crate::api::types::ChangeSpendPolicy::ChangeForbidden, + _ => unreachable!("Invalid variant for ChangeSpendPolicy: {}", inner), + }; + } +} + +impl SseDecode for crate::api::types::Condition { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_csv = >::sse_decode(deserializer); + let mut var_timelock = >::sse_decode(deserializer); + return crate::api::types::Condition { + csv: var_csv, + timelock: var_timelock, + }; + } +} + +impl SseDecode for crate::api::error::ConsensusError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::ConsensusError::Io(var_field0); + } + 1 => { + let mut var_requested = ::sse_decode(deserializer); + let mut var_max = ::sse_decode(deserializer); + return crate::api::error::ConsensusError::OversizedVectorAllocation { + requested: var_requested, + max: var_max, + }; + } + 2 => { + let mut var_expected = <[u8; 4]>::sse_decode(deserializer); + let mut var_actual = <[u8; 4]>::sse_decode(deserializer); + return crate::api::error::ConsensusError::InvalidChecksum { + expected: var_expected, + actual: var_actual, + }; + } + 3 => { + return crate::api::error::ConsensusError::NonMinimalVarInt; + } + 4 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::ConsensusError::ParseFailed(var_field0); + } + 5 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::ConsensusError::UnsupportedSegwitFlag(var_field0); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::types::DatabaseConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + return crate::api::types::DatabaseConfig::Memory; + } + 1 => { + let mut var_config = + ::sse_decode(deserializer); + return crate::api::types::DatabaseConfig::Sqlite { config: var_config }; + } + 2 => { + let mut var_config = + ::sse_decode(deserializer); + return crate::api::types::DatabaseConfig::Sled { config: var_config }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::error::DescriptorError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + return crate::api::error::DescriptorError::InvalidHdKeyPath; + } + 1 => { + return crate::api::error::DescriptorError::InvalidDescriptorChecksum; + } + 2 => { + return crate::api::error::DescriptorError::HardenedDerivationXpub; + } + 3 => { + return crate::api::error::DescriptorError::MultiPath; + } + 4 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Key(var_field0); + } + 5 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Policy(var_field0); + } + 6 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::InvalidDescriptorCharacter(var_field0); + } + 7 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Bip32(var_field0); + } + 8 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Base58(var_field0); + } + 9 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Pk(var_field0); + } + 10 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Miniscript(var_field0); + } + 11 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Hex(var_field0); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::blockchain::ElectrumConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_url = ::sse_decode(deserializer); + let mut var_socks5 = >::sse_decode(deserializer); + let mut var_retry = ::sse_decode(deserializer); + let mut var_timeout = >::sse_decode(deserializer); + let mut var_stopGap = ::sse_decode(deserializer); + let mut var_validateDomain = ::sse_decode(deserializer); + return crate::api::blockchain::ElectrumConfig { + url: var_url, + socks5: var_socks5, + retry: var_retry, + timeout: var_timeout, + stop_gap: var_stopGap, + validate_domain: var_validateDomain, + }; + } +} + +impl SseDecode for crate::api::blockchain::EsploraConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_baseUrl = ::sse_decode(deserializer); + let mut var_proxy = >::sse_decode(deserializer); + let mut var_concurrency = >::sse_decode(deserializer); + let mut var_stopGap = ::sse_decode(deserializer); + let mut var_timeout = >::sse_decode(deserializer); + return crate::api::blockchain::EsploraConfig { + base_url: var_baseUrl, + proxy: var_proxy, + concurrency: var_concurrency, + stop_gap: var_stopGap, + timeout: var_timeout, + }; + } +} + +impl SseDecode for f32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_f32::().unwrap() + } +} + +impl SseDecode for crate::api::types::FeeRate { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_satPerVb = ::sse_decode(deserializer); + return crate::api::types::FeeRate { + sat_per_vb: var_satPerVb, + }; + } +} + +impl SseDecode for crate::api::error::HexError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::HexError::InvalidChar(var_field0); + } + 1 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::HexError::OddLengthString(var_field0); + } + 2 => { + let mut var_field0 = ::sse_decode(deserializer); + let mut var_field1 = ::sse_decode(deserializer); + return crate::api::error::HexError::InvalidLength(var_field0, var_field1); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for i32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_i32::().unwrap() + } +} + +impl SseDecode for crate::api::types::Input { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_s = ::sse_decode(deserializer); + return crate::api::types::Input { s: var_s }; + } +} + +impl SseDecode for crate::api::types::KeychainKind { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return match inner { + 0 => crate::api::types::KeychainKind::ExternalChain, + 1 => crate::api::types::KeychainKind::InternalChain, + _ => unreachable!("Invalid variant for KeychainKind: {}", inner), + }; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(>::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec<(Vec, Vec)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(<(Vec, Vec)>::sse_decode( + deserializer, + )); + } + return ans_; + } +} + +impl SseDecode for Vec<(String, Vec)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(<(String, Vec)>::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec<(u32, Vec)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(<(u32, Vec)>::sse_decode( + deserializer, + )); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode( + deserializer, + )); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for crate::api::types::LocalUtxo { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_outpoint = ::sse_decode(deserializer); + let mut var_txout = ::sse_decode(deserializer); + let mut var_keychain = ::sse_decode(deserializer); + let mut var_isSpent = ::sse_decode(deserializer); + return crate::api::types::LocalUtxo { + outpoint: var_outpoint, + txout: var_txout, + keychain: var_keychain, + is_spent: var_isSpent, + }; + } +} + +impl SseDecode for crate::api::types::LockTime { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::types::LockTime::Blocks(var_field0); + } + 1 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::types::LockTime::Seconds(var_field0); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::types::Network { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return match inner { + 0 => crate::api::types::Network::Testnet, + 1 => crate::api::types::Network::Regtest, + 2 => crate::api::types::Network::Bitcoin, + 3 => crate::api::types::Network::Signet, + _ => unreachable!("Invalid variant for Network: {}", inner), + }; + } +} + +impl SseDecode for Option>> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(>>::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option<(crate::api::types::OutPoint, crate::api::types::Input, usize)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(<( + crate::api::types::OutPoint, + crate::api::types::Input, + usize, + )>::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for crate::api::types::OutPoint { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_txid = ::sse_decode(deserializer); + let mut var_vout = ::sse_decode(deserializer); + return crate::api::types::OutPoint { + txid: var_txid, + vout: var_vout, + }; + } +} + +impl SseDecode for crate::api::types::Payload { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_pubkeyHash = ::sse_decode(deserializer); + return crate::api::types::Payload::PubkeyHash { + pubkey_hash: var_pubkeyHash, + }; + } + 1 => { + let mut var_scriptHash = ::sse_decode(deserializer); + return crate::api::types::Payload::ScriptHash { + script_hash: var_scriptHash, + }; + } + 2 => { + let mut var_version = ::sse_decode(deserializer); + let mut var_program = >::sse_decode(deserializer); + return crate::api::types::Payload::WitnessProgram { + version: var_version, + program: var_program, + }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::types::PkOrF { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_value = ::sse_decode(deserializer); + return crate::api::types::PkOrF::Pubkey { value: var_value }; + } + 1 => { + let mut var_value = ::sse_decode(deserializer); + return crate::api::types::PkOrF::XOnlyPubkey { value: var_value }; + } + 2 => { + let mut var_value = ::sse_decode(deserializer); + return crate::api::types::PkOrF::Fingerprint { value: var_value }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::types::PsbtSigHashType { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_inner = ::sse_decode(deserializer); + return crate::api::types::PsbtSigHashType { inner: var_inner }; + } +} + +impl SseDecode for crate::api::types::RbfValue { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + return crate::api::types::RbfValue::RbfDefault; + } + 1 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::types::RbfValue::Value(var_field0); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for (crate::api::types::BdkAddress, u32) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_field0 = ::sse_decode(deserializer); + let mut var_field1 = ::sse_decode(deserializer); + return (var_field0, var_field1); + } +} + +impl SseDecode + for ( + crate::api::psbt::BdkPsbt, + crate::api::types::TransactionDetails, + ) +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_field0 = ::sse_decode(deserializer); + let mut var_field1 = ::sse_decode(deserializer); + return (var_field0, var_field1); + } +} + +impl SseDecode for (Vec, Vec) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_field0 = >::sse_decode(deserializer); + let mut var_field1 = >::sse_decode(deserializer); + return (var_field0, var_field1); + } +} + +impl SseDecode for (crate::api::types::OutPoint, crate::api::types::Input, usize) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_field0 = ::sse_decode(deserializer); + let mut var_field1 = ::sse_decode(deserializer); + let mut var_field2 = ::sse_decode(deserializer); + return (var_field0, var_field1, var_field2); + } +} + +impl SseDecode for (String, Vec) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_field0 = ::sse_decode(deserializer); + let mut var_field1 = >::sse_decode(deserializer); + return (var_field0, var_field1); + } +} + +impl SseDecode for (u32, Vec) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_field0 = ::sse_decode(deserializer); + let mut var_field1 = >::sse_decode(deserializer); + return (var_field0, var_field1); + } +} + +impl SseDecode for crate::api::blockchain::RpcConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_url = ::sse_decode(deserializer); + let mut var_auth = ::sse_decode(deserializer); + let mut var_network = ::sse_decode(deserializer); + let mut var_walletName = ::sse_decode(deserializer); + let mut var_syncParams = + >::sse_decode(deserializer); + return crate::api::blockchain::RpcConfig { + url: var_url, + auth: var_auth, + network: var_network, + wallet_name: var_walletName, + sync_params: var_syncParams, + }; + } +} + +impl SseDecode for crate::api::blockchain::RpcSyncParams { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_startScriptCount = ::sse_decode(deserializer); + let mut var_startTime = ::sse_decode(deserializer); + let mut var_forceStartTime = ::sse_decode(deserializer); + let mut var_pollRateSec = ::sse_decode(deserializer); + return crate::api::blockchain::RpcSyncParams { + start_script_count: var_startScriptCount, + start_time: var_startTime, + force_start_time: var_forceStartTime, + poll_rate_sec: var_pollRateSec, + }; + } +} + +impl SseDecode for crate::api::types::Satisfaction { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_n = ::sse_decode(deserializer); + let mut var_m = ::sse_decode(deserializer); + let mut var_items = >::sse_decode(deserializer); + let mut var_sorted = >::sse_decode(deserializer); + let mut var_conditions = , + >>::sse_decode(deserializer); + return crate::api::types::Satisfaction::Partial { + n: var_n, + m: var_m, + items: var_items, + sorted: var_sorted, + conditions: var_conditions, + }; + } + 1 => { + let mut var_n = ::sse_decode(deserializer); + let mut var_m = ::sse_decode(deserializer); + let mut var_items = >::sse_decode(deserializer); + let mut var_sorted = >::sse_decode(deserializer); + let mut var_conditions = , + Vec, + >>::sse_decode(deserializer); + return crate::api::types::Satisfaction::PartialComplete { + n: var_n, + m: var_m, + items: var_items, + sorted: var_sorted, + conditions: var_conditions, + }; + } + 2 => { + let mut var_condition = ::sse_decode(deserializer); + return crate::api::types::Satisfaction::Complete { + condition: var_condition, + }; + } + 3 => { + let mut var_msg = ::sse_decode(deserializer); + return crate::api::types::Satisfaction::None { msg: var_msg }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::types::SatisfiableItem { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_key = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::EcdsaSignature { key: var_key }; + } + 1 => { + let mut var_key = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::SchnorrSignature { key: var_key }; + } + 2 => { + let mut var_hash = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::Sha256Preimage { hash: var_hash }; + } + 3 => { + let mut var_hash = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::Hash256Preimage { hash: var_hash }; + } + 4 => { + let mut var_hash = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::Ripemd160Preimage { hash: var_hash }; + } + 5 => { + let mut var_hash = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::Hash160Preimage { hash: var_hash }; + } + 6 => { + let mut var_value = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::AbsoluteTimelock { value: var_value }; + } + 7 => { + let mut var_value = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::RelativeTimelock { value: var_value }; + } + 8 => { + let mut var_keys = >::sse_decode(deserializer); + let mut var_threshold = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::Multisig { + keys: var_keys, + threshold: var_threshold, + }; + } + 9 => { + let mut var_items = >::sse_decode(deserializer); + let mut var_threshold = ::sse_decode(deserializer); + return crate::api::types::SatisfiableItem::Thresh { + items: var_items, + threshold: var_threshold, + }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::api::types::ScriptAmount { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_script = ::sse_decode(deserializer); + let mut var_amount = ::sse_decode(deserializer); + return crate::api::types::ScriptAmount { + script: var_script, + amount: var_amount, + }; + } +} + +impl SseDecode for crate::api::types::SignOptions { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_trustWitnessUtxo = ::sse_decode(deserializer); + let mut var_assumeHeight = >::sse_decode(deserializer); + let mut var_allowAllSighashes = ::sse_decode(deserializer); + let mut var_removePartialSigs = ::sse_decode(deserializer); + let mut var_tryFinalize = ::sse_decode(deserializer); + let mut var_signWithTapInternalKey = ::sse_decode(deserializer); + let mut var_allowGrinding = ::sse_decode(deserializer); + return crate::api::types::SignOptions { + trust_witness_utxo: var_trustWitnessUtxo, + assume_height: var_assumeHeight, + allow_all_sighashes: var_allowAllSighashes, + remove_partial_sigs: var_removePartialSigs, + try_finalize: var_tryFinalize, + sign_with_tap_internal_key: var_signWithTapInternalKey, + allow_grinding: var_allowGrinding, + }; + } +} + +impl SseDecode for crate::api::types::SledDbConfiguration { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_path = ::sse_decode(deserializer); + let mut var_treeName = ::sse_decode(deserializer); + return crate::api::types::SledDbConfiguration { + path: var_path, + tree_name: var_treeName, + }; + } +} + +impl SseDecode for crate::api::types::SqliteDbConfiguration { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_path = ::sse_decode(deserializer); + return crate::api::types::SqliteDbConfiguration { path: var_path }; + } +} + +impl SseDecode for crate::api::types::TransactionDetails { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_transaction = + >::sse_decode(deserializer); + let mut var_txid = ::sse_decode(deserializer); + let mut var_received = ::sse_decode(deserializer); + let mut var_sent = ::sse_decode(deserializer); + let mut var_fee = >::sse_decode(deserializer); + let mut var_confirmationTime = + >::sse_decode(deserializer); + return crate::api::types::TransactionDetails { + transaction: var_transaction, + txid: var_txid, + received: var_received, + sent: var_sent, + fee: var_fee, + confirmation_time: var_confirmationTime, + }; + } +} + +impl SseDecode for crate::api::types::TxIn { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_previousOutput = ::sse_decode(deserializer); + let mut var_scriptSig = ::sse_decode(deserializer); + let mut var_sequence = ::sse_decode(deserializer); + let mut var_witness = >>::sse_decode(deserializer); + return crate::api::types::TxIn { + previous_output: var_previousOutput, + script_sig: var_scriptSig, + sequence: var_sequence, + witness: var_witness, + }; + } +} + +impl SseDecode for crate::api::types::TxOut { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_value = ::sse_decode(deserializer); + let mut var_scriptPubkey = ::sse_decode(deserializer); + return crate::api::types::TxOut { + value: var_value, + script_pubkey: var_scriptPubkey, + }; + } +} + +impl SseDecode for u32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_u32::().unwrap() + } +} + +impl SseDecode for u64 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_u64::().unwrap() + } +} + +impl SseDecode for u8 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_u8().unwrap() + } +} + +impl SseDecode for [u8; 4] { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = >::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::from_vec_to_array(inner); + } +} + +impl SseDecode for () { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {} +} + +impl SseDecode for usize { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_u64::().unwrap() as _ + } +} + +impl SseDecode for crate::api::types::Variant { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return match inner { + 0 => crate::api::types::Variant::Bech32, + 1 => crate::api::types::Variant::Bech32m, + _ => unreachable!("Invalid variant for Variant: {}", inner), + }; + } +} + +impl SseDecode for crate::api::types::WitnessVersion { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return match inner { + 0 => crate::api::types::WitnessVersion::V0, + 1 => crate::api::types::WitnessVersion::V1, + 2 => crate::api::types::WitnessVersion::V2, + 3 => crate::api::types::WitnessVersion::V3, + 4 => crate::api::types::WitnessVersion::V4, + 5 => crate::api::types::WitnessVersion::V5, + 6 => crate::api::types::WitnessVersion::V6, + 7 => crate::api::types::WitnessVersion::V7, + 8 => crate::api::types::WitnessVersion::V8, + 9 => crate::api::types::WitnessVersion::V9, + 10 => crate::api::types::WitnessVersion::V10, + 11 => crate::api::types::WitnessVersion::V11, + 12 => crate::api::types::WitnessVersion::V12, + 13 => crate::api::types::WitnessVersion::V13, + 14 => crate::api::types::WitnessVersion::V14, + 15 => crate::api::types::WitnessVersion::V15, + 16 => crate::api::types::WitnessVersion::V16, + _ => unreachable!("Invalid variant for WitnessVersion: {}", inner), + }; + } +} + +impl SseDecode for crate::api::types::WordCount { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return match inner { + 0 => crate::api::types::WordCount::Words12, + 1 => crate::api::types::WordCount::Words18, + 2 => crate::api::types::WordCount::Words24, + _ => unreachable!("Invalid variant for WordCount: {}", inner), + }; + } +} + +fn pde_ffi_dispatcher_primary_impl( + func_id: i32, + port: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len: i32, + data_len: i32, +) { + // Codec=Pde (Serialization + dispatch), see doc to use other codecs + match func_id { + _ => unreachable!(), + } +} + +fn pde_ffi_dispatcher_sync_impl( + func_id: i32, + ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len: i32, + data_len: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + // Codec=Pde (Serialization + dispatch), see doc to use other codecs + match func_id { + _ => unreachable!(), + } +} + +// Section: rust2dart + +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::AddressError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::error::AddressError::Base58(field0) => { + [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::AddressError::Bech32(field0) => { + [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::AddressError::EmptyBech32Payload => [2.into_dart()].into_dart(), + crate::api::error::AddressError::InvalidBech32Variant { expected, found } => [ + 3.into_dart(), + expected.into_into_dart().into_dart(), + found.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::AddressError::InvalidWitnessVersion(field0) => { + [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::AddressError::UnparsableWitnessVersion(field0) => { + [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::AddressError::MalformedWitnessVersion => [6.into_dart()].into_dart(), + crate::api::error::AddressError::InvalidWitnessProgramLength(field0) => { + [7.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::AddressError::InvalidSegwitV0ProgramLength(field0) => { + [8.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::AddressError::UncompressedPubkey => [9.into_dart()].into_dart(), + crate::api::error::AddressError::ExcessiveScriptSize => [10.into_dart()].into_dart(), + crate::api::error::AddressError::UnrecognizedScript => [11.into_dart()].into_dart(), + crate::api::error::AddressError::UnknownAddressType(field0) => { + [12.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::AddressError::NetworkValidation { + network_required, + network_found, + address, + } => [ + 13.into_dart(), + network_required.into_into_dart().into_dart(), + network_found.into_into_dart().into_dart(), + address.into_into_dart().into_dart(), + ] + .into_dart(), + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::AddressError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::AddressError +{ + fn into_into_dart(self) -> crate::api::error::AddressError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::AddressIndex { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::types::AddressIndex::Increase => [0.into_dart()].into_dart(), + crate::api::types::AddressIndex::LastUnused => [1.into_dart()].into_dart(), + crate::api::types::AddressIndex::Peek { index } => { + [2.into_dart(), index.into_into_dart().into_dart()].into_dart() + } + crate::api::types::AddressIndex::Reset { index } => { + [3.into_dart(), index.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::AddressIndex +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::AddressIndex +{ + fn into_into_dart(self) -> crate::api::types::AddressIndex { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::blockchain::Auth { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::blockchain::Auth::None => [0.into_dart()].into_dart(), + crate::api::blockchain::Auth::UserPass { username, password } => [ + 1.into_dart(), + username.into_into_dart().into_dart(), + password.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::blockchain::Auth::Cookie { file } => { + [2.into_dart(), file.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::blockchain::Auth {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::blockchain::Auth +{ + fn into_into_dart(self) -> crate::api::blockchain::Auth { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::Balance { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.immature.into_into_dart().into_dart(), + self.trusted_pending.into_into_dart().into_dart(), + self.untrusted_pending.into_into_dart().into_dart(), + self.confirmed.into_into_dart().into_dart(), + self.spendable.into_into_dart().into_dart(), + self.total.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Balance {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Balance { + fn into_into_dart(self) -> crate::api::types::Balance { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::BdkAddress { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.ptr.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::BdkAddress {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::BdkAddress +{ + fn into_into_dart(self) -> crate::api::types::BdkAddress { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::blockchain::BdkBlockchain { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.ptr.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::blockchain::BdkBlockchain +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::blockchain::BdkBlockchain +{ + fn into_into_dart(self) -> crate::api::blockchain::BdkBlockchain { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::key::BdkDerivationPath { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.ptr.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::key::BdkDerivationPath +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::key::BdkDerivationPath +{ + fn into_into_dart(self) -> crate::api::key::BdkDerivationPath { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::descriptor::BdkDescriptor { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.extended_descriptor.into_into_dart().into_dart(), + self.key_map.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::descriptor::BdkDescriptor +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::descriptor::BdkDescriptor +{ + fn into_into_dart(self) -> crate::api::descriptor::BdkDescriptor { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::key::BdkDescriptorPublicKey { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.ptr.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::key::BdkDescriptorPublicKey +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::key::BdkDescriptorPublicKey +{ + fn into_into_dart(self) -> crate::api::key::BdkDescriptorPublicKey { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::key::BdkDescriptorSecretKey { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.ptr.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::key::BdkDescriptorSecretKey +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::key::BdkDescriptorSecretKey +{ + fn into_into_dart(self) -> crate::api::key::BdkDescriptorSecretKey { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::BdkError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::error::BdkError::Hex(field0) => { + [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Consensus(field0) => { + [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::VerifyTransaction(field0) => { + [2.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Address(field0) => { + [3.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Descriptor(field0) => { + [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidU32Bytes(field0) => { + [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Generic(field0) => { + [6.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::ScriptDoesntHaveAddressForm => [7.into_dart()].into_dart(), + crate::api::error::BdkError::NoRecipients => [8.into_dart()].into_dart(), + crate::api::error::BdkError::NoUtxosSelected => [9.into_dart()].into_dart(), + crate::api::error::BdkError::OutputBelowDustLimit(field0) => { + [10.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InsufficientFunds { needed, available } => [ + 11.into_dart(), + needed.into_into_dart().into_dart(), + available.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::BdkError::BnBTotalTriesExceeded => [12.into_dart()].into_dart(), + crate::api::error::BdkError::BnBNoExactMatch => [13.into_dart()].into_dart(), + crate::api::error::BdkError::UnknownUtxo => [14.into_dart()].into_dart(), + crate::api::error::BdkError::TransactionNotFound => [15.into_dart()].into_dart(), + crate::api::error::BdkError::TransactionConfirmed => [16.into_dart()].into_dart(), + crate::api::error::BdkError::IrreplaceableTransaction => [17.into_dart()].into_dart(), + crate::api::error::BdkError::FeeRateTooLow { needed } => { + [18.into_dart(), needed.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::FeeTooLow { needed } => { + [19.into_dart(), needed.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::FeeRateUnavailable => [20.into_dart()].into_dart(), + crate::api::error::BdkError::MissingKeyOrigin(field0) => { + [21.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Key(field0) => { + [22.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::ChecksumMismatch => [23.into_dart()].into_dart(), + crate::api::error::BdkError::SpendingPolicyRequired(field0) => { + [24.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidPolicyPathError(field0) => { + [25.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Signer(field0) => { + [26.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidNetwork { requested, found } => [ + 27.into_dart(), + requested.into_into_dart().into_dart(), + found.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::BdkError::InvalidOutpoint(field0) => { + [28.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Encode(field0) => { + [29.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Miniscript(field0) => { + [30.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::MiniscriptPsbt(field0) => { + [31.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Bip32(field0) => { + [32.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Bip39(field0) => { + [33.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Secp256k1(field0) => { + [34.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Json(field0) => { + [35.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Psbt(field0) => { + [36.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::PsbtParse(field0) => { + [37.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::MissingCachedScripts(field0, field1) => [ + 38.into_dart(), + field0.into_into_dart().into_dart(), + field1.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::BdkError::Electrum(field0) => { + [39.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Esplora(field0) => { + [40.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Sled(field0) => { + [41.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Rpc(field0) => { + [42.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Rusqlite(field0) => { + [43.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidInput(field0) => { + [44.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidLockTime(field0) => { + [45.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidTransaction(field0) => { + [46.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::error::BdkError {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::BdkError +{ + fn into_into_dart(self) -> crate::api::error::BdkError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::key::BdkMnemonic { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.ptr.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::key::BdkMnemonic {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::key::BdkMnemonic +{ + fn into_into_dart(self) -> crate::api::key::BdkMnemonic { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::BdkPolicy { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.ptr.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::BdkPolicy {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::BdkPolicy +{ + fn into_into_dart(self) -> crate::api::types::BdkPolicy { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::psbt::BdkPsbt { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.ptr.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::psbt::BdkPsbt {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::psbt::BdkPsbt { + fn into_into_dart(self) -> crate::api::psbt::BdkPsbt { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::BdkScriptBuf { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.bytes.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::BdkScriptBuf +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::BdkScriptBuf +{ + fn into_into_dart(self) -> crate::api::types::BdkScriptBuf { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::BdkTransaction { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.s.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::BdkTransaction +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::BdkTransaction +{ + fn into_into_dart(self) -> crate::api::types::BdkTransaction { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::wallet::BdkWallet { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.ptr.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::wallet::BdkWallet {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::wallet::BdkWallet +{ + fn into_into_dart(self) -> crate::api::wallet::BdkWallet { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::BlockTime { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.height.into_into_dart().into_dart(), + self.timestamp.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::BlockTime {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::BlockTime +{ + fn into_into_dart(self) -> crate::api::types::BlockTime { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::blockchain::BlockchainConfig { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::blockchain::BlockchainConfig::Electrum { config } => { + [0.into_dart(), config.into_into_dart().into_dart()].into_dart() + } + crate::api::blockchain::BlockchainConfig::Esplora { config } => { + [1.into_dart(), config.into_into_dart().into_dart()].into_dart() + } + crate::api::blockchain::BlockchainConfig::Rpc { config } => { + [2.into_dart(), config.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::blockchain::BlockchainConfig +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::blockchain::BlockchainConfig +{ + fn into_into_dart(self) -> crate::api::blockchain::BlockchainConfig { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::ChangeSpendPolicy { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::ChangeAllowed => 0.into_dart(), + Self::OnlyChange => 1.into_dart(), + Self::ChangeForbidden => 2.into_dart(), + _ => unreachable!(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::ChangeSpendPolicy +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::ChangeSpendPolicy +{ + fn into_into_dart(self) -> crate::api::types::ChangeSpendPolicy { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::Condition { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.csv.into_into_dart().into_dart(), + self.timelock.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Condition {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::Condition +{ + fn into_into_dart(self) -> crate::api::types::Condition { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::ConsensusError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::error::ConsensusError::Io(field0) => { + [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ConsensusError::OversizedVectorAllocation { requested, max } => [ + 1.into_dart(), + requested.into_into_dart().into_dart(), + max.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::ConsensusError::InvalidChecksum { expected, actual } => [ + 2.into_dart(), + expected.into_into_dart().into_dart(), + actual.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::ConsensusError::NonMinimalVarInt => [3.into_dart()].into_dart(), + crate::api::error::ConsensusError::ParseFailed(field0) => { + [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ConsensusError::UnsupportedSegwitFlag(field0) => { + [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::ConsensusError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::ConsensusError +{ + fn into_into_dart(self) -> crate::api::error::ConsensusError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::DatabaseConfig { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::types::DatabaseConfig::Memory => [0.into_dart()].into_dart(), + crate::api::types::DatabaseConfig::Sqlite { config } => { + [1.into_dart(), config.into_into_dart().into_dart()].into_dart() + } + crate::api::types::DatabaseConfig::Sled { config } => { + [2.into_dart(), config.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::DatabaseConfig +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::DatabaseConfig +{ + fn into_into_dart(self) -> crate::api::types::DatabaseConfig { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::DescriptorError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::error::DescriptorError::InvalidHdKeyPath => [0.into_dart()].into_dart(), + crate::api::error::DescriptorError::InvalidDescriptorChecksum => { + [1.into_dart()].into_dart() + } + crate::api::error::DescriptorError::HardenedDerivationXpub => { + [2.into_dart()].into_dart() + } + crate::api::error::DescriptorError::MultiPath => [3.into_dart()].into_dart(), + crate::api::error::DescriptorError::Key(field0) => { + [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorError::Policy(field0) => { + [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorError::InvalidDescriptorCharacter(field0) => { + [6.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorError::Bip32(field0) => { + [7.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorError::Base58(field0) => { + [8.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorError::Pk(field0) => { + [9.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorError::Miniscript(field0) => { + [10.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorError::Hex(field0) => { + [11.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::DescriptorError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::DescriptorError +{ + fn into_into_dart(self) -> crate::api::error::DescriptorError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::blockchain::ElectrumConfig { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.url.into_into_dart().into_dart(), + self.socks5.into_into_dart().into_dart(), + self.retry.into_into_dart().into_dart(), + self.timeout.into_into_dart().into_dart(), + self.stop_gap.into_into_dart().into_dart(), + self.validate_domain.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::blockchain::ElectrumConfig +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::blockchain::ElectrumConfig +{ + fn into_into_dart(self) -> crate::api::blockchain::ElectrumConfig { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::blockchain::EsploraConfig { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.base_url.into_into_dart().into_dart(), + self.proxy.into_into_dart().into_dart(), + self.concurrency.into_into_dart().into_dart(), + self.stop_gap.into_into_dart().into_dart(), + self.timeout.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::blockchain::EsploraConfig +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::blockchain::EsploraConfig +{ + fn into_into_dart(self) -> crate::api::blockchain::EsploraConfig { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::FeeRate { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.sat_per_vb.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::FeeRate {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::FeeRate { + fn into_into_dart(self) -> crate::api::types::FeeRate { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::HexError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::error::HexError::InvalidChar(field0) => { + [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::HexError::OddLengthString(field0) => { + [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::HexError::InvalidLength(field0, field1) => [ + 2.into_dart(), + field0.into_into_dart().into_dart(), + field1.into_into_dart().into_dart(), + ] + .into_dart(), + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::error::HexError {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::HexError +{ + fn into_into_dart(self) -> crate::api::error::HexError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::Input { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.s.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Input {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Input { + fn into_into_dart(self) -> crate::api::types::Input { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::KeychainKind { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::ExternalChain => 0.into_dart(), + Self::InternalChain => 1.into_dart(), + _ => unreachable!(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::KeychainKind +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::KeychainKind +{ + fn into_into_dart(self) -> crate::api::types::KeychainKind { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::LocalUtxo { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.outpoint.into_into_dart().into_dart(), + self.txout.into_into_dart().into_dart(), + self.keychain.into_into_dart().into_dart(), + self.is_spent.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::LocalUtxo {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::LocalUtxo +{ + fn into_into_dart(self) -> crate::api::types::LocalUtxo { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::LockTime { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::types::LockTime::Blocks(field0) => { + [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::types::LockTime::Seconds(field0) => { + [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::LockTime {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::LockTime +{ + fn into_into_dart(self) -> crate::api::types::LockTime { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::Network { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Testnet => 0.into_dart(), + Self::Regtest => 1.into_dart(), + Self::Bitcoin => 2.into_dart(), + Self::Signet => 3.into_dart(), + _ => unreachable!(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Network {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Network { + fn into_into_dart(self) -> crate::api::types::Network { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::OutPoint { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.txid.into_into_dart().into_dart(), + self.vout.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::OutPoint {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::OutPoint +{ + fn into_into_dart(self) -> crate::api::types::OutPoint { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::Payload { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::types::Payload::PubkeyHash { pubkey_hash } => { + [0.into_dart(), pubkey_hash.into_into_dart().into_dart()].into_dart() + } + crate::api::types::Payload::ScriptHash { script_hash } => { + [1.into_dart(), script_hash.into_into_dart().into_dart()].into_dart() + } + crate::api::types::Payload::WitnessProgram { version, program } => [ + 2.into_dart(), + version.into_into_dart().into_dart(), + program.into_into_dart().into_dart(), + ] + .into_dart(), + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Payload {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Payload { + fn into_into_dart(self) -> crate::api::types::Payload { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::PkOrF { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::types::PkOrF::Pubkey { value } => { + [0.into_dart(), value.into_into_dart().into_dart()].into_dart() + } + crate::api::types::PkOrF::XOnlyPubkey { value } => { + [1.into_dart(), value.into_into_dart().into_dart()].into_dart() + } + crate::api::types::PkOrF::Fingerprint { value } => { + [2.into_dart(), value.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::PkOrF {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::PkOrF { + fn into_into_dart(self) -> crate::api::types::PkOrF { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::PsbtSigHashType { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.inner.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::PsbtSigHashType +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::PsbtSigHashType +{ + fn into_into_dart(self) -> crate::api::types::PsbtSigHashType { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::RbfValue { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::types::RbfValue::RbfDefault => [0.into_dart()].into_dart(), + crate::api::types::RbfValue::Value(field0) => { + [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::RbfValue {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::RbfValue +{ + fn into_into_dart(self) -> crate::api::types::RbfValue { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::blockchain::RpcConfig { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.url.into_into_dart().into_dart(), + self.auth.into_into_dart().into_dart(), + self.network.into_into_dart().into_dart(), + self.wallet_name.into_into_dart().into_dart(), + self.sync_params.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::blockchain::RpcConfig +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::blockchain::RpcConfig +{ + fn into_into_dart(self) -> crate::api::blockchain::RpcConfig { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::blockchain::RpcSyncParams { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.start_script_count.into_into_dart().into_dart(), + self.start_time.into_into_dart().into_dart(), + self.force_start_time.into_into_dart().into_dart(), + self.poll_rate_sec.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::blockchain::RpcSyncParams +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::blockchain::RpcSyncParams +{ + fn into_into_dart(self) -> crate::api::blockchain::RpcSyncParams { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::Satisfaction { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::types::Satisfaction::Partial { + n, + m, + items, + sorted, + conditions, + } => [ + 0.into_dart(), + n.into_into_dart().into_dart(), + m.into_into_dart().into_dart(), + items.into_into_dart().into_dart(), + sorted.into_into_dart().into_dart(), + conditions.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::types::Satisfaction::PartialComplete { + n, + m, + items, + sorted, + conditions, + } => [ + 1.into_dart(), + n.into_into_dart().into_dart(), + m.into_into_dart().into_dart(), + items.into_into_dart().into_dart(), + sorted.into_into_dart().into_dart(), + conditions.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::types::Satisfaction::Complete { condition } => { + [2.into_dart(), condition.into_into_dart().into_dart()].into_dart() + } + crate::api::types::Satisfaction::None { msg } => { + [3.into_dart(), msg.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::Satisfaction +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::Satisfaction +{ + fn into_into_dart(self) -> crate::api::types::Satisfaction { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::SatisfiableItem { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::types::SatisfiableItem::EcdsaSignature { key } => { + [0.into_dart(), key.into_into_dart().into_dart()].into_dart() + } + crate::api::types::SatisfiableItem::SchnorrSignature { key } => { + [1.into_dart(), key.into_into_dart().into_dart()].into_dart() + } + crate::api::types::SatisfiableItem::Sha256Preimage { hash } => { + [2.into_dart(), hash.into_into_dart().into_dart()].into_dart() + } + crate::api::types::SatisfiableItem::Hash256Preimage { hash } => { + [3.into_dart(), hash.into_into_dart().into_dart()].into_dart() + } + crate::api::types::SatisfiableItem::Ripemd160Preimage { hash } => { + [4.into_dart(), hash.into_into_dart().into_dart()].into_dart() + } + crate::api::types::SatisfiableItem::Hash160Preimage { hash } => { + [5.into_dart(), hash.into_into_dart().into_dart()].into_dart() + } + crate::api::types::SatisfiableItem::AbsoluteTimelock { value } => { + [6.into_dart(), value.into_into_dart().into_dart()].into_dart() + } + crate::api::types::SatisfiableItem::RelativeTimelock { value } => { + [7.into_dart(), value.into_into_dart().into_dart()].into_dart() + } + crate::api::types::SatisfiableItem::Multisig { keys, threshold } => [ + 8.into_dart(), + keys.into_into_dart().into_dart(), + threshold.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::types::SatisfiableItem::Thresh { items, threshold } => [ + 9.into_dart(), + items.into_into_dart().into_dart(), + threshold.into_into_dart().into_dart(), + ] + .into_dart(), + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::SatisfiableItem +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::SatisfiableItem +{ + fn into_into_dart(self) -> crate::api::types::SatisfiableItem { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::ScriptAmount { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.script.into_into_dart().into_dart(), + self.amount.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::ScriptAmount +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::ScriptAmount +{ + fn into_into_dart(self) -> crate::api::types::ScriptAmount { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::SignOptions { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.trust_witness_utxo.into_into_dart().into_dart(), + self.assume_height.into_into_dart().into_dart(), + self.allow_all_sighashes.into_into_dart().into_dart(), + self.remove_partial_sigs.into_into_dart().into_dart(), + self.try_finalize.into_into_dart().into_dart(), + self.sign_with_tap_internal_key.into_into_dart().into_dart(), + self.allow_grinding.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::SignOptions +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::SignOptions +{ + fn into_into_dart(self) -> crate::api::types::SignOptions { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::SledDbConfiguration { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.path.into_into_dart().into_dart(), + self.tree_name.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::SledDbConfiguration +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::SledDbConfiguration +{ + fn into_into_dart(self) -> crate::api::types::SledDbConfiguration { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::SqliteDbConfiguration { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.path.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::SqliteDbConfiguration +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::SqliteDbConfiguration +{ + fn into_into_dart(self) -> crate::api::types::SqliteDbConfiguration { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::TransactionDetails { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.transaction.into_into_dart().into_dart(), + self.txid.into_into_dart().into_dart(), + self.received.into_into_dart().into_dart(), + self.sent.into_into_dart().into_dart(), + self.fee.into_into_dart().into_dart(), + self.confirmation_time.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::TransactionDetails +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::TransactionDetails +{ + fn into_into_dart(self) -> crate::api::types::TransactionDetails { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::TxIn { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.previous_output.into_into_dart().into_dart(), + self.script_sig.into_into_dart().into_dart(), + self.sequence.into_into_dart().into_dart(), + self.witness.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::TxIn {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::TxIn { + fn into_into_dart(self) -> crate::api::types::TxIn { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::TxOut { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.value.into_into_dart().into_dart(), + self.script_pubkey.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::TxOut {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::TxOut { + fn into_into_dart(self) -> crate::api::types::TxOut { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::Variant { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Bech32 => 0.into_dart(), + Self::Bech32m => 1.into_dart(), + _ => unreachable!(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::Variant {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::Variant { + fn into_into_dart(self) -> crate::api::types::Variant { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::WitnessVersion { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::V0 => 0.into_dart(), + Self::V1 => 1.into_dart(), + Self::V2 => 2.into_dart(), + Self::V3 => 3.into_dart(), + Self::V4 => 4.into_dart(), + Self::V5 => 5.into_dart(), + Self::V6 => 6.into_dart(), + Self::V7 => 7.into_dart(), + Self::V8 => 8.into_dart(), + Self::V9 => 9.into_dart(), + Self::V10 => 10.into_dart(), + Self::V11 => 11.into_dart(), + Self::V12 => 12.into_dart(), + Self::V13 => 13.into_dart(), + Self::V14 => 14.into_dart(), + Self::V15 => 15.into_dart(), + Self::V16 => 16.into_dart(), + _ => unreachable!(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::WitnessVersion +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::WitnessVersion +{ + fn into_into_dart(self) -> crate::api::types::WitnessVersion { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::WordCount { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Words12 => 0.into_dart(), + Self::Words18 => 1.into_dart(), + Self::Words24 => 2.into_dart(), + _ => unreachable!(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::WordCount {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::WordCount +{ + fn into_into_dart(self) -> crate::api::types::WordCount { + self + } +} + +impl SseEncode for std::collections::HashMap> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + )>>::sse_encode(self.into_iter().collect(), serializer); + } +} + +impl SseEncode for std::collections::HashMap, Vec> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + , Vec)>>::sse_encode( + self.into_iter().collect(), + serializer, + ); + } +} + +impl SseEncode for std::collections::HashMap> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + )>>::sse_encode( + self.into_iter().collect(), + serializer, + ); + } +} + +impl SseEncode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom>> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for RustOpaqueNom> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + +impl SseEncode for String { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.into_bytes(), serializer); + } +} + +impl SseEncode for crate::api::error::AddressError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::error::AddressError::Base58(field0) => { + ::sse_encode(0, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::AddressError::Bech32(field0) => { + ::sse_encode(1, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::AddressError::EmptyBech32Payload => { + ::sse_encode(2, serializer); + } + crate::api::error::AddressError::InvalidBech32Variant { expected, found } => { + ::sse_encode(3, serializer); + ::sse_encode(expected, serializer); + ::sse_encode(found, serializer); + } + crate::api::error::AddressError::InvalidWitnessVersion(field0) => { + ::sse_encode(4, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::AddressError::UnparsableWitnessVersion(field0) => { + ::sse_encode(5, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::AddressError::MalformedWitnessVersion => { + ::sse_encode(6, serializer); + } + crate::api::error::AddressError::InvalidWitnessProgramLength(field0) => { + ::sse_encode(7, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::AddressError::InvalidSegwitV0ProgramLength(field0) => { + ::sse_encode(8, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::AddressError::UncompressedPubkey => { + ::sse_encode(9, serializer); + } + crate::api::error::AddressError::ExcessiveScriptSize => { + ::sse_encode(10, serializer); + } + crate::api::error::AddressError::UnrecognizedScript => { + ::sse_encode(11, serializer); + } + crate::api::error::AddressError::UnknownAddressType(field0) => { + ::sse_encode(12, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::AddressError::NetworkValidation { + network_required, + network_found, + address, + } => { + ::sse_encode(13, serializer); + ::sse_encode(network_required, serializer); + ::sse_encode(network_found, serializer); + ::sse_encode(address, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::AddressIndex { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::AddressIndex::Increase => { + ::sse_encode(0, serializer); + } + crate::api::types::AddressIndex::LastUnused => { + ::sse_encode(1, serializer); + } + crate::api::types::AddressIndex::Peek { index } => { + ::sse_encode(2, serializer); + ::sse_encode(index, serializer); + } + crate::api::types::AddressIndex::Reset { index } => { + ::sse_encode(3, serializer); + ::sse_encode(index, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::blockchain::Auth { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::blockchain::Auth::None => { + ::sse_encode(0, serializer); + } + crate::api::blockchain::Auth::UserPass { username, password } => { + ::sse_encode(1, serializer); + ::sse_encode(username, serializer); + ::sse_encode(password, serializer); + } + crate::api::blockchain::Auth::Cookie { file } => { + ::sse_encode(2, serializer); + ::sse_encode(file, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::Balance { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.immature, serializer); + ::sse_encode(self.trusted_pending, serializer); + ::sse_encode(self.untrusted_pending, serializer); + ::sse_encode(self.confirmed, serializer); + ::sse_encode(self.spendable, serializer); + ::sse_encode(self.total, serializer); + } +} + +impl SseEncode for crate::api::types::BdkAddress { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.ptr, serializer); + } +} + +impl SseEncode for crate::api::blockchain::BdkBlockchain { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.ptr, serializer); + } +} + +impl SseEncode for crate::api::key::BdkDerivationPath { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.ptr, serializer); + } +} + +impl SseEncode for crate::api::descriptor::BdkDescriptor { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode( + self.extended_descriptor, + serializer, + ); + >::sse_encode(self.key_map, serializer); + } +} + +impl SseEncode for crate::api::key::BdkDescriptorPublicKey { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.ptr, serializer); + } +} + +impl SseEncode for crate::api::key::BdkDescriptorSecretKey { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.ptr, serializer); + } +} + +impl SseEncode for crate::api::error::BdkError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::error::BdkError::Hex(field0) => { + ::sse_encode(0, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Consensus(field0) => { + ::sse_encode(1, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::VerifyTransaction(field0) => { + ::sse_encode(2, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Address(field0) => { + ::sse_encode(3, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Descriptor(field0) => { + ::sse_encode(4, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidU32Bytes(field0) => { + ::sse_encode(5, serializer); + >::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Generic(field0) => { + ::sse_encode(6, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::ScriptDoesntHaveAddressForm => { + ::sse_encode(7, serializer); + } + crate::api::error::BdkError::NoRecipients => { + ::sse_encode(8, serializer); + } + crate::api::error::BdkError::NoUtxosSelected => { + ::sse_encode(9, serializer); + } + crate::api::error::BdkError::OutputBelowDustLimit(field0) => { + ::sse_encode(10, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InsufficientFunds { needed, available } => { + ::sse_encode(11, serializer); + ::sse_encode(needed, serializer); + ::sse_encode(available, serializer); + } + crate::api::error::BdkError::BnBTotalTriesExceeded => { + ::sse_encode(12, serializer); + } + crate::api::error::BdkError::BnBNoExactMatch => { + ::sse_encode(13, serializer); + } + crate::api::error::BdkError::UnknownUtxo => { + ::sse_encode(14, serializer); + } + crate::api::error::BdkError::TransactionNotFound => { + ::sse_encode(15, serializer); + } + crate::api::error::BdkError::TransactionConfirmed => { + ::sse_encode(16, serializer); + } + crate::api::error::BdkError::IrreplaceableTransaction => { + ::sse_encode(17, serializer); + } + crate::api::error::BdkError::FeeRateTooLow { needed } => { + ::sse_encode(18, serializer); + ::sse_encode(needed, serializer); + } + crate::api::error::BdkError::FeeTooLow { needed } => { + ::sse_encode(19, serializer); + ::sse_encode(needed, serializer); + } + crate::api::error::BdkError::FeeRateUnavailable => { + ::sse_encode(20, serializer); + } + crate::api::error::BdkError::MissingKeyOrigin(field0) => { + ::sse_encode(21, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Key(field0) => { + ::sse_encode(22, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::ChecksumMismatch => { + ::sse_encode(23, serializer); + } + crate::api::error::BdkError::SpendingPolicyRequired(field0) => { + ::sse_encode(24, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidPolicyPathError(field0) => { + ::sse_encode(25, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Signer(field0) => { + ::sse_encode(26, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidNetwork { requested, found } => { + ::sse_encode(27, serializer); + ::sse_encode(requested, serializer); + ::sse_encode(found, serializer); + } + crate::api::error::BdkError::InvalidOutpoint(field0) => { + ::sse_encode(28, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Encode(field0) => { + ::sse_encode(29, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Miniscript(field0) => { + ::sse_encode(30, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::MiniscriptPsbt(field0) => { + ::sse_encode(31, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Bip32(field0) => { + ::sse_encode(32, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Bip39(field0) => { + ::sse_encode(33, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Secp256k1(field0) => { + ::sse_encode(34, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Json(field0) => { + ::sse_encode(35, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Psbt(field0) => { + ::sse_encode(36, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::PsbtParse(field0) => { + ::sse_encode(37, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::MissingCachedScripts(field0, field1) => { + ::sse_encode(38, serializer); + ::sse_encode(field0, serializer); + ::sse_encode(field1, serializer); + } + crate::api::error::BdkError::Electrum(field0) => { + ::sse_encode(39, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Esplora(field0) => { + ::sse_encode(40, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Sled(field0) => { + ::sse_encode(41, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Rpc(field0) => { + ::sse_encode(42, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Rusqlite(field0) => { + ::sse_encode(43, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidInput(field0) => { + ::sse_encode(44, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidLockTime(field0) => { + ::sse_encode(45, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidTransaction(field0) => { + ::sse_encode(46, serializer); + ::sse_encode(field0, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::key::BdkMnemonic { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.ptr, serializer); + } +} + +impl SseEncode for crate::api::types::BdkPolicy { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.ptr, serializer); + } +} + +impl SseEncode for crate::api::psbt::BdkPsbt { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(self.ptr, serializer); + } +} + +impl SseEncode for crate::api::types::BdkScriptBuf { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.bytes, serializer); + } +} + +impl SseEncode for crate::api::types::BdkTransaction { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.s, serializer); + } +} + +impl SseEncode for crate::api::wallet::BdkWallet { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>>::sse_encode( + self.ptr, serializer, + ); + } +} + +impl SseEncode for crate::api::types::BlockTime { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.height, serializer); + ::sse_encode(self.timestamp, serializer); + } +} + +impl SseEncode for crate::api::blockchain::BlockchainConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::blockchain::BlockchainConfig::Electrum { config } => { + ::sse_encode(0, serializer); + ::sse_encode(config, serializer); + } + crate::api::blockchain::BlockchainConfig::Esplora { config } => { + ::sse_encode(1, serializer); + ::sse_encode(config, serializer); + } + crate::api::blockchain::BlockchainConfig::Rpc { config } => { + ::sse_encode(2, serializer); + ::sse_encode(config, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for bool { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_u8(self as _).unwrap(); + } +} + +impl SseEncode for crate::api::types::ChangeSpendPolicy { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode( + match self { + crate::api::types::ChangeSpendPolicy::ChangeAllowed => 0, + crate::api::types::ChangeSpendPolicy::OnlyChange => 1, + crate::api::types::ChangeSpendPolicy::ChangeForbidden => 2, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::api::types::Condition { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.csv, serializer); + >::sse_encode(self.timelock, serializer); + } +} + +impl SseEncode for crate::api::error::ConsensusError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::error::ConsensusError::Io(field0) => { + ::sse_encode(0, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::ConsensusError::OversizedVectorAllocation { requested, max } => { + ::sse_encode(1, serializer); + ::sse_encode(requested, serializer); + ::sse_encode(max, serializer); + } + crate::api::error::ConsensusError::InvalidChecksum { expected, actual } => { + ::sse_encode(2, serializer); + <[u8; 4]>::sse_encode(expected, serializer); + <[u8; 4]>::sse_encode(actual, serializer); + } + crate::api::error::ConsensusError::NonMinimalVarInt => { + ::sse_encode(3, serializer); + } + crate::api::error::ConsensusError::ParseFailed(field0) => { + ::sse_encode(4, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::ConsensusError::UnsupportedSegwitFlag(field0) => { + ::sse_encode(5, serializer); + ::sse_encode(field0, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::DatabaseConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::DatabaseConfig::Memory => { + ::sse_encode(0, serializer); + } + crate::api::types::DatabaseConfig::Sqlite { config } => { + ::sse_encode(1, serializer); + ::sse_encode(config, serializer); + } + crate::api::types::DatabaseConfig::Sled { config } => { + ::sse_encode(2, serializer); + ::sse_encode(config, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::DescriptorError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::error::DescriptorError::InvalidHdKeyPath => { + ::sse_encode(0, serializer); + } + crate::api::error::DescriptorError::InvalidDescriptorChecksum => { + ::sse_encode(1, serializer); + } + crate::api::error::DescriptorError::HardenedDerivationXpub => { + ::sse_encode(2, serializer); + } + crate::api::error::DescriptorError::MultiPath => { + ::sse_encode(3, serializer); + } + crate::api::error::DescriptorError::Key(field0) => { + ::sse_encode(4, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::DescriptorError::Policy(field0) => { + ::sse_encode(5, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::DescriptorError::InvalidDescriptorCharacter(field0) => { + ::sse_encode(6, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::DescriptorError::Bip32(field0) => { + ::sse_encode(7, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::DescriptorError::Base58(field0) => { + ::sse_encode(8, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::DescriptorError::Pk(field0) => { + ::sse_encode(9, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::DescriptorError::Miniscript(field0) => { + ::sse_encode(10, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::DescriptorError::Hex(field0) => { + ::sse_encode(11, serializer); + ::sse_encode(field0, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::blockchain::ElectrumConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.url, serializer); + >::sse_encode(self.socks5, serializer); + ::sse_encode(self.retry, serializer); + >::sse_encode(self.timeout, serializer); + ::sse_encode(self.stop_gap, serializer); + ::sse_encode(self.validate_domain, serializer); + } +} + +impl SseEncode for crate::api::blockchain::EsploraConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.base_url, serializer); + >::sse_encode(self.proxy, serializer); + >::sse_encode(self.concurrency, serializer); + ::sse_encode(self.stop_gap, serializer); + >::sse_encode(self.timeout, serializer); + } +} + +impl SseEncode for f32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_f32::(self).unwrap(); + } +} + +impl SseEncode for crate::api::types::FeeRate { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.sat_per_vb, serializer); + } +} + +impl SseEncode for crate::api::error::HexError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::error::HexError::InvalidChar(field0) => { + ::sse_encode(0, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::HexError::OddLengthString(field0) => { + ::sse_encode(1, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::HexError::InvalidLength(field0, field1) => { + ::sse_encode(2, serializer); + ::sse_encode(field0, serializer); + ::sse_encode(field1, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for i32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_i32::(self).unwrap(); + } +} + +impl SseEncode for crate::api::types::Input { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.s, serializer); + } +} + +impl SseEncode for crate::api::types::KeychainKind { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode( + match self { + crate::api::types::KeychainKind::ExternalChain => 0, + crate::api::types::KeychainKind::InternalChain => 1, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + >::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec<(Vec, Vec)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + <(Vec, Vec)>::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec<(String, Vec)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + <(String, Vec)>::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec<(u32, Vec)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + <(u32, Vec)>::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for crate::api::types::LocalUtxo { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.outpoint, serializer); + ::sse_encode(self.txout, serializer); + ::sse_encode(self.keychain, serializer); + ::sse_encode(self.is_spent, serializer); + } +} + +impl SseEncode for crate::api::types::LockTime { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::LockTime::Blocks(field0) => { + ::sse_encode(0, serializer); + ::sse_encode(field0, serializer); + } + crate::api::types::LockTime::Seconds(field0) => { + ::sse_encode(1, serializer); + ::sse_encode(field0, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::Network { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode( + match self { + crate::api::types::Network::Testnet => 0, + crate::api::types::Network::Regtest => 1, + crate::api::types::Network::Bitcoin => 2, + crate::api::types::Network::Signet => 3, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for Option>> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + >>::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option<(crate::api::types::OutPoint, crate::api::types::Input, usize)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + <(crate::api::types::OutPoint, crate::api::types::Input, usize)>::sse_encode( + value, serializer, + ); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for crate::api::types::OutPoint { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.txid, serializer); + ::sse_encode(self.vout, serializer); + } +} + +impl SseEncode for crate::api::types::Payload { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::Payload::PubkeyHash { pubkey_hash } => { + ::sse_encode(0, serializer); + ::sse_encode(pubkey_hash, serializer); + } + crate::api::types::Payload::ScriptHash { script_hash } => { + ::sse_encode(1, serializer); + ::sse_encode(script_hash, serializer); + } + crate::api::types::Payload::WitnessProgram { version, program } => { + ::sse_encode(2, serializer); + ::sse_encode(version, serializer); + >::sse_encode(program, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::PkOrF { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::PkOrF::Pubkey { value } => { + ::sse_encode(0, serializer); + ::sse_encode(value, serializer); + } + crate::api::types::PkOrF::XOnlyPubkey { value } => { + ::sse_encode(1, serializer); + ::sse_encode(value, serializer); + } + crate::api::types::PkOrF::Fingerprint { value } => { + ::sse_encode(2, serializer); + ::sse_encode(value, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::PsbtSigHashType { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.inner, serializer); + } +} + +impl SseEncode for crate::api::types::RbfValue { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::RbfValue::RbfDefault => { + ::sse_encode(0, serializer); + } + crate::api::types::RbfValue::Value(field0) => { + ::sse_encode(1, serializer); + ::sse_encode(field0, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for (crate::api::types::BdkAddress, u32) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.0, serializer); + ::sse_encode(self.1, serializer); + } +} + +impl SseEncode + for ( + crate::api::psbt::BdkPsbt, + crate::api::types::TransactionDetails, + ) +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.0, serializer); + ::sse_encode(self.1, serializer); + } +} + +impl SseEncode for (Vec, Vec) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.0, serializer); + >::sse_encode(self.1, serializer); + } +} + +impl SseEncode for (crate::api::types::OutPoint, crate::api::types::Input, usize) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.0, serializer); + ::sse_encode(self.1, serializer); + ::sse_encode(self.2, serializer); + } +} + +impl SseEncode for (String, Vec) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.0, serializer); + >::sse_encode(self.1, serializer); + } +} + +impl SseEncode for (u32, Vec) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.0, serializer); + >::sse_encode(self.1, serializer); + } +} + +impl SseEncode for crate::api::blockchain::RpcConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.url, serializer); + ::sse_encode(self.auth, serializer); + ::sse_encode(self.network, serializer); + ::sse_encode(self.wallet_name, serializer); + >::sse_encode(self.sync_params, serializer); + } +} + +impl SseEncode for crate::api::blockchain::RpcSyncParams { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.start_script_count, serializer); + ::sse_encode(self.start_time, serializer); + ::sse_encode(self.force_start_time, serializer); + ::sse_encode(self.poll_rate_sec, serializer); + } +} + +impl SseEncode for crate::api::types::Satisfaction { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::Satisfaction::Partial { + n, + m, + items, + sorted, + conditions, + } => { + ::sse_encode(0, serializer); + ::sse_encode(n, serializer); + ::sse_encode(m, serializer); + >::sse_encode(items, serializer); + >::sse_encode(sorted, serializer); + >>::sse_encode( + conditions, serializer, + ); + } + crate::api::types::Satisfaction::PartialComplete { + n, + m, + items, + sorted, + conditions, + } => { + ::sse_encode(1, serializer); + ::sse_encode(n, serializer); + ::sse_encode(m, serializer); + >::sse_encode(items, serializer); + >::sse_encode(sorted, serializer); + , Vec>>::sse_encode(conditions, serializer); + } + crate::api::types::Satisfaction::Complete { condition } => { + ::sse_encode(2, serializer); + ::sse_encode(condition, serializer); + } + crate::api::types::Satisfaction::None { msg } => { + ::sse_encode(3, serializer); + ::sse_encode(msg, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::SatisfiableItem { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::SatisfiableItem::EcdsaSignature { key } => { + ::sse_encode(0, serializer); + ::sse_encode(key, serializer); + } + crate::api::types::SatisfiableItem::SchnorrSignature { key } => { + ::sse_encode(1, serializer); + ::sse_encode(key, serializer); + } + crate::api::types::SatisfiableItem::Sha256Preimage { hash } => { + ::sse_encode(2, serializer); + ::sse_encode(hash, serializer); + } + crate::api::types::SatisfiableItem::Hash256Preimage { hash } => { + ::sse_encode(3, serializer); + ::sse_encode(hash, serializer); + } + crate::api::types::SatisfiableItem::Ripemd160Preimage { hash } => { + ::sse_encode(4, serializer); + ::sse_encode(hash, serializer); + } + crate::api::types::SatisfiableItem::Hash160Preimage { hash } => { + ::sse_encode(5, serializer); + ::sse_encode(hash, serializer); + } + crate::api::types::SatisfiableItem::AbsoluteTimelock { value } => { + ::sse_encode(6, serializer); + ::sse_encode(value, serializer); + } + crate::api::types::SatisfiableItem::RelativeTimelock { value } => { + ::sse_encode(7, serializer); + ::sse_encode(value, serializer); + } + crate::api::types::SatisfiableItem::Multisig { keys, threshold } => { + ::sse_encode(8, serializer); + >::sse_encode(keys, serializer); + ::sse_encode(threshold, serializer); + } + crate::api::types::SatisfiableItem::Thresh { items, threshold } => { + ::sse_encode(9, serializer); + >::sse_encode(items, serializer); + ::sse_encode(threshold, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::ScriptAmount { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.script, serializer); + ::sse_encode(self.amount, serializer); + } +} + +impl SseEncode for crate::api::types::SignOptions { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.trust_witness_utxo, serializer); + >::sse_encode(self.assume_height, serializer); + ::sse_encode(self.allow_all_sighashes, serializer); + ::sse_encode(self.remove_partial_sigs, serializer); + ::sse_encode(self.try_finalize, serializer); + ::sse_encode(self.sign_with_tap_internal_key, serializer); + ::sse_encode(self.allow_grinding, serializer); + } +} + +impl SseEncode for crate::api::types::SledDbConfiguration { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.path, serializer); + ::sse_encode(self.tree_name, serializer); + } +} + +impl SseEncode for crate::api::types::SqliteDbConfiguration { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.path, serializer); + } +} + +impl SseEncode for crate::api::types::TransactionDetails { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.transaction, serializer); + ::sse_encode(self.txid, serializer); + ::sse_encode(self.received, serializer); + ::sse_encode(self.sent, serializer); + >::sse_encode(self.fee, serializer); + >::sse_encode(self.confirmation_time, serializer); + } +} + +impl SseEncode for crate::api::types::TxIn { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.previous_output, serializer); + ::sse_encode(self.script_sig, serializer); + ::sse_encode(self.sequence, serializer); + >>::sse_encode(self.witness, serializer); + } +} + +impl SseEncode for crate::api::types::TxOut { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.value, serializer); + ::sse_encode(self.script_pubkey, serializer); + } +} + +impl SseEncode for u32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_u32::(self).unwrap(); + } +} + +impl SseEncode for u64 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_u64::(self).unwrap(); + } +} + +impl SseEncode for u8 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_u8(self).unwrap(); + } +} + +impl SseEncode for [u8; 4] { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode( + { + let boxed: Box<[_]> = Box::new(self); + boxed.into_vec() + }, + serializer, + ); + } +} + +impl SseEncode for () { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {} +} + +impl SseEncode for usize { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer + .cursor + .write_u64::(self as _) + .unwrap(); + } +} + +impl SseEncode for crate::api::types::Variant { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode( + match self { + crate::api::types::Variant::Bech32 => 0, + crate::api::types::Variant::Bech32m => 1, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::api::types::WitnessVersion { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode( + match self { + crate::api::types::WitnessVersion::V0 => 0, + crate::api::types::WitnessVersion::V1 => 1, + crate::api::types::WitnessVersion::V2 => 2, + crate::api::types::WitnessVersion::V3 => 3, + crate::api::types::WitnessVersion::V4 => 4, + crate::api::types::WitnessVersion::V5 => 5, + crate::api::types::WitnessVersion::V6 => 6, + crate::api::types::WitnessVersion::V7 => 7, + crate::api::types::WitnessVersion::V8 => 8, + crate::api::types::WitnessVersion::V9 => 9, + crate::api::types::WitnessVersion::V10 => 10, + crate::api::types::WitnessVersion::V11 => 11, + crate::api::types::WitnessVersion::V12 => 12, + crate::api::types::WitnessVersion::V13 => 13, + crate::api::types::WitnessVersion::V14 => 14, + crate::api::types::WitnessVersion::V15 => 15, + crate::api::types::WitnessVersion::V16 => 16, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::api::types::WordCount { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode( + match self { + crate::api::types::WordCount::Words12 => 0, + crate::api::types::WordCount::Words18 => 1, + crate::api::types::WordCount::Words24 => 2, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +#[cfg(not(target_family = "wasm"))] +#[path = "frb_generated.io.rs"] +mod io; +#[cfg(not(target_family = "wasm"))] +pub use io::*; diff --git a/rust/src/lib.rs b/rust/src/lib.rs new file mode 100644 index 00000000..a9eca924 --- /dev/null +++ b/rust/src/lib.rs @@ -0,0 +1,5 @@ +mod frb_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ +/* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ +extern crate core; + +pub mod api; diff --git a/test/bdk_flutter_test.dart b/test/bdk_flutter_test.dart new file mode 100644 index 00000000..029bc3be --- /dev/null +++ b/test/bdk_flutter_test.dart @@ -0,0 +1,345 @@ +import 'dart:convert'; + +import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; + +import 'bdk_flutter_test.mocks.dart'; + +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec
()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +@GenerateNiceMocks([MockSpec()]) +void main() { + final mockWallet = MockWallet(); + final mockBlockchain = MockBlockchain(); + final mockDerivationPath = MockDerivationPath(); + final mockAddress = MockAddress(); + final mockScript = MockScriptBuf(); + group('Blockchain', () { + test('verify getHeight', () async { + when(mockBlockchain.getHeight()).thenAnswer((_) async => 2396450); + final res = await mockBlockchain.getHeight(); + expect(res, 2396450); + }); + test('verify getHash', () async { + when(mockBlockchain.getBlockHash(height: any)).thenAnswer((_) async => + "0000000000004c01f2723acaa5e87467ebd2768cc5eadcf1ea0d0c4f1731efce"); + final res = await mockBlockchain.getBlockHash(height: 2396450); + expect(res, + "0000000000004c01f2723acaa5e87467ebd2768cc5eadcf1ea0d0c4f1731efce"); + }); + }); + group('FeeRate', () { + test('Should return a double when called', () async { + when(mockBlockchain.getHeight()).thenAnswer((_) async => 2396450); + final res = await mockBlockchain.getHeight(); + expect(res, 2396450); + }); + test('verify getHash', () async { + when(mockBlockchain.getBlockHash(height: any)).thenAnswer((_) async => + "0000000000004c01f2723acaa5e87467ebd2768cc5eadcf1ea0d0c4f1731efce"); + final res = await mockBlockchain.getBlockHash(height: 2396450); + expect(res, + "0000000000004c01f2723acaa5e87467ebd2768cc5eadcf1ea0d0c4f1731efce"); + }); + }); + group('Wallet', () { + test('Should return valid AddressInfo Object', () async { + final res = mockWallet.getAddress(addressIndex: AddressIndex.increase()); + expect(res, isA()); + }); + + test('Should return valid Balance object', () async { + final res = mockWallet.getBalance(); + expect(res, isA()); + }); + test('Should return Network enum', () async { + final res = mockWallet.network(); + expect(res, isA()); + }); + test('Should return list of LocalUtxo object', () async { + final res = mockWallet.listUnspent(); + expect(res, isA>()); + }); + test('Should return a Input object', () async { + final res = await mockWallet.getPsbtInput( + utxo: MockLocalUtxo(), onlyWitnessUtxo: true); + expect(res, isA()); + }); + test('Should return a Descriptor object', () async { + final res = await mockWallet.getDescriptorForKeychain( + keychain: KeychainKind.externalChain); + expect(res, isA()); + }); + test('Should return an empty list of TransactionDetails', () async { + when(mockWallet.listTransactions(includeRaw: any)) + .thenAnswer((e) => List.empty()); + final res = mockWallet.listTransactions(includeRaw: true); + expect(res, isA>()); + expect(res, List.empty()); + }); + test('verify function call order', () async { + await mockWallet.sync(blockchain: mockBlockchain); + mockWallet.listTransactions(includeRaw: true); + verifyInOrder([ + await mockWallet.sync(blockchain: mockBlockchain), + mockWallet.listTransactions(includeRaw: true) + ]); + }); + }); + group('DescriptorSecret', () { + final mockSDescriptorSecret = MockDescriptorSecretKey(); + + test('verify asPublic()', () async { + final res = mockSDescriptorSecret.toPublic(); + expect(res, isA()); + }); + test('verify asString', () async { + final res = mockSDescriptorSecret.asString(); + expect(res, isA()); + }); + }); + group('DescriptorPublic', () { + final mockSDescriptorPublic = MockDescriptorPublicKey(); + test('verify derive()', () async { + final res = await mockSDescriptorPublic.derive(path: mockDerivationPath); + expect(res, isA()); + }); + test('verify extend()', () async { + final res = await mockSDescriptorPublic.extend(path: mockDerivationPath); + expect(res, isA()); + }); + test('verify asString', () async { + final res = mockSDescriptorPublic.asString(); + expect(res, isA()); + }); + }); + group('Tx Builder', () { + final mockTxBuilder = MockTxBuilder(); + test('Should return a TxBuilderException when funds are insufficient', + () async { + try { + when(mockTxBuilder.finish(mockWallet)) + .thenThrow(InsufficientFundsException()); + await mockTxBuilder.finish(mockWallet); + } catch (error) { + expect(error, isA()); + } + }); + test('Should return a TxBuilderException when no recipients are added', + () async { + try { + when(mockTxBuilder.finish(mockWallet)) + .thenThrow(NoRecipientsException()); + await mockTxBuilder.finish(mockWallet); + } catch (error) { + expect(error, isA()); + } + }); + test('Verify addData() Exception', () async { + try { + when(mockTxBuilder.addData(data: List.empty())) + .thenThrow(InvalidByteException(message: "List must not be empty")); + mockTxBuilder.addData(data: []); + } catch (error) { + expect(error, isA()); + } + }); + test('Verify unSpendable()', () async { + final res = mockTxBuilder.addUnSpendable(OutPoint( + txid: + "efc5d0e6ad6611f22b05d3c1fc8888c3552e8929a4231f2944447e4426f52056", + vout: 1)); + expect(res, isNot(mockTxBuilder)); + }); + test('Verify addForeignUtxo()', () async { + const inputInternal = { + "non_witness_utxo": { + "version": 1, + "lock_time": 2433744, + "input": [ + { + "previous_output": + "8eca3ac01866105f79a1a6b87ec968565bb5ccc9cb1c5cf5b13491bafca24f0d:1", + "script_sig": + "483045022100f1bb7ab927473c78111b11cb3f134bc6d1782b4d9b9b664924682b83dc67763b02203bcdc8c9291d17098d11af7ed8a9aa54e795423f60c042546da059b9d912f3c001210238149dc7894a6790ba82c2584e09e5ed0e896dea4afb2de089ea02d017ff0682", + "sequence": 4294967294, + "witness": [] + } + ], + "output": [ + { + "value": 3356, + "script_pubkey": + "76a91400df17234b8e0f60afe1c8f9ae2e91c23cd07c3088ac" + }, + { + "value": 1500, + "script_pubkey": + "76a9149f9a7abd600c0caa03983a77c8c3df8e062cb2fa88ac" + } + ] + }, + "witness_utxo": null, + "partial_sigs": {}, + "sighash_type": null, + "redeem_script": null, + "witness_script": null, + "bip32_derivation": [ + [ + "030da577f40a6de2e0a55d3c5c72da44c77e6f820f09e1b7bbcc6a557bf392b5a4", + ["d91e6add", "m/44'/1'/0'/0/146"] + ] + ], + "final_script_sig": null, + "final_script_witness": null, + "ripemd160_preimages": {}, + "sha256_preimages": {}, + "hash160_preimages": {}, + "hash256_preimages": {}, + "tap_key_sig": null, + "tap_script_sigs": [], + "tap_scripts": [], + "tap_key_origins": [], + "tap_internal_key": null, + "tap_merkle_root": null, + "proprietary": [], + "unknown": [] + }; + final input = Input(s: json.encode(inputInternal)); + final outPoint = OutPoint( + txid: + 'b3b72ce9c7aa09b9c868c214e88c002a28aac9a62fd3971eff6de83c418f4db3', + vout: 0); + when(mockAddress.scriptPubkey()).thenAnswer((_) => mockScript); + when(mockTxBuilder.addRecipient(mockScript, any)) + .thenReturn(mockTxBuilder); + when(mockTxBuilder.addForeignUtxo(input, outPoint, BigInt.zero)) + .thenReturn(mockTxBuilder); + when(mockTxBuilder.finish(mockWallet)).thenAnswer((_) async => + Future.value( + (MockPartiallySignedTransaction(), MockTransactionDetails()))); + final script = mockAddress.scriptPubkey(); + final txBuilder = mockTxBuilder + .addRecipient(script, BigInt.from(1200)) + .addForeignUtxo(input, outPoint, BigInt.zero); + final res = await txBuilder.finish(mockWallet); + expect(res, isA<(PartiallySignedTransaction, TransactionDetails)>()); + }); + test('Create a proper psbt transaction ', () async { + const psbtBase64 = "cHNidP8BAHEBAAAAAfU6uDG8hNUox2Qw1nodiir" + "QhnLkDCYpTYfnY4+lUgjFAAAAAAD+////Ag5EAAAAAAAAFgAUxYD3fd+pId3hWxeuvuWmiUlS+1PoAwAAAAAAABYAFP+dpWfmLzDqhlT6HV+9R774474TxqQkAAABAN4" + "BAAAAAAEBViD1JkR+REQpHyOkKYkuVcOIiPzB0wUr8hFmrebQxe8AAAAAAP7///8ClEgAAAAAAAAWABTwV07KrKa1zWpwKzW+ve93pbQ4R+gDAAAAAAAAFgAU/52lZ+YvMOqGVPodX71Hv" + "vjjvhMCRzBEAiAa6a72jEfDuiyaNtlBYAxsc2oSruDWF2vuNQ3rJSshggIgLtJ/YuB8FmhjrPvTC9r2w9gpdfUNLuxw/C7oqo95cEIBIQM9XzutA2SgZFHjPDAATuWwHg19TTkb/NKZD/" + "hfN7fWP8akJAABAR+USAAAAAAAABYAFPBXTsqsprXNanArNb6973eltDhHIgYCHrxaLpnD4ed01bFHcixnAicv15oKiiVHrcVmxUWBW54Y2R5q3VQAAIABAACAAAAAgAEAAABbAAAAACICAqS" + "F0mhBBlgMe9OyICKlkhGHZfPjA0Q03I559ccj9x6oGNkeat1UAACAAQAAgAAAAIABAAAAXAAAAAAA"; + final psbt = await PartiallySignedTransaction.fromString(psbtBase64); + when(mockAddress.scriptPubkey()).thenAnswer((_) => MockScriptBuf()); + when(mockTxBuilder.addRecipient(mockScript, any)) + .thenReturn(mockTxBuilder); + + when(mockAddress.scriptPubkey()).thenAnswer((_) => mockScript); + when(mockTxBuilder.finish(mockWallet)).thenAnswer( + (_) async => Future.value((psbt, MockTransactionDetails()))); + final script = mockAddress.scriptPubkey(); + final txBuilder = mockTxBuilder.addRecipient(script, BigInt.from(1200)); + final res = await txBuilder.finish(mockWallet); + expect(res.$1, psbt); + }); + }); + group('Bump Fee Tx Builder', () { + final mockBumpFeeTxBuilder = MockBumpFeeTxBuilder(); + test('Should return a TxBuilderException when txid is invalid', () async { + try { + when(mockBumpFeeTxBuilder.finish(mockWallet)) + .thenThrow(TransactionNotFoundException()); + await mockBumpFeeTxBuilder.finish(mockWallet); + } catch (error) { + expect(error, isA()); + } + }); + }); + group('Address', () { + test('verify network()', () { + final res = mockAddress.network(); + expect(res, isA()); + }); + test('verify payload()', () { + final res = mockAddress.network(); + expect(res, isA()); + }); + test('verify scriptPubKey()', () { + final res = mockAddress.scriptPubkey(); + expect(res, isA()); + }); + }); + group('Script', () { + test('verify create', () { + final res = mockScript; + expect(res, isA()); + }); + }); + group('Transaction', () { + final mockTx = MockTransaction(); + test('verify serialize', () async { + final res = await mockTx.serialize(); + expect(res, isA>()); + }); + test('verify txid', () async { + final res = await mockTx.txid(); + expect(res, isA()); + }); + test('verify weight', () async { + final res = await mockTx.weight(); + expect(res, isA()); + }); + test('verify size', () async { + final res = await mockTx.size(); + expect(res, isA()); + }); + test('verify vsize', () async { + final res = await mockTx.vsize(); + expect(res, isA()); + }); + test('verify isCoinbase', () async { + final res = await mockTx.isCoinBase(); + expect(res, isA()); + }); + test('verify isExplicitlyRbf', () async { + final res = await mockTx.isExplicitlyRbf(); + expect(res, isA()); + }); + test('verify isLockTimeEnabled', () async { + final res = await mockTx.isLockTimeEnabled(); + expect(res, isA()); + }); + test('verify version', () async { + final res = await mockTx.version(); + expect(res, isA()); + }); + test('verify lockTime', () async { + final res = await mockTx.lockTime(); + expect(res, isA()); + }); + test('verify input', () async { + final res = await mockTx.input(); + expect(res, isA>()); + }); + test('verify output', () async { + final res = await mockTx.output(); + expect(res, isA>()); + }); + }); +} diff --git a/test/bdk_flutter_test.mocks.dart b/test/bdk_flutter_test.mocks.dart new file mode 100644 index 00000000..86e43303 --- /dev/null +++ b/test/bdk_flutter_test.mocks.dart @@ -0,0 +1,2243 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in bdk_flutter/test/bdk_flutter_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i5; +import 'dart:typed_data' as _i7; + +import 'package:bdk_flutter/src/generated/api/types.dart' as _i4; +import 'package:bdk_flutter/src/generated/lib.dart' as _i2; +import 'package:bdk_flutter/src/root.dart' as _i3; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i6; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeMutexWalletAnyDatabase_0 extends _i1.SmartFake + implements _i2.MutexWalletAnyDatabase { + _FakeMutexWalletAnyDatabase_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeAddressInfo_1 extends _i1.SmartFake implements _i3.AddressInfo { + _FakeAddressInfo_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { + _FakeBalance_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDescriptor_3 extends _i1.SmartFake implements _i3.Descriptor { + _FakeDescriptor_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeInput_4 extends _i1.SmartFake implements _i4.Input { + _FakeInput_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeAnyBlockchain_5 extends _i1.SmartFake implements _i2.AnyBlockchain { + _FakeAnyBlockchain_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFeeRate_6 extends _i1.SmartFake implements _i4.FeeRate { + _FakeFeeRate_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDescriptorSecretKey_7 extends _i1.SmartFake + implements _i2.DescriptorSecretKey { + _FakeDescriptorSecretKey_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDescriptorSecretKey_8 extends _i1.SmartFake + implements _i3.DescriptorSecretKey { + _FakeDescriptorSecretKey_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDescriptorPublicKey_9 extends _i1.SmartFake + implements _i3.DescriptorPublicKey { + _FakeDescriptorPublicKey_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDescriptorPublicKey_10 extends _i1.SmartFake + implements _i2.DescriptorPublicKey { + _FakeDescriptorPublicKey_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeMutexPartiallySignedTransaction_11 extends _i1.SmartFake + implements _i2.MutexPartiallySignedTransaction { + _FakeMutexPartiallySignedTransaction_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransaction_12 extends _i1.SmartFake implements _i3.Transaction { + _FakeTransaction_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePartiallySignedTransaction_13 extends _i1.SmartFake + implements _i3.PartiallySignedTransaction { + _FakePartiallySignedTransaction_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTxBuilder_14 extends _i1.SmartFake implements _i3.TxBuilder { + _FakeTxBuilder_14( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionDetails_15 extends _i1.SmartFake + implements _i3.TransactionDetails { + _FakeTransactionDetails_15( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeBumpFeeTxBuilder_16 extends _i1.SmartFake + implements _i3.BumpFeeTxBuilder { + _FakeBumpFeeTxBuilder_16( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeAddress_17 extends _i1.SmartFake implements _i2.Address { + _FakeAddress_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeScriptBuf_18 extends _i1.SmartFake implements _i3.ScriptBuf { + _FakeScriptBuf_18( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDerivationPath_19 extends _i1.SmartFake + implements _i2.DerivationPath { + _FakeDerivationPath_19( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeOutPoint_20 extends _i1.SmartFake implements _i4.OutPoint { + _FakeOutPoint_20( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTxOut_21 extends _i1.SmartFake implements _i4.TxOut { + _FakeTxOut_21( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [Wallet]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWallet extends _i1.Mock implements _i3.Wallet { + @override + _i2.MutexWalletAnyDatabase get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeMutexWalletAnyDatabase_0( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeMutexWalletAnyDatabase_0( + this, + Invocation.getter(#ptr), + ), + ) as _i2.MutexWalletAnyDatabase); + + @override + _i3.AddressInfo getAddress({ + required _i4.AddressIndex? addressIndex, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #getAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + returnValue: _FakeAddressInfo_1( + this, + Invocation.method( + #getAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + ), + returnValueForMissingStub: _FakeAddressInfo_1( + this, + Invocation.method( + #getAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + ), + ) as _i3.AddressInfo); + + @override + _i4.Balance getBalance({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #getBalance, + [], + {#hint: hint}, + ), + returnValue: _FakeBalance_2( + this, + Invocation.method( + #getBalance, + [], + {#hint: hint}, + ), + ), + returnValueForMissingStub: _FakeBalance_2( + this, + Invocation.method( + #getBalance, + [], + {#hint: hint}, + ), + ), + ) as _i4.Balance); + + @override + _i5.Future<_i3.Descriptor> getDescriptorForKeychain({ + required _i4.KeychainKind? keychain, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #getDescriptorForKeychain, + [], + { + #keychain: keychain, + #hint: hint, + }, + ), + returnValue: _i5.Future<_i3.Descriptor>.value(_FakeDescriptor_3( + this, + Invocation.method( + #getDescriptorForKeychain, + [], + { + #keychain: keychain, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i3.Descriptor>.value(_FakeDescriptor_3( + this, + Invocation.method( + #getDescriptorForKeychain, + [], + { + #keychain: keychain, + #hint: hint, + }, + ), + )), + ) as _i5.Future<_i3.Descriptor>); + + @override + _i3.AddressInfo getInternalAddress({ + required _i4.AddressIndex? addressIndex, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #getInternalAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + returnValue: _FakeAddressInfo_1( + this, + Invocation.method( + #getInternalAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + ), + returnValueForMissingStub: _FakeAddressInfo_1( + this, + Invocation.method( + #getInternalAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + ), + ) as _i3.AddressInfo); + + @override + _i5.Future<_i4.Input> getPsbtInput({ + required _i4.LocalUtxo? utxo, + required bool? onlyWitnessUtxo, + _i4.PsbtSigHashType? sighashType, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #getPsbtInput, + [], + { + #utxo: utxo, + #onlyWitnessUtxo: onlyWitnessUtxo, + #sighashType: sighashType, + #hint: hint, + }, + ), + returnValue: _i5.Future<_i4.Input>.value(_FakeInput_4( + this, + Invocation.method( + #getPsbtInput, + [], + { + #utxo: utxo, + #onlyWitnessUtxo: onlyWitnessUtxo, + #sighashType: sighashType, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i4.Input>.value(_FakeInput_4( + this, + Invocation.method( + #getPsbtInput, + [], + { + #utxo: utxo, + #onlyWitnessUtxo: onlyWitnessUtxo, + #sighashType: sighashType, + #hint: hint, + }, + ), + )), + ) as _i5.Future<_i4.Input>); + + @override + bool isMine({required _i3.ScriptBuf? script}) => (super.noSuchMethod( + Invocation.method( + #isMine, + [], + {#script: script}, + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + List<_i3.TransactionDetails> listTransactions({ + required bool? includeRaw, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #listTransactions, + [], + { + #includeRaw: includeRaw, + #hint: hint, + }, + ), + returnValue: <_i3.TransactionDetails>[], + returnValueForMissingStub: <_i3.TransactionDetails>[], + ) as List<_i3.TransactionDetails>); + + @override + List<_i4.LocalUtxo> listUnspent({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #listUnspent, + [], + {#hint: hint}, + ), + returnValue: <_i4.LocalUtxo>[], + returnValueForMissingStub: <_i4.LocalUtxo>[], + ) as List<_i4.LocalUtxo>); + + @override + _i4.Network network({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #network, + [], + {#hint: hint}, + ), + returnValue: _i4.Network.testnet, + returnValueForMissingStub: _i4.Network.testnet, + ) as _i4.Network); + + @override + _i5.Future sign({ + required _i3.PartiallySignedTransaction? psbt, + _i4.SignOptions? signOptions, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #sign, + [], + { + #psbt: psbt, + #signOptions: signOptions, + #hint: hint, + }, + ), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future sync({ + required _i3.Blockchain? blockchain, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #sync, + [], + { + #blockchain: blockchain, + #hint: hint, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i3.Policy? policies(_i4.KeychainKind? keychain) => (super.noSuchMethod( + Invocation.method( + #policies, + [keychain], + ), + returnValueForMissingStub: null, + ) as _i3.Policy?); +} + +/// A class which mocks [Transaction]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockTransaction extends _i1.Mock implements _i3.Transaction { + @override + String get s => (super.noSuchMethod( + Invocation.getter(#s), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#s), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.getter(#s), + ), + ) as String); + + @override + _i5.Future> input() => (super.noSuchMethod( + Invocation.method( + #input, + [], + ), + returnValue: _i5.Future>.value(<_i4.TxIn>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i4.TxIn>[]), + ) as _i5.Future>); + + @override + _i5.Future isCoinBase() => (super.noSuchMethod( + Invocation.method( + #isCoinBase, + [], + ), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future isExplicitlyRbf() => (super.noSuchMethod( + Invocation.method( + #isExplicitlyRbf, + [], + ), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future isLockTimeEnabled() => (super.noSuchMethod( + Invocation.method( + #isLockTimeEnabled, + [], + ), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future<_i4.LockTime> lockTime() => (super.noSuchMethod( + Invocation.method( + #lockTime, + [], + ), + returnValue: + _i5.Future<_i4.LockTime>.value(_i6.dummyValue<_i4.LockTime>( + this, + Invocation.method( + #lockTime, + [], + ), + )), + returnValueForMissingStub: + _i5.Future<_i4.LockTime>.value(_i6.dummyValue<_i4.LockTime>( + this, + Invocation.method( + #lockTime, + [], + ), + )), + ) as _i5.Future<_i4.LockTime>); + + @override + _i5.Future> output() => (super.noSuchMethod( + Invocation.method( + #output, + [], + ), + returnValue: _i5.Future>.value(<_i4.TxOut>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i4.TxOut>[]), + ) as _i5.Future>); + + @override + _i5.Future<_i7.Uint8List> serialize() => (super.noSuchMethod( + Invocation.method( + #serialize, + [], + ), + returnValue: _i5.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), + returnValueForMissingStub: + _i5.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), + ) as _i5.Future<_i7.Uint8List>); + + @override + _i5.Future size() => (super.noSuchMethod( + Invocation.method( + #size, + [], + ), + returnValue: _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #size, + [], + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #size, + [], + ), + )), + ) as _i5.Future); + + @override + _i5.Future txid() => (super.noSuchMethod( + Invocation.method( + #txid, + [], + ), + returnValue: _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #txid, + [], + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #txid, + [], + ), + )), + ) as _i5.Future); + + @override + _i5.Future version() => (super.noSuchMethod( + Invocation.method( + #version, + [], + ), + returnValue: _i5.Future.value(0), + returnValueForMissingStub: _i5.Future.value(0), + ) as _i5.Future); + + @override + _i5.Future vsize() => (super.noSuchMethod( + Invocation.method( + #vsize, + [], + ), + returnValue: _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #vsize, + [], + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #vsize, + [], + ), + )), + ) as _i5.Future); + + @override + _i5.Future weight() => (super.noSuchMethod( + Invocation.method( + #weight, + [], + ), + returnValue: _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #weight, + [], + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #weight, + [], + ), + )), + ) as _i5.Future); +} + +/// A class which mocks [Blockchain]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBlockchain extends _i1.Mock implements _i3.Blockchain { + @override + _i2.AnyBlockchain get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeAnyBlockchain_5( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeAnyBlockchain_5( + this, + Invocation.getter(#ptr), + ), + ) as _i2.AnyBlockchain); + + @override + _i5.Future<_i4.FeeRate> estimateFee({ + required BigInt? target, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateFee, + [], + { + #target: target, + #hint: hint, + }, + ), + returnValue: _i5.Future<_i4.FeeRate>.value(_FakeFeeRate_6( + this, + Invocation.method( + #estimateFee, + [], + { + #target: target, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i4.FeeRate>.value(_FakeFeeRate_6( + this, + Invocation.method( + #estimateFee, + [], + { + #target: target, + #hint: hint, + }, + ), + )), + ) as _i5.Future<_i4.FeeRate>); + + @override + _i5.Future broadcast({ + required _i3.Transaction? transaction, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #broadcast, + [], + { + #transaction: transaction, + #hint: hint, + }, + ), + returnValue: _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #broadcast, + [], + { + #transaction: transaction, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #broadcast, + [], + { + #transaction: transaction, + #hint: hint, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future getBlockHash({ + required int? height, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #getBlockHash, + [], + { + #height: height, + #hint: hint, + }, + ), + returnValue: _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #getBlockHash, + [], + { + #height: height, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i6.dummyValue( + this, + Invocation.method( + #getBlockHash, + [], + { + #height: height, + #hint: hint, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future getHeight({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #getHeight, + [], + {#hint: hint}, + ), + returnValue: _i5.Future.value(0), + returnValueForMissingStub: _i5.Future.value(0), + ) as _i5.Future); +} + +/// A class which mocks [DescriptorSecretKey]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockDescriptorSecretKey extends _i1.Mock + implements _i3.DescriptorSecretKey { + @override + _i2.DescriptorSecretKey get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeDescriptorSecretKey_7( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeDescriptorSecretKey_7( + this, + Invocation.getter(#ptr), + ), + ) as _i2.DescriptorSecretKey); + + @override + _i5.Future<_i3.DescriptorSecretKey> derive(_i3.DerivationPath? path) => + (super.noSuchMethod( + Invocation.method( + #derive, + [path], + ), + returnValue: _i5.Future<_i3.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_8( + this, + Invocation.method( + #derive, + [path], + ), + )), + returnValueForMissingStub: _i5.Future<_i3.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_8( + this, + Invocation.method( + #derive, + [path], + ), + )), + ) as _i5.Future<_i3.DescriptorSecretKey>); + + @override + _i5.Future<_i3.DescriptorSecretKey> extend(_i3.DerivationPath? path) => + (super.noSuchMethod( + Invocation.method( + #extend, + [path], + ), + returnValue: _i5.Future<_i3.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_8( + this, + Invocation.method( + #extend, + [path], + ), + )), + returnValueForMissingStub: _i5.Future<_i3.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_8( + this, + Invocation.method( + #extend, + [path], + ), + )), + ) as _i5.Future<_i3.DescriptorSecretKey>); + + @override + _i3.DescriptorPublicKey toPublic() => (super.noSuchMethod( + Invocation.method( + #toPublic, + [], + ), + returnValue: _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #toPublic, + [], + ), + ), + returnValueForMissingStub: _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #toPublic, + [], + ), + ), + ) as _i3.DescriptorPublicKey); + + @override + _i7.Uint8List secretBytes({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #secretBytes, + [], + {#hint: hint}, + ), + returnValue: _i7.Uint8List(0), + returnValueForMissingStub: _i7.Uint8List(0), + ) as _i7.Uint8List); + + @override + String asString() => (super.noSuchMethod( + Invocation.method( + #asString, + [], + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + ) as String); +} + +/// A class which mocks [DescriptorPublicKey]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockDescriptorPublicKey extends _i1.Mock + implements _i3.DescriptorPublicKey { + @override + _i2.DescriptorPublicKey get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeDescriptorPublicKey_10( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeDescriptorPublicKey_10( + this, + Invocation.getter(#ptr), + ), + ) as _i2.DescriptorPublicKey); + + @override + _i5.Future<_i3.DescriptorPublicKey> derive({ + required _i3.DerivationPath? path, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #derive, + [], + { + #path: path, + #hint: hint, + }, + ), + returnValue: _i5.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #derive, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #derive, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + ) as _i5.Future<_i3.DescriptorPublicKey>); + + @override + _i5.Future<_i3.DescriptorPublicKey> extend({ + required _i3.DerivationPath? path, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #extend, + [], + { + #path: path, + #hint: hint, + }, + ), + returnValue: _i5.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #extend, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #extend, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + ) as _i5.Future<_i3.DescriptorPublicKey>); + + @override + String asString() => (super.noSuchMethod( + Invocation.method( + #asString, + [], + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + ) as String); +} + +/// A class which mocks [PartiallySignedTransaction]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockPartiallySignedTransaction extends _i1.Mock + implements _i3.PartiallySignedTransaction { + @override + _i2.MutexPartiallySignedTransaction get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeMutexPartiallySignedTransaction_11( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeMutexPartiallySignedTransaction_11( + this, + Invocation.getter(#ptr), + ), + ) as _i2.MutexPartiallySignedTransaction); + + @override + String jsonSerialize({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #jsonSerialize, + [], + {#hint: hint}, + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #jsonSerialize, + [], + {#hint: hint}, + ), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.method( + #jsonSerialize, + [], + {#hint: hint}, + ), + ), + ) as String); + + @override + _i7.Uint8List serialize({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #serialize, + [], + {#hint: hint}, + ), + returnValue: _i7.Uint8List(0), + returnValueForMissingStub: _i7.Uint8List(0), + ) as _i7.Uint8List); + + @override + _i3.Transaction extractTx() => (super.noSuchMethod( + Invocation.method( + #extractTx, + [], + ), + returnValue: _FakeTransaction_12( + this, + Invocation.method( + #extractTx, + [], + ), + ), + returnValueForMissingStub: _FakeTransaction_12( + this, + Invocation.method( + #extractTx, + [], + ), + ), + ) as _i3.Transaction); + + @override + _i5.Future<_i3.PartiallySignedTransaction> combine( + _i3.PartiallySignedTransaction? other) => + (super.noSuchMethod( + Invocation.method( + #combine, + [other], + ), + returnValue: _i5.Future<_i3.PartiallySignedTransaction>.value( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #combine, + [other], + ), + )), + returnValueForMissingStub: + _i5.Future<_i3.PartiallySignedTransaction>.value( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #combine, + [other], + ), + )), + ) as _i5.Future<_i3.PartiallySignedTransaction>); + + @override + String txid({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #txid, + [], + {#hint: hint}, + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #txid, + [], + {#hint: hint}, + ), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.method( + #txid, + [], + {#hint: hint}, + ), + ), + ) as String); + + @override + String asString() => (super.noSuchMethod( + Invocation.method( + #asString, + [], + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + ) as String); +} + +/// A class which mocks [TxBuilder]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { + @override + _i3.TxBuilder addData({required List? data}) => (super.noSuchMethod( + Invocation.method( + #addData, + [], + {#data: data}, + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #addData, + [], + {#data: data}, + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #addData, + [], + {#data: data}, + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder addRecipient( + _i3.ScriptBuf? script, + BigInt? amount, + ) => + (super.noSuchMethod( + Invocation.method( + #addRecipient, + [ + script, + amount, + ], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #addRecipient, + [ + script, + amount, + ], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #addRecipient, + [ + script, + amount, + ], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder unSpendable(List<_i4.OutPoint>? outpoints) => + (super.noSuchMethod( + Invocation.method( + #unSpendable, + [outpoints], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #unSpendable, + [outpoints], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #unSpendable, + [outpoints], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder addUtxo(_i4.OutPoint? outpoint) => (super.noSuchMethod( + Invocation.method( + #addUtxo, + [outpoint], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #addUtxo, + [outpoint], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #addUtxo, + [outpoint], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder addUtxos(List<_i4.OutPoint>? outpoints) => (super.noSuchMethod( + Invocation.method( + #addUtxos, + [outpoints], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #addUtxos, + [outpoints], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #addUtxos, + [outpoints], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder addForeignUtxo( + _i4.Input? psbtInput, + _i4.OutPoint? outPoint, + BigInt? satisfactionWeight, + ) => + (super.noSuchMethod( + Invocation.method( + #addForeignUtxo, + [ + psbtInput, + outPoint, + satisfactionWeight, + ], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #addForeignUtxo, + [ + psbtInput, + outPoint, + satisfactionWeight, + ], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #addForeignUtxo, + [ + psbtInput, + outPoint, + satisfactionWeight, + ], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder doNotSpendChange() => (super.noSuchMethod( + Invocation.method( + #doNotSpendChange, + [], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #doNotSpendChange, + [], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #doNotSpendChange, + [], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder drainWallet() => (super.noSuchMethod( + Invocation.method( + #drainWallet, + [], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #drainWallet, + [], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #drainWallet, + [], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder drainTo(_i3.ScriptBuf? script) => (super.noSuchMethod( + Invocation.method( + #drainTo, + [script], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #drainTo, + [script], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #drainTo, + [script], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder enableRbfWithSequence(int? nSequence) => (super.noSuchMethod( + Invocation.method( + #enableRbfWithSequence, + [nSequence], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #enableRbfWithSequence, + [nSequence], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #enableRbfWithSequence, + [nSequence], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder enableRbf() => (super.noSuchMethod( + Invocation.method( + #enableRbf, + [], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #enableRbf, + [], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #enableRbf, + [], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder feeAbsolute(BigInt? feeAmount) => (super.noSuchMethod( + Invocation.method( + #feeAbsolute, + [feeAmount], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #feeAbsolute, + [feeAmount], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #feeAbsolute, + [feeAmount], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder feeRate(double? satPerVbyte) => (super.noSuchMethod( + Invocation.method( + #feeRate, + [satPerVbyte], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #feeRate, + [satPerVbyte], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #feeRate, + [satPerVbyte], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder setRecipients(List<(_i3.ScriptBuf, BigInt)>? recipients) => + (super.noSuchMethod( + Invocation.method( + #setRecipients, + [recipients], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #setRecipients, + [recipients], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #setRecipients, + [recipients], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder manuallySelectedOnly() => (super.noSuchMethod( + Invocation.method( + #manuallySelectedOnly, + [], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #manuallySelectedOnly, + [], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #manuallySelectedOnly, + [], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder addUnSpendable(_i4.OutPoint? unSpendable) => + (super.noSuchMethod( + Invocation.method( + #addUnSpendable, + [unSpendable], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #addUnSpendable, + [unSpendable], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #addUnSpendable, + [unSpendable], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder policyPath( + _i4.KeychainKind? keychain, + Map? path, + ) => + (super.noSuchMethod( + Invocation.method( + #policyPath, + [ + keychain, + path, + ], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #policyPath, + [ + keychain, + path, + ], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #policyPath, + [ + keychain, + path, + ], + ), + ), + ) as _i3.TxBuilder); + + @override + _i3.TxBuilder onlySpendChange() => (super.noSuchMethod( + Invocation.method( + #onlySpendChange, + [], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #onlySpendChange, + [], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #onlySpendChange, + [], + ), + ), + ) as _i3.TxBuilder); + + @override + _i5.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( + _i3.Wallet? wallet) => + (super.noSuchMethod( + Invocation.method( + #finish, + [wallet], + ), + returnValue: _i5.Future< + (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #finish, + [wallet], + ), + ), + _FakeTransactionDetails_15( + this, + Invocation.method( + #finish, + [wallet], + ), + ) + )), + returnValueForMissingStub: _i5.Future< + (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #finish, + [wallet], + ), + ), + _FakeTransactionDetails_15( + this, + Invocation.method( + #finish, + [wallet], + ), + ) + )), + ) as _i5 + .Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)>); +} + +/// A class which mocks [BumpFeeTxBuilder]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBumpFeeTxBuilder extends _i1.Mock implements _i3.BumpFeeTxBuilder { + @override + String get txid => (super.noSuchMethod( + Invocation.getter(#txid), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#txid), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.getter(#txid), + ), + ) as String); + + @override + double get feeRate => (super.noSuchMethod( + Invocation.getter(#feeRate), + returnValue: 0.0, + returnValueForMissingStub: 0.0, + ) as double); + + @override + _i3.BumpFeeTxBuilder allowShrinking(_i3.Address? address) => + (super.noSuchMethod( + Invocation.method( + #allowShrinking, + [address], + ), + returnValue: _FakeBumpFeeTxBuilder_16( + this, + Invocation.method( + #allowShrinking, + [address], + ), + ), + returnValueForMissingStub: _FakeBumpFeeTxBuilder_16( + this, + Invocation.method( + #allowShrinking, + [address], + ), + ), + ) as _i3.BumpFeeTxBuilder); + + @override + _i3.BumpFeeTxBuilder enableRbf() => (super.noSuchMethod( + Invocation.method( + #enableRbf, + [], + ), + returnValue: _FakeBumpFeeTxBuilder_16( + this, + Invocation.method( + #enableRbf, + [], + ), + ), + returnValueForMissingStub: _FakeBumpFeeTxBuilder_16( + this, + Invocation.method( + #enableRbf, + [], + ), + ), + ) as _i3.BumpFeeTxBuilder); + + @override + _i3.BumpFeeTxBuilder enableRbfWithSequence(int? nSequence) => + (super.noSuchMethod( + Invocation.method( + #enableRbfWithSequence, + [nSequence], + ), + returnValue: _FakeBumpFeeTxBuilder_16( + this, + Invocation.method( + #enableRbfWithSequence, + [nSequence], + ), + ), + returnValueForMissingStub: _FakeBumpFeeTxBuilder_16( + this, + Invocation.method( + #enableRbfWithSequence, + [nSequence], + ), + ), + ) as _i3.BumpFeeTxBuilder); + + @override + _i5.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( + _i3.Wallet? wallet) => + (super.noSuchMethod( + Invocation.method( + #finish, + [wallet], + ), + returnValue: _i5.Future< + (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #finish, + [wallet], + ), + ), + _FakeTransactionDetails_15( + this, + Invocation.method( + #finish, + [wallet], + ), + ) + )), + returnValueForMissingStub: _i5.Future< + (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #finish, + [wallet], + ), + ), + _FakeTransactionDetails_15( + this, + Invocation.method( + #finish, + [wallet], + ), + ) + )), + ) as _i5 + .Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)>); +} + +/// A class which mocks [ScriptBuf]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockScriptBuf extends _i1.Mock implements _i3.ScriptBuf { + @override + _i7.Uint8List get bytes => (super.noSuchMethod( + Invocation.getter(#bytes), + returnValue: _i7.Uint8List(0), + returnValueForMissingStub: _i7.Uint8List(0), + ) as _i7.Uint8List); + + @override + String asString() => (super.noSuchMethod( + Invocation.method( + #asString, + [], + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + ) as String); +} + +/// A class which mocks [Address]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockAddress extends _i1.Mock implements _i3.Address { + @override + _i2.Address get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeAddress_17( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeAddress_17( + this, + Invocation.getter(#ptr), + ), + ) as _i2.Address); + + @override + _i3.ScriptBuf scriptPubkey() => (super.noSuchMethod( + Invocation.method( + #scriptPubkey, + [], + ), + returnValue: _FakeScriptBuf_18( + this, + Invocation.method( + #scriptPubkey, + [], + ), + ), + returnValueForMissingStub: _FakeScriptBuf_18( + this, + Invocation.method( + #scriptPubkey, + [], + ), + ), + ) as _i3.ScriptBuf); + + @override + String toQrUri() => (super.noSuchMethod( + Invocation.method( + #toQrUri, + [], + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #toQrUri, + [], + ), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.method( + #toQrUri, + [], + ), + ), + ) as String); + + @override + bool isValidForNetwork({required _i4.Network? network}) => + (super.noSuchMethod( + Invocation.method( + #isValidForNetwork, + [], + {#network: network}, + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + _i4.Network network() => (super.noSuchMethod( + Invocation.method( + #network, + [], + ), + returnValue: _i4.Network.testnet, + returnValueForMissingStub: _i4.Network.testnet, + ) as _i4.Network); + + @override + _i4.Payload payload() => (super.noSuchMethod( + Invocation.method( + #payload, + [], + ), + returnValue: _i6.dummyValue<_i4.Payload>( + this, + Invocation.method( + #payload, + [], + ), + ), + returnValueForMissingStub: _i6.dummyValue<_i4.Payload>( + this, + Invocation.method( + #payload, + [], + ), + ), + ) as _i4.Payload); + + @override + String asString() => (super.noSuchMethod( + Invocation.method( + #asString, + [], + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + ) as String); +} + +/// A class which mocks [DerivationPath]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockDerivationPath extends _i1.Mock implements _i3.DerivationPath { + @override + _i2.DerivationPath get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeDerivationPath_19( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeDerivationPath_19( + this, + Invocation.getter(#ptr), + ), + ) as _i2.DerivationPath); + + @override + String asString() => (super.noSuchMethod( + Invocation.method( + #asString, + [], + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + ) as String); +} + +/// A class which mocks [FeeRate]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockFeeRate extends _i1.Mock implements _i4.FeeRate { + @override + double get satPerVb => (super.noSuchMethod( + Invocation.getter(#satPerVb), + returnValue: 0.0, + returnValueForMissingStub: 0.0, + ) as double); +} + +/// A class which mocks [LocalUtxo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockLocalUtxo extends _i1.Mock implements _i4.LocalUtxo { + @override + _i4.OutPoint get outpoint => (super.noSuchMethod( + Invocation.getter(#outpoint), + returnValue: _FakeOutPoint_20( + this, + Invocation.getter(#outpoint), + ), + returnValueForMissingStub: _FakeOutPoint_20( + this, + Invocation.getter(#outpoint), + ), + ) as _i4.OutPoint); + + @override + _i4.TxOut get txout => (super.noSuchMethod( + Invocation.getter(#txout), + returnValue: _FakeTxOut_21( + this, + Invocation.getter(#txout), + ), + returnValueForMissingStub: _FakeTxOut_21( + this, + Invocation.getter(#txout), + ), + ) as _i4.TxOut); + + @override + _i4.KeychainKind get keychain => (super.noSuchMethod( + Invocation.getter(#keychain), + returnValue: _i4.KeychainKind.externalChain, + returnValueForMissingStub: _i4.KeychainKind.externalChain, + ) as _i4.KeychainKind); + + @override + bool get isSpent => (super.noSuchMethod( + Invocation.getter(#isSpent), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); +} + +/// A class which mocks [TransactionDetails]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockTransactionDetails extends _i1.Mock + implements _i3.TransactionDetails { + @override + String get txid => (super.noSuchMethod( + Invocation.getter(#txid), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#txid), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.getter(#txid), + ), + ) as String); + + @override + BigInt get received => (super.noSuchMethod( + Invocation.getter(#received), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#received), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.getter(#received), + ), + ) as BigInt); + + @override + BigInt get sent => (super.noSuchMethod( + Invocation.getter(#sent), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#sent), + ), + returnValueForMissingStub: _i6.dummyValue( + this, + Invocation.getter(#sent), + ), + ) as BigInt); +} From 01862427f63b4578ddfc336faf713e02655ba1f0 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 4 Dec 2024 21:30:00 -0500 Subject: [PATCH 4/7] updated default CargokitUserOptions --- cargokit/build_tool/lib/src/options.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cargokit/build_tool/lib/src/options.dart b/cargokit/build_tool/lib/src/options.dart index 7937dcac..b2c0f7a8 100644 --- a/cargokit/build_tool/lib/src/options.dart +++ b/cargokit/build_tool/lib/src/options.dart @@ -298,7 +298,10 @@ class CargokitUserOptions { } userProjectDir = userProjectDir.parent; } - return CargokitUserOptions._(); + return CargokitUserOptions( + usePrecompiledBinaries: true, + verboseLogging: false, + ); } final bool usePrecompiledBinaries; From c820f5923f4c74f75c0169f1b0e87216b49097a4 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Thu, 5 Dec 2024 08:36:00 -0500 Subject: [PATCH 5/7] Android java Gradle migrated --- android/build.gradle | 29 +++------ android/gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 -- example/android/app/build.gradle | 57 +++++------------- example/android/build.gradle | 19 +----- .../gradle/wrapper/gradle-wrapper.properties | 3 +- example/android/settings.gradle | 29 ++++++--- 7 files changed, 49 insertions(+), 93 deletions(-) delete mode 100644 android/gradle/wrapper/gradle-wrapper.jar delete mode 100644 android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/build.gradle b/android/build.gradle index 6cc0c534..4a79fc4e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,7 +1,6 @@ group 'io.bdk.f.bdk_flutter' -version '1.0-SNAPSHOT' +version '0.31.3' buildscript { - ext.kotlin_version = '1.6.10' repositories { google() mavenCentral() @@ -9,7 +8,6 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.2.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -22,33 +20,22 @@ allprojects { } apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' android { - compileSdkVersion 31 - namespace "io.bdk.f.bdk_flutter" - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' + if (project.android.hasProperty("namespace")) { + namespace "io.bdk.f.bdk_flutter" } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileSdkVersion 33 + ndkVersion android.ndkVersion + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } defaultConfig { minSdkVersion 23 } } -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.databinding:databinding-runtime:7.2.1' - testImplementation 'junit:junit:4.13.2' -} apply from: "../cargokit/gradle/plugin.gradle" cargokit { diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7454180f2ae8848c63b8b4dea2cb829da983f2fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPcW9j`0o6{66#y5t9C zruFA2iKd=H%j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#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2e6e5897..00000000 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 6036f812..daf08401 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,56 +1,35 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + namespace = "io.bdk.f.bdk_flutter_example" + compileSdk = flutter.compileSdkVersion + ndkVersion "25.1.8937393" compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = '1.8' + jvmTarget = JavaVersion.VERSION_17 } - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } + defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "io.bdk.f.bdk_flutter_example" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 23 - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + minSdk = 23 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName } buildTypes { @@ -60,13 +39,9 @@ android { signingConfig signingConfigs.debug } } - namespace 'io.bdk.f.bdk_flutter_example' } flutter { source '../..' } -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/example/android/build.gradle b/example/android/build.gradle index 5c8d9b8f..8e9de9d8 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,16 +1,3 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() @@ -18,14 +5,14 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { delete rootProject.buildDir -} +} \ No newline at end of file diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index cc5527d7..5e6b5427 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 44e62bcf..814e3704 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,11 +1,24 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.3.1" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +include ":app" \ No newline at end of file From f897d6a68ffb2d3f152b38c13e29b59d224057a2 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Thu, 5 Dec 2024 10:43:00 -0500 Subject: [PATCH 6/7] android ndk version updated to 25.1.8937393 --- .github/workflows/precompile_binaries.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index 0804c5b0..a818c74d 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -37,7 +37,7 @@ jobs: uses: android-actions/setup-android@v2 - name: Install Specific NDK if: (matrix.os == 'ubuntu-20.04') - run: sdkmanager --install "ndk;24.0.8215888" + run: sdkmanager --install "ndk;25.1.8937393" - name: Precompile (with iOS) if: (matrix.os == 'macOS-latest') run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter @@ -47,7 +47,7 @@ jobs: PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} - name: Precompile (with Android) if: (matrix.os == 'ubuntu-20.04') - run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 + run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=25.1.8937393 --android-min-sdk-version=23 working-directory: cargokit/build_tool env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} From 1275767b90f6bd542d7af476800a0e56280502bb Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Fri, 6 Dec 2024 20:21:00 -0500 Subject: [PATCH 7/7] CHANGELOG updated --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77d8f273..09ada0ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ ## [0.31.3] +#### Upgrades +- Updated `Flutter` dependencies to the latest version. +- Upgraded `Gradle` to version 8.4 and `Java` to version 17. +- Upgraded `android-ndk` to `25.1.8937393`. +#### Fixed +- Removed unnecessary class exports. +- Resolved the `txBuilder.setRecipients` error. ## [0.31.2] Updated `flutter_rust_bridge` to `2.0.0`.